2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#ifndef SAVELOAD_H
|
|
|
|
#define SAVELOAD_H
|
|
|
|
|
2005-07-22 06:31:31 +00:00
|
|
|
typedef enum SaveOrLoadResult {
|
2006-02-20 19:04:18 +00:00
|
|
|
SL_OK = 0, // completed successfully
|
|
|
|
SL_ERROR = 1, // error that was caught before internal structures were modified
|
2005-07-22 06:31:31 +00:00
|
|
|
SL_REINIT = 2, // error that was caught in the middle of updating game state, need to clear it. (can only happen during load)
|
|
|
|
} SaveOrLoadResult;
|
|
|
|
|
|
|
|
typedef enum SaveOrLoadMode {
|
2006-02-20 19:04:18 +00:00
|
|
|
SL_INVALID = -1,
|
|
|
|
SL_LOAD = 0,
|
|
|
|
SL_SAVE = 1,
|
|
|
|
SL_OLD_LOAD = 2,
|
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
- Load heightmaps (either BMP or PNG)
- Progress dialog while generating worlds (no longer a 'hanging' screen)
- New dialogs for NewGame, Create Scenario and Play Heightmap
- Easier to configure your landscape
- More things to configure (tree-placer, ..)
- Speedup of world generation
- New console command 'restart': restart the map EXACTLY as it was when you
first started it (needs a game made after or with this commit)
- New console command 'getseed': get the seed of your map and share it with
others (of course only works with generated maps)
- Many new, world generation related, things
- Many internal cleanups and rewrites
Many tnx to those people who helped making this:
Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
Many tnx to those who helped testing:
Arnau, Bjarni, and tokai (alfabetic)
And to all other people who helped testing and sending comments / bugs
Stats: 673 lines changed, 3534 new lines, 79 new strings
2006-08-19 10:00:30 +00:00
|
|
|
SL_PNG = 3,
|
|
|
|
SL_BMP = 4,
|
2005-07-22 06:31:31 +00:00
|
|
|
} SaveOrLoadMode;
|
|
|
|
|
|
|
|
SaveOrLoadResult SaveOrLoad(const char *filename, int mode);
|
2005-08-05 09:15:41 +00:00
|
|
|
void WaitTillSaved(void);
|
2006-09-04 17:30:30 +00:00
|
|
|
void DoExitSave(void);
|
2005-07-22 06:31:31 +00:00
|
|
|
|
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
typedef void ChunkSaveLoadProc(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
typedef void AutolengthProc(void *arg);
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32 id;
|
|
|
|
ChunkSaveLoadProc *save_proc;
|
|
|
|
ChunkSaveLoadProc *load_proc;
|
|
|
|
uint32 flags;
|
|
|
|
} ChunkHandler;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
byte null;
|
|
|
|
} NullStruct;
|
|
|
|
|
2005-05-30 22:16:05 +00:00
|
|
|
typedef enum SLRefType {
|
2006-08-22 14:38:37 +00:00
|
|
|
REF_ORDER = 0,
|
|
|
|
REF_VEHICLE = 1,
|
|
|
|
REF_STATION = 2,
|
|
|
|
REF_TOWN = 3,
|
|
|
|
REF_VEHICLE_OLD = 4,
|
|
|
|
REF_ROADSTOPS = 5,
|
2006-01-12 15:52:18 +00:00
|
|
|
REF_ENGINE_RENEWS = 6,
|
2005-05-30 22:16:05 +00:00
|
|
|
} SLRefType;
|
|
|
|
|
2006-02-20 19:04:18 +00:00
|
|
|
#define SL_MAX_VERSION 255
|
2004-12-28 11:51:31 +00:00
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
enum {
|
|
|
|
INC_VEHICLE_COMMON = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2006-08-22 14:38:37 +00:00
|
|
|
CH_RIFF = 0,
|
|
|
|
CH_ARRAY = 1,
|
|
|
|
CH_SPARSE_ARRAY = 2,
|
|
|
|
CH_TYPE_MASK = 3,
|
|
|
|
CH_LAST = 8,
|
2006-02-20 19:04:18 +00:00
|
|
|
CH_AUTO_LENGTH = 16,
|
|
|
|
|
|
|
|
CH_PRI_0 = 0 << 4,
|
|
|
|
CH_PRI_1 = 1 << 4,
|
|
|
|
CH_PRI_2 = 2 << 4,
|
|
|
|
CH_PRI_3 = 3 << 4,
|
|
|
|
CH_PRI_SHL = 4,
|
2004-08-09 17:04:08 +00:00
|
|
|
CH_NUM_PRI_LEVELS = 4,
|
|
|
|
};
|
|
|
|
|
2006-03-01 23:39:21 +00:00
|
|
|
/** VarTypes is the general bitmasked magic type that tells us
|
|
|
|
* certain characteristics about the variable it refers to. For example
|
|
|
|
* SLE_FILE_* gives the size(type) as it would be in the savegame and
|
|
|
|
* SLE_VAR_* the size(type) as it is in memory during runtime. These are
|
|
|
|
* the first 8 bytes (0-3 SLE_FILE, 4-7 SLE_VAR).
|
|
|
|
* Bytes 8-15 are reserved for various flags as explained below */
|
2006-02-20 19:42:39 +00:00
|
|
|
enum VarTypes {
|
|
|
|
/* 4 bytes allocated a maximum of 16 types for NumberType */
|
|
|
|
SLE_FILE_I8 = 0,
|
|
|
|
SLE_FILE_U8 = 1,
|
|
|
|
SLE_FILE_I16 = 2,
|
|
|
|
SLE_FILE_U16 = 3,
|
|
|
|
SLE_FILE_I32 = 4,
|
|
|
|
SLE_FILE_U32 = 5,
|
|
|
|
SLE_FILE_I64 = 6,
|
|
|
|
SLE_FILE_U64 = 7,
|
2006-03-01 23:39:21 +00:00
|
|
|
SLE_FILE_STRINGID = 8, ///< StringID offset into strings-array
|
2006-02-20 19:58:46 +00:00
|
|
|
SLE_FILE_STRING = 9,
|
2006-03-01 23:39:21 +00:00
|
|
|
/* 6 more possible file-primitives */
|
2006-02-20 19:42:39 +00:00
|
|
|
|
|
|
|
/* 4 bytes allocated a maximum of 16 types for NumberType */
|
2006-08-22 14:38:37 +00:00
|
|
|
SLE_VAR_BL = 0 << 4,
|
|
|
|
SLE_VAR_I8 = 1 << 4,
|
|
|
|
SLE_VAR_U8 = 2 << 4,
|
|
|
|
SLE_VAR_I16 = 3 << 4,
|
|
|
|
SLE_VAR_U16 = 4 << 4,
|
|
|
|
SLE_VAR_I32 = 5 << 4,
|
|
|
|
SLE_VAR_U32 = 6 << 4,
|
|
|
|
SLE_VAR_I64 = 7 << 4,
|
|
|
|
SLE_VAR_U64 = 8 << 4,
|
|
|
|
SLE_VAR_NULL = 9 << 4, ///< useful to write zeros in savegame.
|
2006-11-21 16:54:16 +00:00
|
|
|
SLE_VAR_STRB = 10 << 4, ///< string (with pre-allocated buffer)
|
2006-08-22 14:38:37 +00:00
|
|
|
SLE_VAR_STRBQ = 11 << 4, ///< string enclosed in quotes (with pre-allocated buffer)
|
|
|
|
SLE_VAR_STR = 12 << 4, ///< string pointer
|
2006-11-21 16:54:16 +00:00
|
|
|
SLE_VAR_STRQ = 13 << 4, ///< string pointer enclosed in quotes
|
2006-08-12 22:56:45 +00:00
|
|
|
/* 2 more possible memory-primitives */
|
2006-02-20 19:42:39 +00:00
|
|
|
|
|
|
|
/* Shortcut values */
|
|
|
|
SLE_VAR_CHAR = SLE_VAR_I8,
|
|
|
|
|
|
|
|
/* Default combinations of variables. As savegames change, so can variables
|
|
|
|
* and thus it is possible that the saved value and internal size do not
|
|
|
|
* match and you need to specify custom combo. The defaults are listed here */
|
2006-08-22 14:38:37 +00:00
|
|
|
SLE_BOOL = SLE_FILE_I8 | SLE_VAR_BL,
|
|
|
|
SLE_INT8 = SLE_FILE_I8 | SLE_VAR_I8,
|
|
|
|
SLE_UINT8 = SLE_FILE_U8 | SLE_VAR_U8,
|
|
|
|
SLE_INT16 = SLE_FILE_I16 | SLE_VAR_I16,
|
|
|
|
SLE_UINT16 = SLE_FILE_U16 | SLE_VAR_U16,
|
|
|
|
SLE_INT32 = SLE_FILE_I32 | SLE_VAR_I32,
|
|
|
|
SLE_UINT32 = SLE_FILE_U32 | SLE_VAR_U32,
|
|
|
|
SLE_INT64 = SLE_FILE_I64 | SLE_VAR_I64,
|
|
|
|
SLE_UINT64 = SLE_FILE_U64 | SLE_VAR_U64,
|
|
|
|
SLE_CHAR = SLE_FILE_I8 | SLE_VAR_CHAR,
|
|
|
|
SLE_STRINGID = SLE_FILE_STRINGID | SLE_VAR_U16,
|
|
|
|
SLE_STRINGBUF = SLE_FILE_STRING | SLE_VAR_STRB,
|
|
|
|
SLE_STRINGBQUOTE = SLE_FILE_STRING | SLE_VAR_STRBQ,
|
|
|
|
SLE_STRING = SLE_FILE_STRING | SLE_VAR_STR,
|
|
|
|
SLE_STRINGQUOTE = SLE_FILE_STRING | SLE_VAR_STRQ,
|
2006-02-20 19:42:39 +00:00
|
|
|
|
|
|
|
/* Shortcut values */
|
2006-08-22 14:38:37 +00:00
|
|
|
SLE_UINT = SLE_UINT32,
|
|
|
|
SLE_INT = SLE_INT32,
|
|
|
|
SLE_STRB = SLE_STRINGBUF,
|
|
|
|
SLE_STRBQ = SLE_STRINGBQUOTE,
|
|
|
|
SLE_STR = SLE_STRING,
|
|
|
|
SLE_STRQ = SLE_STRINGQUOTE,
|
(svn r3719) - [1/4] Present the game with a unified structure for the configuration-ini, saveload, console and gui representations of the settings. This first part rewrites the configuration section to use the SaveLoad VarType in general.
- This unified structure consists of a SaveLoad type which stores all data relevant about the variable internals such as type, mem/filesize, address, version-control. The SettingDesc type is concerned more about the representation. Things like default value, string-name, minimum/maximum values, gui-behaviour etc.
- The SaveLoad type has received a few flags controlling saving/loading. These are:
SLF_SAVE_NO: the setting is not saved with the savegame, effectively making this setting player-based. Eg. it will NOT be overwritten when joining a network-game
SLF_CONFIG_NO: the setting is not saved to the configuration file so you cannot overwrite it ingame.
SLF_NETWORK_NO: the setting is not synchronised with the local settings when the game is loaded during network-play. Note that when SLF_SAVE_NO is set, SLF_NETWORK_NO is also set (which is logical), at least if the proper macros are used (in [2/4]).
- NOTE! The game is not compilable after this commit.
2006-03-01 23:53:20 +00:00
|
|
|
|
|
|
|
/* 8 bytes allocated for a maximum of 8 flags
|
|
|
|
* Flags directing saving/loading of a variable */
|
|
|
|
SLF_SAVE_NO = 1 << 8, ///< do not save with savegame, basically player-based
|
|
|
|
SLF_CONFIG_NO = 1 << 9, ///< do not save to config file
|
|
|
|
SLF_NETWORK_NO = 1 << 10, ///< do not synchronize over network (but it is saved if SSF_SAVE_NO is not set)
|
|
|
|
/* 5 more possible flags */
|
2006-02-20 19:42:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef uint32 VarType;
|
2005-05-30 22:16:05 +00:00
|
|
|
|
|
|
|
enum SaveLoadTypes {
|
2006-08-22 14:38:37 +00:00
|
|
|
SL_VAR = 0,
|
|
|
|
SL_REF = 1,
|
|
|
|
SL_ARR = 2,
|
|
|
|
SL_STR = 3,
|
2005-05-30 22:16:05 +00:00
|
|
|
// non-normal save-load types
|
2006-08-22 14:38:37 +00:00
|
|
|
SL_WRITEBYTE = 8,
|
|
|
|
SL_INCLUDE = 9,
|
2005-05-30 22:16:05 +00:00
|
|
|
SL_END = 15
|
2004-08-09 17:04:08 +00:00
|
|
|
};
|
|
|
|
|
2006-02-20 19:42:39 +00:00
|
|
|
typedef byte SaveLoadType;
|
|
|
|
|
2005-05-30 22:16:05 +00:00
|
|
|
/** SaveLoad type struct. Do NOT use this directly but use the SLE_ macros defined just below! */
|
2005-08-06 17:40:21 +00:00
|
|
|
typedef struct SaveLoad {
|
2006-03-01 23:39:21 +00:00
|
|
|
SaveLoadType cmd; ///< the action to take with the saved/loaded type, All types need different action
|
|
|
|
VarType conv; ///< type of the variable to be saved, int
|
|
|
|
uint16 length; ///< (conditional) length of the variable (eg. arrays) (max array size is 65536 elements)
|
|
|
|
uint16 version_from; ///< save/load the variable starting from this savegame version
|
|
|
|
uint16 version_to; ///< save/load the variable until this savegame version
|
2006-02-20 19:42:39 +00:00
|
|
|
/* NOTE: This element either denotes the address of the variable for a global
|
|
|
|
* variable, or the offset within a struct which is then bound to a variable
|
|
|
|
* during runtime. Decision on which one to use is controlled by the function
|
|
|
|
* that is called to save it. address: SlGlobList, offset: SlObject */
|
2006-03-01 23:39:21 +00:00
|
|
|
void *address; ///< address of variable OR offset of variable in the struct (max offset is 65536)
|
2005-08-06 17:40:21 +00:00
|
|
|
} SaveLoad;
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2006-02-20 19:42:39 +00:00
|
|
|
/* Same as SaveLoad but global variables are used (for better readability); */
|
|
|
|
typedef SaveLoad SaveLoadGlobVarList;
|
|
|
|
|
2005-05-30 22:16:05 +00:00
|
|
|
/* Simple variables, references (pointers) and arrays */
|
2006-02-23 20:53:30 +00:00
|
|
|
#define SLE_GENERAL(cmd, base, variable, type, length, from, to) {cmd, type, length, from, to, (void*)offsetof(base, variable)}
|
2006-02-20 19:04:18 +00:00
|
|
|
#define SLE_CONDVAR(base, variable, type, from, to) SLE_GENERAL(SL_VAR, base, variable, type, 0, from, to)
|
|
|
|
#define SLE_CONDREF(base, variable, type, from, to) SLE_GENERAL(SL_REF, base, variable, type, 0, from, to)
|
|
|
|
#define SLE_CONDARR(base, variable, type, length, from, to) SLE_GENERAL(SL_ARR, base, variable, type, length, from, to)
|
|
|
|
#define SLE_CONDSTR(base, variable, type, length, from, to) SLE_GENERAL(SL_STR, base, variable, type, length, from, to)
|
|
|
|
|
|
|
|
#define SLE_VAR(base, variable, type) SLE_CONDVAR(base, variable, type, 0, SL_MAX_VERSION)
|
|
|
|
#define SLE_REF(base, variable, type) SLE_CONDREF(base, variable, type, 0, SL_MAX_VERSION)
|
|
|
|
#define SLE_ARR(base, variable, type, length) SLE_CONDARR(base, variable, type, length, 0, SL_MAX_VERSION)
|
|
|
|
#define SLE_STR(base, variable, type, length) SLE_CONDSTR(base, variable, type, length, 0, SL_MAX_VERSION)
|
|
|
|
|
2006-03-17 08:01:54 +00:00
|
|
|
#define SLE_CONDNULL(length, from, to) SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL | SLF_CONFIG_NO, length, from, to)
|
2006-03-16 00:20:33 +00:00
|
|
|
|
2005-05-30 22:16:05 +00:00
|
|
|
/* Translate values ingame to different values in the savegame and vv */
|
2006-02-20 19:04:18 +00:00
|
|
|
#define SLE_WRITEBYTE(base, variable, game_value, file_value) SLE_GENERAL(SL_WRITEBYTE, base, variable, 0, 0, game_value, file_value)
|
2005-05-30 22:16:05 +00:00
|
|
|
/* Load common code and put it into each struct (currently only for vehicles */
|
2006-02-20 19:04:18 +00:00
|
|
|
#define SLE_INCLUDE(base, variable, include_index) SLE_GENERAL(SL_INCLUDE, base, variable, 0, 0, include_index, 0)
|
2005-05-30 22:16:05 +00:00
|
|
|
|
|
|
|
/* The same as the ones at the top, only the offset is given directly; used for unions */
|
2006-02-23 20:53:30 +00:00
|
|
|
#define SLE_GENERALX(cmd, offset, type, param1, param2) {cmd, type, 0, param1, param2, (void*)(offset)}
|
2006-02-20 19:04:18 +00:00
|
|
|
#define SLE_CONDVARX(offset, type, from, to) SLE_GENERALX(SL_VAR, offset, type, from, to)
|
|
|
|
#define SLE_CONDREFX(offset, type, from, to) SLE_GENERALX(SL_REF, offset, type, from, to)
|
|
|
|
|
|
|
|
#define SLE_VARX(offset, type) SLE_CONDVARX(offset, type, 0, SL_MAX_VERSION)
|
|
|
|
#define SLE_REFX(offset, type) SLE_CONDREFX(offset, type, 0, SL_MAX_VERSION)
|
|
|
|
|
|
|
|
#define SLE_WRITEBYTEX(offset, something) SLE_GENERALX(SL_WRITEBYTE, offset, 0, something, 0)
|
|
|
|
#define SLE_INCLUDEX(offset, type) SLE_GENERALX(SL_INCLUDE, offset, type, 0, SL_MAX_VERSION)
|
2005-05-30 22:16:05 +00:00
|
|
|
|
|
|
|
/* End marker */
|
2006-02-23 20:53:30 +00:00
|
|
|
#define SLE_END() {SL_END, 0, 0, 0, 0, NULL}
|
2006-02-20 19:42:39 +00:00
|
|
|
|
|
|
|
/* Simple variables, references (pointers) and arrays, but for global variables */
|
2006-02-23 20:53:30 +00:00
|
|
|
#define SLEG_GENERAL(cmd, variable, type, length, from, to) {cmd, type, length, from, to, (void*)&variable}
|
2006-02-20 19:42:39 +00:00
|
|
|
|
|
|
|
#define SLEG_CONDVAR(variable, type, from, to) SLEG_GENERAL(SL_VAR, variable, type, 0, from, to)
|
|
|
|
#define SLEG_CONDREF(variable, type, from, to) SLEG_GENERAL(SL_REF, variable, type, 0, from, to)
|
|
|
|
#define SLEG_CONDARR(variable, type, length, from, to) SLEG_GENERAL(SL_ARR, variable, type, length, from, to)
|
|
|
|
#define SLEG_CONDSTR(variable, type, length, from, to) SLEG_GENERAL(SL_STR, variable, type, length, from, to)
|
|
|
|
|
|
|
|
#define SLEG_VAR(variable, type) SLEG_CONDVAR(variable, type, 0, SL_MAX_VERSION)
|
|
|
|
#define SLEG_REF(variable, type) SLEG_CONDREF(variable, type, 0, SL_MAX_VERSION)
|
2006-03-16 00:20:33 +00:00
|
|
|
#define SLEG_ARR(variable, type) SLEG_CONDARR(variable, type, lengthof(variable), 0, SL_MAX_VERSION)
|
|
|
|
#define SLEG_STR(variable, type) SLEG_CONDSTR(variable, type, lengthof(variable), 0, SL_MAX_VERSION)
|
|
|
|
|
2006-03-17 08:01:54 +00:00
|
|
|
#define SLEG_CONDNULL(length, from, to) {SL_ARR, SLE_FILE_U8 | SLE_VAR_NULL | SLF_CONFIG_NO, length, from, to, (void*)NULL}
|
2006-02-20 19:42:39 +00:00
|
|
|
|
2006-02-23 20:53:30 +00:00
|
|
|
#define SLEG_END() {SL_END, 0, 0, 0, 0, NULL}
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2005-11-22 19:33:29 +00:00
|
|
|
/** Checks if the savegame is below major.minor.
|
|
|
|
*/
|
|
|
|
static inline bool CheckSavegameVersionOldStyle(uint16 major, byte minor)
|
|
|
|
{
|
2006-02-20 19:12:46 +00:00
|
|
|
extern uint16 _sl_version;
|
|
|
|
extern byte _sl_minor_version;
|
2005-11-22 19:33:29 +00:00
|
|
|
return (_sl_version < major) || (_sl_version == major && _sl_minor_version < minor);
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Checks if the savegame is below version.
|
|
|
|
*/
|
|
|
|
static inline bool CheckSavegameVersion(uint16 version)
|
|
|
|
{
|
2006-02-20 19:12:46 +00:00
|
|
|
extern uint16 _sl_version;
|
2005-11-22 19:33:29 +00:00
|
|
|
return _sl_version < version;
|
|
|
|
}
|
|
|
|
|
2006-03-02 00:32:48 +00:00
|
|
|
/** Checks if some version from/to combination falls within the range of the
|
|
|
|
* active savegame version */
|
|
|
|
static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_to)
|
|
|
|
{
|
|
|
|
extern const uint16 SAVEGAME_VERSION;
|
|
|
|
if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION > version_to) return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2006-03-01 20:34:51 +00:00
|
|
|
/* Get the NumberType of a setting. This describes the integer type
|
|
|
|
* as it is represented in memory
|
|
|
|
* @param type VarType holding information about the variable-type
|
|
|
|
* @return return the SLE_VAR_* part of a variable-type description */
|
|
|
|
static inline VarType GetVarMemType(VarType type)
|
|
|
|
{
|
2006-04-22 12:40:25 +00:00
|
|
|
return type & 0xF0; // GB(type, 4, 4) << 4;
|
2006-03-01 20:34:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Get the FileType of a setting. This describes the integer type
|
|
|
|
* as it is represented in a savegame/file
|
|
|
|
* @param type VarType holding information about the variable-type
|
|
|
|
* @param return the SLE_FILE_* part of a variable-type description */
|
|
|
|
static inline VarType GetVarFileType(VarType type)
|
|
|
|
{
|
|
|
|
return type & 0xF; // GB(type, 0, 4);
|
|
|
|
}
|
|
|
|
|
2006-11-21 20:20:30 +00:00
|
|
|
/** Get the address of the variable. Which one to pick depends on the object
|
|
|
|
* pointer. If it is NULL we are dealing with global variables so the address
|
|
|
|
* is taken. If non-null only the offset is stored in the union and we need
|
|
|
|
* to add this to the address of the object */
|
|
|
|
static inline void *GetVariableAddress(const void *object, const SaveLoad *sld)
|
|
|
|
{
|
|
|
|
return (byte*)object + (ptrdiff_t)sld->address;
|
|
|
|
}
|
|
|
|
|
2006-03-01 20:34:51 +00:00
|
|
|
int64 ReadValue(const void *ptr, VarType conv);
|
|
|
|
void WriteValue(void *ptr, VarType conv, int64 val);
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
void SlSetArrayIndex(uint index);
|
2005-01-22 20:23:18 +00:00
|
|
|
int SlIterateArray(void);
|
2006-02-20 19:42:39 +00:00
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
void SlAutolength(AutolengthProc *proc, void *arg);
|
2005-01-22 20:23:18 +00:00
|
|
|
uint SlGetFieldLength(void);
|
2005-05-30 22:16:05 +00:00
|
|
|
void SlSetLength(size_t length);
|
2006-11-21 20:23:57 +00:00
|
|
|
size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld);
|
2006-02-20 19:42:39 +00:00
|
|
|
|
|
|
|
byte SlReadByte(void);
|
2005-05-30 22:16:05 +00:00
|
|
|
void SlWriteByte(byte b);
|
2006-02-20 19:42:39 +00:00
|
|
|
|
|
|
|
void SlGlobList(const SaveLoadGlobVarList *sldg);
|
|
|
|
void SlArray(void *array, uint length, VarType conv);
|
|
|
|
void SlObject(void *object, const SaveLoad *sld);
|
|
|
|
bool SlObjectMember(void *object, const SaveLoad *sld);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2005-09-02 16:05:59 +00:00
|
|
|
void SaveFileStart(void);
|
|
|
|
void SaveFileDone(void);
|
|
|
|
void SaveFileError(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
#endif /* SAVELOAD_H */
|