Turned InSaveFile & OutSaveFile into simple typedefs
svn-id: r33606
This commit is contained in:
parent
c92ee34e45
commit
5f4c9f913f
6 changed files with 16 additions and 18 deletions
|
@ -39,16 +39,14 @@ namespace Common {
|
|||
* That typically means "save games", but also includes things like the
|
||||
* IQ points in Indy3.
|
||||
*/
|
||||
//typedef SeekableReadStream InSaveFile;
|
||||
class InSaveFile : public SeekableReadStream {};
|
||||
typedef SeekableReadStream InSaveFile;
|
||||
|
||||
/**
|
||||
* A class which allows game engines to save game state data.
|
||||
* That typically means "save games", but also includes things like the
|
||||
* IQ points in Indy3.
|
||||
*/
|
||||
//typedef WriteStream OutSaveFile;
|
||||
class OutSaveFile : public WriteStream {};
|
||||
typedef WriteStream OutSaveFile;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
#include "kyra/script.h"
|
||||
|
||||
namespace Common {
|
||||
class InSaveFile;
|
||||
class OutSaveFile;
|
||||
class SeekableReadStream;
|
||||
class WriteStream;
|
||||
} // end of namespace Common
|
||||
|
||||
class KyraMetaEngine;
|
||||
|
@ -299,10 +299,10 @@ protected:
|
|||
kRSHEIoError = 3
|
||||
};
|
||||
|
||||
static kReadSaveHeaderError readSaveHeader(Common::InSaveFile *file, SaveHeader &header);
|
||||
static kReadSaveHeaderError readSaveHeader(Common::SeekableReadStream *file, SaveHeader &header);
|
||||
|
||||
Common::InSaveFile *openSaveForReading(const char *filename, SaveHeader &header);
|
||||
Common::OutSaveFile *openSaveForWriting(const char *filename, const char *saveName) const;
|
||||
Common::SeekableReadStream *openSaveForReading(const char *filename, SaveHeader &header);
|
||||
Common::WriteStream *openSaveForWriting(const char *filename, const char *saveName) const;
|
||||
};
|
||||
|
||||
} // End of namespace Kyra
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "engines/engine.h"
|
||||
|
||||
namespace Common {
|
||||
class InSaveFile;
|
||||
class SeekableReadStream;
|
||||
}
|
||||
|
||||
#if defined(_WIN32_WCE) && (_WIN32_WCE <= 300)
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
void makeGameStateName(int slot, char *buf) const;
|
||||
int getGameStateSlot(const char *filename) const;
|
||||
void findGameStateDescriptions(char descriptions[100][32]);
|
||||
Common::InSaveFile *readGameStateHeader(int slot, GameStateHeader *gsh);
|
||||
Common::SeekableReadStream *readGameStateHeader(int slot, GameStateHeader *gsh);
|
||||
|
||||
enum {
|
||||
SAVESTATE_CUR_VER = 1,
|
||||
|
|
|
@ -595,7 +595,7 @@ bool ScummEngine::loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ScummEngine::saveInfos(Common::OutSaveFile* file) {
|
||||
void ScummEngine::saveInfos(Common::WriteStream* file) {
|
||||
SaveInfoSection section;
|
||||
section.type = MKID_BE('INFO');
|
||||
section.version = INFOSECTION_VERSION;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
namespace Common {
|
||||
class SeekableReadStream;
|
||||
class OutSaveFile;
|
||||
class WriteStream;
|
||||
}
|
||||
|
||||
namespace Scumm {
|
||||
|
@ -125,7 +125,7 @@ struct SaveLoadEntry {
|
|||
|
||||
class Serializer {
|
||||
public:
|
||||
Serializer(Common::SeekableReadStream *in, Common::OutSaveFile *out, uint32 savegameVersion)
|
||||
Serializer(Common::SeekableReadStream *in, Common::WriteStream *out, uint32 savegameVersion)
|
||||
: _loadStream(in), _saveStream(out),
|
||||
_savegameVersion(savegameVersion)
|
||||
{ }
|
||||
|
@ -151,7 +151,7 @@ public:
|
|||
|
||||
protected:
|
||||
Common::SeekableReadStream *_loadStream;
|
||||
Common::OutSaveFile *_saveStream;
|
||||
Common::WriteStream *_saveStream;
|
||||
uint32 _savegameVersion;
|
||||
|
||||
void saveArrayOf(void *b, int len, int datasize, byte filetype);
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace GUI {
|
|||
using GUI::Dialog;
|
||||
namespace Common {
|
||||
class SeekableReadStream;
|
||||
class OutSaveFile;
|
||||
class WriteStream;
|
||||
}
|
||||
|
||||
namespace Scumm {
|
||||
|
@ -637,8 +637,8 @@ public:
|
|||
protected:
|
||||
Graphics::Surface *loadThumbnail(Common::SeekableReadStream *file);
|
||||
bool loadInfos(Common::SeekableReadStream *file, InfoStuff *stuff);
|
||||
void saveThumbnail(Common::OutSaveFile *file);
|
||||
void saveInfos(Common::OutSaveFile* file);
|
||||
void saveThumbnail(Common::WriteStream *file);
|
||||
void saveInfos(Common::WriteStream* file);
|
||||
|
||||
int32 _engineStartTime;
|
||||
int32 _pauseStartTime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue