diff options
author | Max Horn | 2002-07-04 10:05:40 +0000 |
---|---|---|
committer | Max Horn | 2002-07-04 10:05:40 +0000 |
commit | 87cbab8d9619d43aad5781efdb590f7ea2a1a8bf (patch) | |
tree | 73b08c7a5219103a85e23fc3a0f4a43a58c9e7f0 /saveload.h | |
parent | ed05543011071153084ab054144fe4c3c4b52484 (diff) | |
download | scummvm-rg350-87cbab8d9619d43aad5781efdb590f7ea2a1a8bf.tar.gz scummvm-rg350-87cbab8d9619d43aad5781efdb590f7ea2a1a8bf.tar.bz2 scummvm-rg350-87cbab8d9619d43aad5781efdb590f7ea2a1a8bf.zip |
fixed compilation of imuse.cpp
svn-id: r4454
Diffstat (limited to 'saveload.h')
-rw-r--r-- | saveload.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/saveload.h b/saveload.h index 3076a49626..70253734ac 100644 --- a/saveload.h +++ b/saveload.h @@ -22,6 +22,12 @@ #ifndef SAVELOAD_H #define SAVELOAD_H +struct SaveLoadEntry { + uint32 offs; + uint8 type; + uint8 size; +}; + struct SerializerStream { #ifdef NONSTANDARD_SAVE void *context; @@ -48,4 +54,38 @@ struct SerializerStream { #endif }; +typedef int SerializerSaveReference(void *me, byte type, void *ref); +typedef void *SerializerLoadReference(void *me, byte type, int ref); + +struct Serializer { + SerializerStream _saveLoadStream; + + union { + SerializerSaveReference *_save_ref; + SerializerLoadReference *_load_ref; + void *_saveload_ref; + }; + void *_ref_me; + + bool _saveOrLoad; + + void saveLoadBytes(void *b, int len); + void saveLoadArrayOf(void *b, int len, int datasize, byte filetype); + void saveLoadEntries(void *d, const SaveLoadEntry *sle); + void saveLoadArrayOf(void *b, int num, int datasize, const SaveLoadEntry *sle); + + void saveUint32(uint32 d); + void saveWord(uint16 d); + void saveByte(byte b); + + byte loadByte(); + uint16 loadWord(); + uint32 loadUint32(); + + bool isSaving() { return _saveOrLoad; } + + bool checkEOFLoadStream(); + +}; + #endif |