server/src/util/gamedata.h

26 lines
586 B
C
Raw Normal View History

2016-02-12 22:06:31 +01:00
#pragma once
#ifndef _GAMEDATA_H
#define _GAMEDATA_H
#include <stream.h>
struct storage;
typedef struct gamedata {
struct storage *store;
stream strm;
int version;
} gamedata;
void gamedata_init(gamedata *data, struct storage *store, int version);
void gamedata_done(gamedata *data);
void gamedata_close(gamedata *data);
gamedata *gamedata_open(const char *filename, const char *mode, int version);
2016-02-12 22:06:31 +01:00
int gamedata_openfile(gamedata *data, const char *filename, const char *mode, int version);
#define STREAM_VERSION 2 /* internal encoding of binary files */
#endif