diff options
author | Max Horn | 2008-09-13 16:51:46 +0000 |
---|---|---|
committer | Max Horn | 2008-09-13 16:51:46 +0000 |
commit | 655ce26b3f09628d9408a4d82efe3a26116999fe (patch) | |
tree | 779a25dbe25c8f916fb385b3dd2d48e0e379d9ec /backends/platform/dc | |
parent | b86a047164b54c20366fcbe21b55bf63f2ced5f4 (diff) | |
download | scummvm-rg350-655ce26b3f09628d9408a4d82efe3a26116999fe.tar.gz scummvm-rg350-655ce26b3f09628d9408a4d82efe3a26116999fe.tar.bz2 scummvm-rg350-655ce26b3f09628d9408a4d82efe3a26116999fe.zip |
Big patch changing the signature of various Stream methods (some ports may need to be slightly tweaked to fix overloading errors/warnings)
svn-id: r34514
Diffstat (limited to 'backends/platform/dc')
-rw-r--r-- | backends/platform/dc/vmsave.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp index 6ab8fc4558..5fe532e1f1 100644 --- a/backends/platform/dc/vmsave.cpp +++ b/backends/platform/dc/vmsave.cpp @@ -271,8 +271,8 @@ private: int _pos, _size; uint32 read(void *buf, uint32 cnt); - void skip(uint32 offset); - void seek(int32 offs, int whence); + bool skip(uint32 offset); + bool seek(int32 offs, int whence); public: InVMSave() @@ -286,8 +286,8 @@ public: } bool eos() const { return _pos >= _size; } - uint32 pos() const { return _pos; } - uint32 size() const { return _size; } + int32 pos() const { return _pos; } + int32 size() const { return _size; } bool readSaveGame(const char *filename) { return ::readSaveGame(buffer, _size, filename); } @@ -378,15 +378,16 @@ uint32 InVMSave::read(void *buf, uint32 cnt) return cnt; } -void InVMSave::skip(uint32 offset) +bool InVMSave::skip(uint32 offset) { int nbyt = offset; if (_pos + nbyt > _size) nbyt = (_size - _pos); _pos += nbyt; + return true; } -void InVMSave::seek(int32 offs, int whence) +bool InVMSave::seek(int32 offs, int whence) { switch(whence) { case SEEK_SET: @@ -403,6 +404,7 @@ void InVMSave::seek(int32 offs, int whence) _pos = 0; else if (_pos > _size) _pos = _size; + return true; } uint32 OutVMSave::write(const void *buf, uint32 cnt) |