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.cpp8
-rw-r--r--engines/wintermute/Base/file/BFile.h10
-rw-r--r--engines/wintermute/Base/file/BSaveThumbFile.cpp12
-rw-r--r--engines/wintermute/Base/file/BSaveThumbFile.h8
4 files changed, 19 insertions, 19 deletions
diff --git a/engines/wintermute/Base/file/BFile.cpp b/engines/wintermute/Base/file/BFile.cpp
index 6fa7cb84d6..9da60a11ec 100644
--- a/engines/wintermute/Base/file/BFile.cpp
+++ b/engines/wintermute/Base/file/BFile.cpp
@@ -51,16 +51,16 @@ CBFile::~CBFile() {
//////////////////////////////////////////////////////////////////////////
-bool CBFile::IsEOF() {
+bool CBFile::isEOF() {
return _pos == _size;
}
Common::SeekableReadStream *CBFile::getMemStream() {
uint32 oldPos = getPos();
- Seek(0);
+ seek(0);
byte *data = new byte[getSize()];
- Read(data, getSize());
- Seek(oldPos);
+ read(data, getSize());
+ seek(oldPos);
Common::MemoryReadStream *memStream = new Common::MemoryReadStream(data, getSize(), DisposeAfterUse::YES);
return memStream;
}
diff --git a/engines/wintermute/Base/file/BFile.h b/engines/wintermute/Base/file/BFile.h
index caeac3e14b..16b51a50fc 100644
--- a/engines/wintermute/Base/file/BFile.h
+++ b/engines/wintermute/Base/file/BFile.h
@@ -51,11 +51,11 @@ public:
virtual uint32 getPos() {
return _pos;
};
- virtual HRESULT Seek(uint32 pos, TSeek origin = SEEK_TO_BEGIN) = 0;
- virtual HRESULT Read(void *buffer, uint32 size) = 0;
- virtual HRESULT Close() = 0;
- virtual HRESULT Open(const Common::String &filename) = 0;
- virtual bool IsEOF();
+ virtual HRESULT seek(uint32 pos, TSeek origin = SEEK_TO_BEGIN) = 0;
+ virtual HRESULT read(void *buffer, uint32 size) = 0;
+ virtual HRESULT close() = 0;
+ virtual HRESULT open(const Common::String &filename) = 0;
+ virtual bool isEOF();
CBFile(CBGame *inGame);
virtual ~CBFile();
// Temporary solution to allow usage in ScummVM-code:
diff --git a/engines/wintermute/Base/file/BSaveThumbFile.cpp b/engines/wintermute/Base/file/BSaveThumbFile.cpp
index 5f5278199b..5f70f7636f 100644
--- a/engines/wintermute/Base/file/BSaveThumbFile.cpp
+++ b/engines/wintermute/Base/file/BSaveThumbFile.cpp
@@ -46,13 +46,13 @@ CBSaveThumbFile::CBSaveThumbFile(CBGame *inGame): CBFile(inGame) {
//////////////////////////////////////////////////////////////////////////
CBSaveThumbFile::~CBSaveThumbFile() {
- Close();
+ close();
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSaveThumbFile::Open(const Common::String &filename) {
- Close();
+HRESULT CBSaveThumbFile::open(const Common::String &filename) {
+ close();
if (scumm_strnicmp(filename.c_str(), "savegame:", 9) != 0) return E_FAIL;
@@ -97,7 +97,7 @@ HRESULT CBSaveThumbFile::Open(const Common::String &filename) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSaveThumbFile::Close() {
+HRESULT CBSaveThumbFile::close() {
delete[] _data;
_data = NULL;
@@ -109,7 +109,7 @@ HRESULT CBSaveThumbFile::Close() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSaveThumbFile::Read(void *buffer, uint32 size) {
+HRESULT CBSaveThumbFile::read(void *buffer, uint32 size) {
if (!_data || _pos + size > _size) return E_FAIL;
memcpy(buffer, (byte *)_data + _pos, size);
@@ -120,7 +120,7 @@ HRESULT CBSaveThumbFile::Read(void *buffer, uint32 size) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBSaveThumbFile::Seek(uint32 pos, TSeek origin) {
+HRESULT CBSaveThumbFile::seek(uint32 pos, TSeek origin) {
if (!_data) return E_FAIL;
uint32 newPos = 0;
diff --git a/engines/wintermute/Base/file/BSaveThumbFile.h b/engines/wintermute/Base/file/BSaveThumbFile.h
index 78626eeff4..280a5a1447 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 HRESULT Seek(uint32 Pos, TSeek Origin = SEEK_TO_BEGIN);
- virtual HRESULT Read(void *Buffer, uint32 Size);
- virtual HRESULT Close();
- virtual HRESULT Open(const Common::String &Filename);
+ virtual HRESULT seek(uint32 Pos, TSeek Origin = SEEK_TO_BEGIN);
+ virtual HRESULT read(void *Buffer, uint32 Size);
+ virtual HRESULT close();
+ virtual HRESULT open(const Common::String &Filename);
private:
byte *_data;
};