fixed compilation of imuse.cpp
svn-id: r4454
This commit is contained in:
parent
ed05543011
commit
87cbab8d96
3 changed files with 41 additions and 40 deletions
40
saveload.cpp
40
saveload.cpp
|
@ -35,46 +35,6 @@ struct SaveGameHeader {
|
|||
char name[32];
|
||||
};
|
||||
|
||||
struct SaveLoadEntry {
|
||||
uint32 offs;
|
||||
uint8 type;
|
||||
uint8 size;
|
||||
};
|
||||
|
||||
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();
|
||||
|
||||
};
|
||||
|
||||
// Support for "old" savegames (made with 2501 CVS build)
|
||||
// Can be useful for other ports too :)
|
||||
|
||||
|
|
40
saveload.h
40
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
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "fmopl.h"
|
||||
#include "mididrv.h"
|
||||
#include "imuse.h"
|
||||
#include "saveload.h"
|
||||
|
||||
/*
|
||||
* Some constants
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue