diff options
author | Joost Peters | 2003-11-09 21:31:18 +0000 |
---|---|---|
committer | Joost Peters | 2003-11-09 21:31:18 +0000 |
commit | b64c6fcbfc0898f8eb881f551e55d6695cc5dfd7 (patch) | |
tree | 5a536742f1b3ba1dd539e4a34f059b7f76d53eee /queen/resource.h | |
parent | 1b6e9a9b0099774efb1a80baf29275cca1075ebe (diff) | |
download | scummvm-rg350-b64c6fcbfc0898f8eb881f551e55d6695cc5dfd7.tar.gz scummvm-rg350-b64c6fcbfc0898f8eb881f551e55d6695cc5dfd7.tar.bz2 scummvm-rg350-b64c6fcbfc0898f8eb881f551e55d6695cc5dfd7.zip |
Added (quick-)Saving/Loading
svn-id: r11230
Diffstat (limited to 'queen/resource.h')
-rw-r--r-- | queen/resource.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/queen/resource.h b/queen/resource.h index 611c7c63f4..d3e4e20c33 100644 --- a/queen/resource.h +++ b/queen/resource.h @@ -23,6 +23,7 @@ #define QUEEN_RESOURCE_H #include "common/file.h" +#include "common/savefile.h" #include "defs.h" namespace Queen { @@ -62,7 +63,7 @@ struct GameVersion { class Resource { public: - Resource(const Common::String &datafilePath, const char *datafileName); + Resource(const Common::String &datafilePath, const char *datafileName, SaveFileManager *mgr, const char *savePath); ~Resource(void); uint8 *loadFile(const char *filename, uint32 skipBytes = 0, byte *dstBuf = NULL); uint8 *loadFileMalloc(const char *filename, uint32 skipBytes = 0, byte *dstBuf = NULL); @@ -76,6 +77,9 @@ public: File *giveCompressedSound(const char *filename); Language getLanguage(); const char *JASVersion(); + bool writeSave(uint16 slot, const byte *saveData, uint32 size); + bool readSave(uint16 slot, byte *&ptr); + protected: File *_resourceFile; @@ -84,6 +88,7 @@ protected: uint8 _compression; const Common::String _datafilePath; const GameVersion *_gameVersion; + const char *_savePath; uint32 _resourceEntries; ResourceEntry *_resourceTable; static const GameVersion _gameVersions[]; @@ -93,6 +98,8 @@ protected: bool readTableFile(); void readTableCompResource(); static const GameVersion *detectGameVersion(uint32 dataFilesize); + + SaveFileManager *_saveFileManager; }; } // End of namespace Queen |