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 /engines/parallaction | |
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 'engines/parallaction')
-rw-r--r-- | engines/parallaction/disk.h | 6 | ||||
-rw-r--r-- | engines/parallaction/disk_ns.cpp | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 0176260129..30d820c6d2 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -104,10 +104,10 @@ public: Common::String name() const; bool openArchivedFile(const char *name); void closeArchivedFile(); - uint32 size() const; - uint32 pos() const; + int32 size() const; + int32 pos() const; bool eos() const; - void seek(int32 offs, int whence = SEEK_SET); + bool seek(int32 offs, int whence = SEEK_SET); uint32 read(void *dataPtr, uint32 dataSize); }; diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp index 55e6fc5e77..c50373aba1 100644 --- a/engines/parallaction/disk_ns.cpp +++ b/engines/parallaction/disk_ns.cpp @@ -156,11 +156,11 @@ void Archive::closeArchivedFile() { } -uint32 Archive::size() const { +int32 Archive::size() const { return (_file == true ? _fileEndOffset - _fileOffset : 0); } -uint32 Archive::pos() const { +int32 Archive::pos() const { return (_file == true ? _fileCursor - _fileOffset : 0 ); } @@ -168,7 +168,7 @@ bool Archive::eos() const { return (_file == true ? _fileCursor == _fileEndOffset : true ); } -void Archive::seek(int32 offs, int whence) { +bool Archive::seek(int32 offs, int whence) { assert(_file == true && _fileCursor <= _fileEndOffset); switch (whence) { @@ -184,7 +184,7 @@ void Archive::seek(int32 offs, int whence) { } assert(_fileCursor <= _fileEndOffset && _fileCursor >= _fileOffset); - _archive.seek(_fileCursor, SEEK_SET); + return _archive.seek(_fileCursor, SEEK_SET); } uint32 Archive::read(void *dataPtr, uint32 dataSize) { @@ -234,16 +234,16 @@ public: return _input->read(data, dataSize); } - uint32 pos() const { + int32 pos() const { return _input->pos(); } - uint32 size() const { + int32 size() const { return _input->size(); } - void seek(int32 offset, int whence) { - _input->seek(offset, whence); + bool seek(int32 offset, int whence) { + return _input->seek(offset, whence); } }; @@ -798,11 +798,11 @@ public: if (_dispose) delete _stream; } - uint32 size() const { + int32 size() const { return _stream->size(); } - uint32 pos() const { + int32 pos() const { return _stream->pos(); } @@ -810,8 +810,8 @@ public: return _stream->eos(); } - void seek(int32 offs, int whence = SEEK_SET) { - _stream->seek(offs, whence); + bool seek(int32 offs, int whence = SEEK_SET) { + return _stream->seek(offs, whence); } uint32 read(void *dataPtr, uint32 dataSize) { |