diff options
-rw-r--r-- | backends/saves/savefile.cpp | 4 | ||||
-rw-r--r-- | common/memstream.h | 2 | ||||
-rw-r--r-- | common/savefile.h | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/backends/saves/savefile.cpp b/backends/saves/savefile.cpp index 5e983472da..e21ea16ad8 100644 --- a/backends/saves/savefile.cpp +++ b/backends/saves/savefile.cpp @@ -50,6 +50,10 @@ uint32 OutSaveFile::write(const void *dataPtr, uint32 dataSize) { return _wrapped->write(dataPtr, dataSize); } +int32 OutSaveFile::pos() const { + return _wrapped->pos(); +} + bool SaveFileManager::copySavefile(const String &oldFilename, const String &newFilename) { InSaveFile *inFile = 0; OutSaveFile *outFile = 0; diff --git a/common/memstream.h b/common/memstream.h index 94b8d1992d..25fdde91c7 100644 --- a/common/memstream.h +++ b/common/memstream.h @@ -286,7 +286,7 @@ public: return dataSize; } - uint32 pos() const { return _pos - _length; } //'read' position in the stream + int32 pos() const { return _pos - _length; } //'read' position in the stream uint32 size() const { return _size; } //that's also 'write' position in the stream, as it's append-only byte *getData() { return _data; } diff --git a/common/savefile.h b/common/savefile.h index d84c9e275a..eb7e6f946e 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -58,6 +58,7 @@ public: virtual void finalize(); virtual bool flush(); virtual uint32 write(const void *dataPtr, uint32 dataSize); + virtual int32 pos() const; }; /** |