diff options
author | Sven Hesse | 2008-07-23 02:41:02 +0000 |
---|---|---|
committer | Sven Hesse | 2008-07-23 02:41:02 +0000 |
commit | 5544e180a33a820ca89eae6ac3f7c1ac974c8fc6 (patch) | |
tree | 360d9b01467ec92daf52ce3599e19feac9c236af /engines/gob/saveload.h | |
parent | a5ebc88dbc9d02ddbf96f49f43e448cd4de9caaf (diff) | |
download | scummvm-rg350-5544e180a33a820ca89eae6ac3f7c1ac974c8fc6.tar.gz scummvm-rg350-5544e180a33a820ca89eae6ac3f7c1ac974c8fc6.tar.bz2 scummvm-rg350-5544e180a33a820ca89eae6ac3f7c1ac974c8fc6.zip |
More savegame-endianness fixes :/
svn-id: r33222
Diffstat (limited to 'engines/gob/saveload.h')
-rw-r--r-- | engines/gob/saveload.h | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/engines/gob/saveload.h b/engines/gob/saveload.h index 29f7ee2594..52c3a9b260 100644 --- a/engines/gob/saveload.h +++ b/engines/gob/saveload.h @@ -65,7 +65,7 @@ private: class PlainSave { public: - PlainSave(); + PlainSave(Endianness endianness); ~PlainSave(); bool save(int16 dataVar, int32 size, int32 offset, const char *name, @@ -77,11 +77,14 @@ public: const byte *variables, const byte *variableSizes) const; bool load(int16 dataVar, int32 size, int32 offset, const char *name, byte *variables, byte *variableSizes) const; + +private: + Endianness _endianness; }; class StagedSave { public: - StagedSave(); + StagedSave(Endianness endianness); ~StagedSave(); void addStage(int32 size, bool endianed = true); @@ -114,6 +117,8 @@ private: kModeLoad }; + Endianness _endianness; + Common::Array<Stage> _stages; enum Mode _mode; char *_name; @@ -178,17 +183,19 @@ public: static const char *stripPath(const char *fileName); - static bool fromEndian(byte *buf, const byte *sizes, uint32 count); - static bool toEndian(byte *buf, const byte *sizes, uint32 count); + static bool fromEndian(byte *buf, const byte *sizes, uint32 count, Endianness endianness); + static bool toEndian(byte *buf, const byte *sizes, uint32 count, Endianness endianness); static uint32 read(Common::ReadStream &in, byte *buf, byte *sizes, uint32 count); static uint32 write(Common::WriteStream &out, const byte *buf, const byte *sizes, uint32 count); static bool loadDataEndian(Common::ReadStream &in, - int16 dataVar, uint32 size, byte *variables, byte *variableSizes); + int16 dataVar, uint32 size, + byte *variables, byte *variableSizes, Endianness endianness); static bool saveDataEndian(Common::WriteStream &out, - int16 dataVar, uint32 size, const byte *variables, const byte *variableSizes); + int16 dataVar, uint32 size, + const byte *variables, const byte *variableSizes, Endianness endianness); protected: GobEngine *_vm; @@ -228,8 +235,8 @@ protected: int32 _varSize; TempSprite _tmpSprite; - PlainSave _notes; - StagedSave _save; + PlainSave *_notes; + StagedSave *_save; byte _indexBuffer[600]; bool _hasIndex; @@ -306,8 +313,8 @@ protected: TempSprite _screenshot; TempSprite _tmpSprite; - PlainSave _notes; - StagedSave _save; + PlainSave *_notes; + StagedSave *_save; byte _propBuffer[1000]; byte _indexBuffer[1200]; @@ -370,7 +377,7 @@ protected: int32 _varSize; - StagedSave _save; + StagedSave *_save; byte _propBuffer[1000]; byte _indexBuffer[1200]; |