aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Base/file
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/Base/file')
-rw-r--r--engines/wintermute/Base/file/BFile.h8
-rw-r--r--engines/wintermute/Base/file/BSaveThumbFile.cpp10
-rw-r--r--engines/wintermute/Base/file/BSaveThumbFile.h8
3 files changed, 13 insertions, 13 deletions
diff --git a/engines/wintermute/Base/file/BFile.h b/engines/wintermute/Base/file/BFile.h
index 1ff3c109f8..cbdd0b1ff1 100644
--- a/engines/wintermute/Base/file/BFile.h
+++ b/engines/wintermute/Base/file/BFile.h
@@ -51,10 +51,10 @@ public:
virtual uint32 getPos() {
return _pos;
};
- virtual ERRORCODE seek(uint32 pos, int whence = SEEK_SET) = 0;
- virtual ERRORCODE read(void *buffer, uint32 size) = 0;
- virtual ERRORCODE close() = 0;
- virtual ERRORCODE open(const Common::String &filename) = 0;
+ virtual bool seek(uint32 pos, int whence = SEEK_SET) = 0;
+ virtual bool read(void *buffer, uint32 size) = 0;
+ virtual bool close() = 0;
+ virtual bool open(const Common::String &filename) = 0;
virtual bool isEOF();
CBFile(CBGame *inGame);
virtual ~CBFile();
diff --git a/engines/wintermute/Base/file/BSaveThumbFile.cpp b/engines/wintermute/Base/file/BSaveThumbFile.cpp
index 1784c1f53d..b61c2a586f 100644
--- a/engines/wintermute/Base/file/BSaveThumbFile.cpp
+++ b/engines/wintermute/Base/file/BSaveThumbFile.cpp
@@ -51,7 +51,7 @@ CBSaveThumbFile::~CBSaveThumbFile() {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CBSaveThumbFile::open(const Common::String &filename) {
+bool CBSaveThumbFile::open(const Common::String &filename) {
close();
if (scumm_strnicmp(filename.c_str(), "savegame:", 9) != 0) return STATUS_FAILED;
@@ -82,7 +82,7 @@ ERRORCODE CBSaveThumbFile::open(const Common::String &filename) {
}
_gameRef->_debugAbsolutePathWarning = true;
- ERRORCODE res;
+ bool res;
if (pm->_thumbnailDataSize != 0) {
_data = new byte[pm->_thumbnailDataSize];
@@ -97,7 +97,7 @@ ERRORCODE CBSaveThumbFile::open(const Common::String &filename) {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CBSaveThumbFile::close() {
+bool CBSaveThumbFile::close() {
delete[] _data;
_data = NULL;
@@ -109,7 +109,7 @@ ERRORCODE CBSaveThumbFile::close() {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CBSaveThumbFile::read(void *buffer, uint32 size) {
+bool CBSaveThumbFile::read(void *buffer, uint32 size) {
if (!_data || _pos + size > _size) return STATUS_FAILED;
memcpy(buffer, (byte *)_data + _pos, size);
@@ -120,7 +120,7 @@ ERRORCODE CBSaveThumbFile::read(void *buffer, uint32 size) {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CBSaveThumbFile::seek(uint32 pos, int whence) {
+bool CBSaveThumbFile::seek(uint32 pos, int whence) {
if (!_data) return STATUS_FAILED;
uint32 newPos = 0;
diff --git a/engines/wintermute/Base/file/BSaveThumbFile.h b/engines/wintermute/Base/file/BSaveThumbFile.h
index 7ec07824f9..777a4df903 100644
--- a/engines/wintermute/Base/file/BSaveThumbFile.h
+++ b/engines/wintermute/Base/file/BSaveThumbFile.h
@@ -39,10 +39,10 @@ class CBSaveThumbFile : public CBFile {
public:
CBSaveThumbFile(CBGame *Game);
virtual ~CBSaveThumbFile();
- virtual ERRORCODE seek(uint32 pos, int whence = SEEK_SET);
- virtual ERRORCODE read(void *buffer, uint32 size);
- virtual ERRORCODE close();
- virtual ERRORCODE open(const Common::String &filename);
+ virtual bool seek(uint32 pos, int whence = SEEK_SET);
+ virtual bool read(void *buffer, uint32 size);
+ virtual bool close();
+ virtual bool open(const Common::String &filename);
private:
byte *_data;
};