diff options
author | Max Horn | 2008-09-06 20:34:21 +0000 |
---|---|---|
committer | Max Horn | 2008-09-06 20:34:21 +0000 |
commit | 088a1c0806d808ed12b88efd51a35768b700e8d8 (patch) | |
tree | 903182bb136f12c899f8c103f88185f3c3402b36 /engines/scumm/file.h | |
parent | f8bcb0782b5be91966aac37fbf29e1eba235abe3 (diff) | |
download | scummvm-rg350-088a1c0806d808ed12b88efd51a35768b700e8d8.tar.gz scummvm-rg350-088a1c0806d808ed12b88efd51a35768b700e8d8.tar.bz2 scummvm-rg350-088a1c0806d808ed12b88efd51a35768b700e8d8.zip |
ScummFile: Don't use the File::_ioFailed flag, rather track the io status separately; also, changed eof() -> eos()
svn-id: r34389
Diffstat (limited to 'engines/scumm/file.h')
-rw-r--r-- | engines/scumm/file.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/scumm/file.h b/engines/scumm/file.h index a2695cac59..3a044935a1 100644 --- a/engines/scumm/file.h +++ b/engines/scumm/file.h @@ -39,7 +39,7 @@ public: virtual bool open(const Common::String &filename) = 0; virtual bool openSubFile(const Common::String &filename) = 0; - virtual bool eof() = 0; + virtual bool eos() = 0; virtual uint32 pos() = 0; virtual uint32 size() = 0; virtual void seek(int32 offs, int whence = SEEK_SET) = 0; @@ -51,6 +51,7 @@ private: byte _encbyte; uint32 _subFileStart; uint32 _subFileLen; + bool _myIoFailed; public: ScummFile(); void setEnc(byte value); @@ -61,7 +62,10 @@ public: bool open(const Common::String &filename); bool openSubFile(const Common::String &filename); - bool eof(); + bool ioFailed() const { return _myIoFailed || BaseScummFile::ioFailed(); } + void clearIOFailed() { _myIoFailed = false; BaseScummFile::clearIOFailed(); } + + bool eos(); uint32 pos(); uint32 size(); void seek(int32 offs, int whence = SEEK_SET); @@ -106,7 +110,7 @@ public: bool openSubFile(const Common::String &filename); void close(); - bool eof() { return _stream->eos(); } + bool eos() { return _stream->eos(); } uint32 pos() { return _stream->pos(); } uint32 size() { return _stream->size(); } void seek(int32 offs, int whence = SEEK_SET) { _stream->seek(offs, whence); } |