aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-17 23:19:12 +0200
committerEinar Johan Trøan Sømåen2012-07-17 23:20:52 +0200
commit90024a502a8a0c55aa624089a860b70aea2bf4c6 (patch)
tree9f53243a9f8cdf493dcd2401752fdf45f4a3584e
parent642714dc192d9fddd02dd8fa7790a153f6fd1247 (diff)
downloadscummvm-rg350-90024a502a8a0c55aa624089a860b70aea2bf4c6.tar.gz
scummvm-rg350-90024a502a8a0c55aa624089a860b70aea2bf4c6.tar.bz2
scummvm-rg350-90024a502a8a0c55aa624089a860b70aea2bf4c6.zip
WINTERMUTE: Remove TSeek enum
-rw-r--r--engines/wintermute/Base/file/BFile.h2
-rw-r--r--engines/wintermute/Base/file/BSaveThumbFile.cpp10
-rw-r--r--engines/wintermute/Base/file/BSaveThumbFile.h2
-rw-r--r--engines/wintermute/dctypes.h5
4 files changed, 7 insertions, 12 deletions
diff --git a/engines/wintermute/Base/file/BFile.h b/engines/wintermute/Base/file/BFile.h
index 0a7214f6ba..1ff3c109f8 100644
--- a/engines/wintermute/Base/file/BFile.h
+++ b/engines/wintermute/Base/file/BFile.h
@@ -51,7 +51,7 @@ public:
virtual uint32 getPos() {
return _pos;
};
- virtual ERRORCODE seek(uint32 pos, TSeek origin = SEEK_TO_BEGIN) = 0;
+ 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;
diff --git a/engines/wintermute/Base/file/BSaveThumbFile.cpp b/engines/wintermute/Base/file/BSaveThumbFile.cpp
index a7a844fc9d..266d19b46c 100644
--- a/engines/wintermute/Base/file/BSaveThumbFile.cpp
+++ b/engines/wintermute/Base/file/BSaveThumbFile.cpp
@@ -120,19 +120,19 @@ ERRORCODE CBSaveThumbFile::read(void *buffer, uint32 size) {
//////////////////////////////////////////////////////////////////////////
-ERRORCODE CBSaveThumbFile::seek(uint32 pos, TSeek origin) {
+ERRORCODE CBSaveThumbFile::seek(uint32 pos, int whence) {
if (!_data) return STATUS_FAILED;
uint32 newPos = 0;
- switch (origin) {
- case SEEK_TO_BEGIN:
+ switch (whence) {
+ case SEEK_SET:
newPos = pos;
break;
- case SEEK_TO_END:
+ case SEEK_END:
newPos = _size + pos;
break;
- case SEEK_TO_CURRENT:
+ case SEEK_CUR:
newPos = _pos + pos;
break;
}
diff --git a/engines/wintermute/Base/file/BSaveThumbFile.h b/engines/wintermute/Base/file/BSaveThumbFile.h
index 6540438de3..7ec07824f9 100644
--- a/engines/wintermute/Base/file/BSaveThumbFile.h
+++ b/engines/wintermute/Base/file/BSaveThumbFile.h
@@ -39,7 +39,7 @@ class CBSaveThumbFile : public CBFile {
public:
CBSaveThumbFile(CBGame *Game);
virtual ~CBSaveThumbFile();
- virtual ERRORCODE seek(uint32 pos, TSeek origin = SEEK_TO_BEGIN);
+ 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);
diff --git a/engines/wintermute/dctypes.h b/engines/wintermute/dctypes.h
index 1dde068013..4d56ac1459 100644
--- a/engines/wintermute/dctypes.h
+++ b/engines/wintermute/dctypes.h
@@ -134,11 +134,6 @@ enum TDynamicConstructor {
DYNAMIC_CONSTRUCTOR
};
-enum TSeek {
- SEEK_TO_BEGIN = SEEK_SET,
- SEEK_TO_CURRENT = SEEK_CUR,
- SEEK_TO_END = SEEK_END
-};
enum TVideoMode {
VIDEO_WINDOW,