mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 01:57:16 +00:00
New method InSaveFile::skip()
svn-id: r17979
This commit is contained in:
parent
9b8d88a113
commit
5702c16c16
@ -31,6 +31,7 @@
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
|
||||
|
||||
const char *SaveFileManager::getSavePath() const {
|
||||
|
||||
#if defined(__PALM_OS__)
|
||||
@ -85,6 +86,10 @@ public:
|
||||
uint32 write(const void *dataPtr, uint32 dataSize) {
|
||||
return ::fwrite(dataPtr, 1, dataSize, fh);
|
||||
}
|
||||
|
||||
void skip(uint32 offset) {
|
||||
::fseek(fh, offset, SEEK_SET);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -128,6 +133,10 @@ public:
|
||||
_ioError = true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void skip(uint32 offset) {
|
||||
::gzseek(fh, offset, SEEK_SET);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -31,23 +31,21 @@
|
||||
* A class which allows game engines to load game state data.
|
||||
* That typically means "save games", but also includes things like the
|
||||
* IQ points in Indy3.
|
||||
*
|
||||
* @todo Add error checking abilities.
|
||||
* @todo Change base class to SeekableReadStream; or alternatively,
|
||||
* add a simple 'skip()' method which would allow skipping
|
||||
* a number of bytes in the savefile.
|
||||
*/
|
||||
class InSaveFile : public Common::ReadStream {
|
||||
public:
|
||||
virtual ~InSaveFile() {}
|
||||
|
||||
/**
|
||||
* Skip over the specified (positive) amount of bytes in the input stream.
|
||||
*/
|
||||
virtual void skip(uint32 offset) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @todo Add error checking abilities.
|
||||
*/
|
||||
class OutSaveFile : public Common::WriteStream {
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user