aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-26 02:07:12 +0200
committerEinar Johan Trøan Sømåen2012-06-26 02:07:12 +0200
commitcaa5ee1d89de77f535f285904eb7c576d0397572 (patch)
tree0516797089e676516cd7aa8a7ce770df275ea05a /engines/wintermute
parent95983fa2eabd2c5f507f095d89efb6bbda0d3701 (diff)
downloadscummvm-rg350-caa5ee1d89de77f535f285904eb7c576d0397572.tar.gz
scummvm-rg350-caa5ee1d89de77f535f285904eb7c576d0397572.tar.bz2
scummvm-rg350-caa5ee1d89de77f535f285904eb7c576d0397572.zip
WINTERMUTE: Rename FuncName->funcName in BFileManager
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/Ad/AdActor.cpp4
-rw-r--r--engines/wintermute/Ad/AdEntity.cpp2
-rw-r--r--engines/wintermute/Ad/AdGame.cpp12
-rw-r--r--engines/wintermute/Ad/AdInventoryBox.cpp2
-rw-r--r--engines/wintermute/Ad/AdItem.cpp2
-rw-r--r--engines/wintermute/Ad/AdLayer.cpp2
-rw-r--r--engines/wintermute/Ad/AdRegion.cpp2
-rw-r--r--engines/wintermute/Ad/AdResponseBox.cpp2
-rw-r--r--engines/wintermute/Ad/AdRotLevel.cpp2
-rw-r--r--engines/wintermute/Ad/AdScaleLevel.cpp2
-rw-r--r--engines/wintermute/Ad/AdScene.cpp2
-rw-r--r--engines/wintermute/Ad/AdSentence.cpp4
-rw-r--r--engines/wintermute/Ad/AdSpriteSet.cpp2
-rw-r--r--engines/wintermute/Ad/AdTalkDef.cpp2
-rw-r--r--engines/wintermute/Ad/AdWaypointGroup.cpp2
-rw-r--r--engines/wintermute/Base/BFileManager.cpp84
-rw-r--r--engines/wintermute/Base/BFileManager.h40
-rw-r--r--engines/wintermute/Base/BFont.cpp4
-rw-r--r--engines/wintermute/Base/BFontBitmap.cpp2
-rw-r--r--engines/wintermute/Base/BFontTT.cpp10
-rw-r--r--engines/wintermute/Base/BGame.cpp12
-rw-r--r--engines/wintermute/Base/BImage.cpp4
-rw-r--r--engines/wintermute/Base/BPackage.cpp6
-rw-r--r--engines/wintermute/Base/BPersistMgr.cpp4
-rw-r--r--engines/wintermute/Base/BRegion.cpp2
-rw-r--r--engines/wintermute/Base/BSoundBuffer.cpp10
-rw-r--r--engines/wintermute/Base/BSoundMgr.cpp4
-rw-r--r--engines/wintermute/Base/BSprite.cpp6
-rw-r--r--engines/wintermute/Base/BStringTable.cpp2
-rw-r--r--engines/wintermute/Base/BSurfaceStorage.cpp4
-rw-r--r--engines/wintermute/Base/PartEmitter.cpp4
-rw-r--r--engines/wintermute/Base/file/BPkgFile.cpp2
-rw-r--r--engines/wintermute/Base/scriptables/SXFile.cpp6
-rw-r--r--engines/wintermute/Base/scriptables/ScEngine.cpp4
-rw-r--r--engines/wintermute/UI/UIButton.cpp2
-rw-r--r--engines/wintermute/UI/UIEdit.cpp2
-rw-r--r--engines/wintermute/UI/UIEntity.cpp2
-rw-r--r--engines/wintermute/UI/UIText.cpp2
-rw-r--r--engines/wintermute/UI/UITiledImage.cpp2
-rw-r--r--engines/wintermute/UI/UIWindow.cpp2
-rw-r--r--engines/wintermute/video/VidPlayer.cpp2
-rw-r--r--engines/wintermute/video/VidTheoraPlayer.cpp4
42 files changed, 136 insertions, 136 deletions
diff --git a/engines/wintermute/Ad/AdActor.cpp b/engines/wintermute/Ad/AdActor.cpp
index b2686245a6..f560bf9049 100644
--- a/engines/wintermute/Ad/AdActor.cpp
+++ b/engines/wintermute/Ad/AdActor.cpp
@@ -124,7 +124,7 @@ CAdActor::~CAdActor() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdActor::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdActor::LoadFile failed for file '%s'", Filename);
return E_FAIL;
@@ -1268,7 +1268,7 @@ HRESULT CAdActor::MergeAnims(const char *AnimsFilename) {
TOKEN_TABLE_END
- byte *FileBuffer = Game->_fileManager->ReadWholeFile(AnimsFilename);
+ byte *FileBuffer = Game->_fileManager->readWholeFile(AnimsFilename);
if (FileBuffer == NULL) {
Game->LOG(0, "CAdActor::MergeAnims failed for file '%s'", AnimsFilename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdEntity.cpp b/engines/wintermute/Ad/AdEntity.cpp
index 64a9531678..8b1cd0853d 100644
--- a/engines/wintermute/Ad/AdEntity.cpp
+++ b/engines/wintermute/Ad/AdEntity.cpp
@@ -85,7 +85,7 @@ CAdEntity::~CAdEntity() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdEntity::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdEntity::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp
index 5e1af7fc77..2467a47e9f 100644
--- a/engines/wintermute/Ad/AdGame.cpp
+++ b/engines/wintermute/Ad/AdGame.cpp
@@ -1115,7 +1115,7 @@ HRESULT CAdGame::showCursor() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdGame::LoadFile(const char *Filename) {
- byte *Buffer = _fileManager->ReadWholeFile(Filename);
+ byte *Buffer = _fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdGame::LoadFile failed for file '%s'", Filename);
return E_FAIL;
@@ -1385,7 +1385,7 @@ HRESULT CAdGame::GetVersion(byte *VerMajor, byte *VerMinor, byte *ExtMajor, byt
//////////////////////////////////////////////////////////////////////////
HRESULT CAdGame::LoadItemsFile(const char *Filename, bool Merge) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdGame::LoadItemsFile failed for file '%s'", Filename);
return E_FAIL;
@@ -1919,16 +1919,16 @@ char *CAdGame::FindSpeechFile(char *StringID) {
for (int i = 0; i < _speechDirs.GetSize(); i++) {
sprintf(Ret, "%s%s.ogg", _speechDirs[i], StringID);
- Common::SeekableReadStream *File = _fileManager->OpenFile(Ret);
+ Common::SeekableReadStream *File = _fileManager->openFile(Ret);
if (File) {
- _fileManager->CloseFile(File);
+ _fileManager->closeFile(File);
return Ret;
}
sprintf(Ret, "%s%s.wav", _speechDirs[i], StringID);
- File = _fileManager->OpenFile(Ret);
+ File = _fileManager->openFile(Ret);
if (File) {
- _fileManager->CloseFile(File);
+ _fileManager->closeFile(File);
return Ret;
}
}
diff --git a/engines/wintermute/Ad/AdInventoryBox.cpp b/engines/wintermute/Ad/AdInventoryBox.cpp
index ee3e9dedfe..55214f51ce 100644
--- a/engines/wintermute/Ad/AdInventoryBox.cpp
+++ b/engines/wintermute/Ad/AdInventoryBox.cpp
@@ -155,7 +155,7 @@ HRESULT CAdInventoryBox::display() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdInventoryBox::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdInventoryBox::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdItem.cpp b/engines/wintermute/Ad/AdItem.cpp
index 2885623454..31bc3c7644 100644
--- a/engines/wintermute/Ad/AdItem.cpp
+++ b/engines/wintermute/Ad/AdItem.cpp
@@ -85,7 +85,7 @@ CAdItem::~CAdItem() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdItem::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdItem::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdLayer.cpp b/engines/wintermute/Ad/AdLayer.cpp
index 45c6678188..c5d24898cd 100644
--- a/engines/wintermute/Ad/AdLayer.cpp
+++ b/engines/wintermute/Ad/AdLayer.cpp
@@ -62,7 +62,7 @@ CAdLayer::~CAdLayer() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdLayer::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdLayer::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdRegion.cpp b/engines/wintermute/Ad/AdRegion.cpp
index c8b65a6691..df124e7692 100644
--- a/engines/wintermute/Ad/AdRegion.cpp
+++ b/engines/wintermute/Ad/AdRegion.cpp
@@ -55,7 +55,7 @@ CAdRegion::~CAdRegion() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdRegion::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdRegion::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdResponseBox.cpp b/engines/wintermute/Ad/AdResponseBox.cpp
index 42f1038ffc..d62324e4b1 100644
--- a/engines/wintermute/Ad/AdResponseBox.cpp
+++ b/engines/wintermute/Ad/AdResponseBox.cpp
@@ -188,7 +188,7 @@ HRESULT CAdResponseBox::CreateButtons() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdResponseBox::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdResponseBox::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdRotLevel.cpp b/engines/wintermute/Ad/AdRotLevel.cpp
index b1256c9f27..4f20973958 100644
--- a/engines/wintermute/Ad/AdRotLevel.cpp
+++ b/engines/wintermute/Ad/AdRotLevel.cpp
@@ -54,7 +54,7 @@ CAdRotLevel::~CAdRotLevel() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdRotLevel::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdRotLevel::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdScaleLevel.cpp b/engines/wintermute/Ad/AdScaleLevel.cpp
index 8e03781382..68cccac35a 100644
--- a/engines/wintermute/Ad/AdScaleLevel.cpp
+++ b/engines/wintermute/Ad/AdScaleLevel.cpp
@@ -52,7 +52,7 @@ CAdScaleLevel::~CAdScaleLevel() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdScaleLevel::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdScaleLevel::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdScene.cpp b/engines/wintermute/Ad/AdScene.cpp
index 206bf67aa3..098ea3829d 100644
--- a/engines/wintermute/Ad/AdScene.cpp
+++ b/engines/wintermute/Ad/AdScene.cpp
@@ -504,7 +504,7 @@ HRESULT CAdScene::InitLoop() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdScene::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdScene::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdSentence.cpp b/engines/wintermute/Ad/AdSentence.cpp
index feaeec714d..d7bf67d7af 100644
--- a/engines/wintermute/Ad/AdSentence.cpp
+++ b/engines/wintermute/Ad/AdSentence.cpp
@@ -251,9 +251,9 @@ HRESULT CAdSentence::SetupTalkFile(const char *SoundFilename) {
AnsiString talkDefFileName = PathUtil::Combine(path, name + ".talk");
- Common::SeekableReadStream *file = Game->_fileManager->OpenFile(talkDefFileName.c_str());
+ Common::SeekableReadStream *file = Game->_fileManager->openFile(talkDefFileName.c_str());
if (file) {
- Game->_fileManager->CloseFile(file);
+ Game->_fileManager->closeFile(file);
} else return S_OK; // no talk def file found
diff --git a/engines/wintermute/Ad/AdSpriteSet.cpp b/engines/wintermute/Ad/AdSpriteSet.cpp
index 3cd0b7aff0..62787b6c68 100644
--- a/engines/wintermute/Ad/AdSpriteSet.cpp
+++ b/engines/wintermute/Ad/AdSpriteSet.cpp
@@ -59,7 +59,7 @@ CAdSpriteSet::~CAdSpriteSet() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdSpriteSet::LoadFile(const char *Filename, int LifeTime, TSpriteCacheType CacheType) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdSpriteSet::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdTalkDef.cpp b/engines/wintermute/Ad/AdTalkDef.cpp
index 41ea23ff38..8aa3d3523f 100644
--- a/engines/wintermute/Ad/AdTalkDef.cpp
+++ b/engines/wintermute/Ad/AdTalkDef.cpp
@@ -70,7 +70,7 @@ CAdTalkDef::~CAdTalkDef() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdTalkDef::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdTalkDef::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Ad/AdWaypointGroup.cpp b/engines/wintermute/Ad/AdWaypointGroup.cpp
index b8ee1be55c..dc0059cf40 100644
--- a/engines/wintermute/Ad/AdWaypointGroup.cpp
+++ b/engines/wintermute/Ad/AdWaypointGroup.cpp
@@ -65,7 +65,7 @@ void CAdWaypointGroup::cleanup() {
//////////////////////////////////////////////////////////////////////////
HRESULT CAdWaypointGroup::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CAdWaypointGroup::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Base/BFileManager.cpp b/engines/wintermute/Base/BFileManager.cpp
index 448c1d684f..5ad65e8fe1 100644
--- a/engines/wintermute/Base/BFileManager.cpp
+++ b/engines/wintermute/Base/BFileManager.cpp
@@ -63,8 +63,8 @@ namespace WinterMute {
CBFileManager::CBFileManager(CBGame *inGame): CBBase(inGame) {
_basePath = NULL;
- InitPaths();
- RegisterPackages();
+ initPaths();
+ registerPackages();
}
@@ -118,11 +118,11 @@ HRESULT CBFileManager::cleanup() {
#define MAX_FILE_SIZE 10000000
//////////////////////////////////////////////////////////////////////
-byte *CBFileManager::ReadWholeFile(const Common::String &Filename, uint32 *Size, bool MustExist) {
+byte *CBFileManager::readWholeFile(const Common::String &Filename, uint32 *Size, bool MustExist) {
byte *buffer = NULL;
- Common::SeekableReadStream *File = OpenFile(Filename);
+ Common::SeekableReadStream *File = openFile(Filename);
if (!File) {
if (MustExist) Game->LOG(0, "Error opening file '%s'", Filename.c_str());
return NULL;
@@ -140,20 +140,20 @@ byte *CBFileManager::ReadWholeFile(const Common::String &Filename, uint32 *Size,
buffer = new byte[File->size() + 1];
if (buffer == NULL) {
Game->LOG(0, "Error allocating buffer for file '%s' (%d bytes)", Filename.c_str(), File->size() + 1);
- CloseFile(File);
+ closeFile(File);
return NULL;
}
if (File->read(buffer, File->size()) != File->size()) {
Game->LOG(0, "Error reading file '%s'", Filename.c_str());
- CloseFile(File);
+ closeFile(File);
delete [] buffer;
return NULL;
};
buffer[File->size()] = '\0';
if (Size != NULL) *Size = File->size();
- CloseFile(File);
+ closeFile(File);
return buffer;
}
@@ -165,7 +165,7 @@ Common::SeekableReadStream *CBFileManager::loadSaveGame(const Common::String &fi
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::SaveFile(const Common::String &Filename, byte *Buffer, uint32 BufferSize, bool Compressed, byte *PrefixBuffer, uint32 PrefixSize) {
+HRESULT CBFileManager::saveFile(const Common::String &Filename, byte *Buffer, uint32 BufferSize, bool Compressed, byte *PrefixBuffer, uint32 PrefixSize) {
// TODO
warning("Implement SaveFile");
@@ -228,7 +228,7 @@ HRESULT CBFileManager::SaveFile(const Common::String &Filename, byte *Buffer, ui
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::RequestCD(int CD, char *PackageFile, char *Filename) {
+HRESULT CBFileManager::requestCD(int CD, char *PackageFile, char *Filename) {
// unmount all non-local packages
for (int i = 0; i < _packages.GetSize(); i++) {
if (_packages[i]->_cD > 0) _packages[i]->close();
@@ -240,7 +240,7 @@ HRESULT CBFileManager::RequestCD(int CD, char *PackageFile, char *Filename) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::AddPath(TPathType Type, const Common::String &Path) {
+HRESULT CBFileManager::addPath(TPathType Type, const Common::String &Path) {
if (Path.c_str() == NULL || strlen(Path.c_str()) < 1) return E_FAIL;
bool slashed = (Path[Path.size() - 1] == '\\' || Path[Path.size() - 1] == '/');
@@ -265,7 +265,7 @@ HRESULT CBFileManager::AddPath(TPathType Type, const Common::String &Path) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::ReloadPaths() {
+HRESULT CBFileManager::reloadPaths() {
// delete registered paths
for (int i = 0; i < _singlePaths.GetSize(); i++)
delete [] _singlePaths[i];
@@ -275,14 +275,14 @@ HRESULT CBFileManager::ReloadPaths() {
delete [] _packagePaths[i];
_packagePaths.RemoveAll();
- return InitPaths();
+ return initPaths();
}
#define TEMP_BUFFER_SIZE 32768
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::InitPaths() {
- RestoreCurrentDir();
+HRESULT CBFileManager::initPaths() {
+ restoreCurrentDir();
AnsiString pathList;
int numPaths;
@@ -294,16 +294,16 @@ HRESULT CBFileManager::InitPaths() {
for (int i = 0; i < numPaths; i++) {
char *path = CBUtils::StrEntry(i, pathList.c_str(), ';');
if (path && strlen(path) > 0) {
- AddPath(PATH_SINGLE, path);
+ addPath(PATH_SINGLE, path);
}
delete[] path;
path = NULL;
}
- AddPath(PATH_SINGLE, ".\\");
+ addPath(PATH_SINGLE, ".\\");
// package files paths
- AddPath(PATH_PACKAGE, "./");
+ addPath(PATH_PACKAGE, "./");
/*#ifdef __APPLE__
// search .app path and Resources dir in the bundle
@@ -338,20 +338,20 @@ HRESULT CBFileManager::InitPaths() {
for (int i = 0; i < numPaths; i++) {
char *path = CBUtils::StrEntry(i, pathList.c_str(), ';');
if (path && strlen(path) > 0) {
- AddPath(PATH_PACKAGE, path);
+ addPath(PATH_PACKAGE, path);
}
delete[] path;
path = NULL;
}
- AddPath(PATH_PACKAGE, "data");
+ addPath(PATH_PACKAGE, "data");
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::RegisterPackages() {
- RestoreCurrentDir();
+HRESULT CBFileManager::registerPackages() {
+ restoreCurrentDir();
Game->LOG(0, "Scanning packages...");
warning("Scanning packages");
@@ -360,7 +360,7 @@ HRESULT CBFileManager::RegisterPackages() {
SearchMan.listMatchingMembers(files, "*.dcp");
for (Common::ArchiveMemberList::iterator it = files.begin(); it != files.end(); it++) {
- RegisterPackage((*it)->getName().c_str());
+ registerPackage((*it)->getName().c_str());
}
#if 0
AnsiString extension = AnsiString(PACKAGE_EXTENSION);
@@ -398,7 +398,7 @@ HRESULT CBFileManager::RegisterPackages() {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::RegisterPackage(const Common::String &Filename , bool SearchSignature) {
+HRESULT CBFileManager::registerPackage(const Common::String &Filename , bool SearchSignature) {
// FILE *f = fopen(Filename, "rb");
Common::File *package = new Common::File();
package->open(Filename);
@@ -412,7 +412,7 @@ HRESULT CBFileManager::RegisterPackage(const Common::String &Filename , bool Sea
if (SearchSignature) {
uint32 Offset;
- if (!FindPackageSignature(package, &Offset)) {
+ if (!findPackageSignature(package, &Offset)) {
delete package;
return S_OK;
} else {
@@ -524,7 +524,7 @@ HRESULT CBFileManager::RegisterPackage(const Common::String &Filename , bool Sea
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::RegisterPackage(const char *Path, const char *Name, bool SearchSignature) {
+HRESULT CBFileManager::registerPackage(const char *Path, const char *Name, bool SearchSignature) {
// TODO
error("Implement RegisterPackage, this is the old one");
#if 0
@@ -657,7 +657,7 @@ HRESULT CBFileManager::RegisterPackage(const char *Path, const char *Name, bool
}
//////////////////////////////////////////////////////////////////////////
-bool CBFileManager::IsValidPackage(const AnsiString &fileName) const {
+bool CBFileManager::isValidPackage(const AnsiString &fileName) const {
AnsiString plainName = PathUtil::GetFileNameWithoutExtension(fileName);
// check for device-type specific packages
@@ -668,7 +668,7 @@ bool CBFileManager::IsValidPackage(const AnsiString &fileName) const {
}
//////////////////////////////////////////////////////////////////////////
-Common::File *CBFileManager::OpenPackage(const Common::String &Name) {
+Common::File *CBFileManager::openPackage(const Common::String &Name) {
//TODO: Is it really necessary to do this when we have the ScummVM-system?
//RestoreCurrentDir();
@@ -696,8 +696,8 @@ Common::File *CBFileManager::OpenPackage(const Common::String &Name) {
//////////////////////////////////////////////////////////////////////////
-Common::File *CBFileManager::OpenSingleFile(const Common::String &Name) {
- RestoreCurrentDir();
+Common::File *CBFileManager::openSingleFile(const Common::String &Name) {
+ restoreCurrentDir();
Common::File *ret = NULL;
char Filename[MAX_PATH];
@@ -721,8 +721,8 @@ Common::File *CBFileManager::OpenSingleFile(const Common::String &Name) {
//////////////////////////////////////////////////////////////////////////
-bool CBFileManager::GetFullPath(const Common::String &filename, char *Fullname) {
- RestoreCurrentDir();
+bool CBFileManager::getFullPath(const Common::String &filename, char *Fullname) {
+ restoreCurrentDir();
Common::File f;
bool found = false;
@@ -751,7 +751,7 @@ bool CBFileManager::GetFullPath(const Common::String &filename, char *Fullname)
//////////////////////////////////////////////////////////////////////////
-CBFileEntry *CBFileManager::GetPackageEntry(const Common::String &Filename) {
+CBFileEntry *CBFileManager::getPackageEntry(const Common::String &Filename) {
char *upc_name = new char[strlen(Filename.c_str()) + 1];
strcpy(upc_name, Filename.c_str());
CBPlatform::strupr(upc_name);
@@ -767,7 +767,7 @@ CBFileEntry *CBFileManager::GetPackageEntry(const Common::String &Filename) {
//////////////////////////////////////////////////////////////////////////
-Common::SeekableReadStream *CBFileManager::OpenFile(const Common::String &filename, bool AbsPathWarning, bool keepTrackOf) {
+Common::SeekableReadStream *CBFileManager::openFile(const Common::String &filename, bool AbsPathWarning, bool keepTrackOf) {
if (strcmp(filename.c_str(), "") == 0) return NULL;
//Game->LOG(0, "open file: %s", Filename);
/*#ifdef __WIN32__
@@ -780,14 +780,14 @@ Common::SeekableReadStream *CBFileManager::OpenFile(const Common::String &filena
}
#endif*/
- Common::SeekableReadStream *File = OpenFileRaw(filename);
+ Common::SeekableReadStream *File = openFileRaw(filename);
if (File && keepTrackOf) _openFiles.Add(File);
return File;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::CloseFile(Common::SeekableReadStream *File) {
+HRESULT CBFileManager::closeFile(Common::SeekableReadStream *File) {
for (int i = 0; i < _openFiles.GetSize(); i++) {
if (_openFiles[i] == File) {
delete _openFiles[i];
@@ -800,8 +800,8 @@ HRESULT CBFileManager::CloseFile(Common::SeekableReadStream *File) {
//////////////////////////////////////////////////////////////////////////
-Common::SeekableReadStream *CBFileManager::OpenFileRaw(const Common::String &Filename) {
- RestoreCurrentDir();
+Common::SeekableReadStream *CBFileManager::openFileRaw(const Common::String &Filename) {
+ restoreCurrentDir();
if (scumm_strnicmp(Filename.c_str(), "savegame:", 9) == 0) {
CBSaveThumbFile *SaveThumbFile = new CBSaveThumbFile(Game);
@@ -829,7 +829,7 @@ Common::SeekableReadStream *CBFileManager::OpenFileRaw(const Common::String &Fil
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::RestoreCurrentDir() {
+HRESULT CBFileManager::restoreCurrentDir() {
if (!_basePath) return S_OK;
else {
/*if (!chdir(_basePath)) return S_OK;
@@ -841,7 +841,7 @@ HRESULT CBFileManager::RestoreCurrentDir() {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBFileManager::SetBasePath(const Common::String &Path) {
+HRESULT CBFileManager::setBasePath(const Common::String &Path) {
cleanup();
if (Path.c_str()) {
@@ -849,15 +849,15 @@ HRESULT CBFileManager::SetBasePath(const Common::String &Path) {
strcpy(_basePath, Path.c_str());
}
- InitPaths();
- RegisterPackages();
+ initPaths();
+ registerPackages();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-bool CBFileManager::FindPackageSignature(Common::File *f, uint32 *Offset) {
+bool CBFileManager::findPackageSignature(Common::File *f, uint32 *Offset) {
byte buf[32768];
byte Signature[8];
diff --git a/engines/wintermute/Base/BFileManager.h b/engines/wintermute/Base/BFileManager.h
index 173bf4c570..fdeb9b732d 100644
--- a/engines/wintermute/Base/BFileManager.h
+++ b/engines/wintermute/Base/BFileManager.h
@@ -42,29 +42,29 @@ namespace WinterMute {
class CBFile;
class CBFileManager: CBBase {
public:
- bool FindPackageSignature(Common::File *f, uint32 *Offset);
+ bool findPackageSignature(Common::File *f, uint32 *Offset);
HRESULT cleanup();
- HRESULT SetBasePath(const Common::String &path);
- HRESULT RestoreCurrentDir();
+ HRESULT setBasePath(const Common::String &path);
+ HRESULT restoreCurrentDir();
char *_basePath;
- bool GetFullPath(const Common::String &filename, char *fullname);
- Common::SeekableReadStream *OpenFileRaw(const Common::String &filename);
- HRESULT CloseFile(Common::SeekableReadStream *File);
- Common::SeekableReadStream *OpenFile(const Common::String &filename, bool absPathWarning = true, bool keepTrackOf = true);
- CBFileEntry *GetPackageEntry(const Common::String &filename);
- Common::File *OpenSingleFile(const Common::String &name);
- Common::File *OpenPackage(const Common::String &name);
- HRESULT RegisterPackages();
- HRESULT InitPaths();
- HRESULT ReloadPaths();
+ bool getFullPath(const Common::String &filename, char *fullname);
+ Common::SeekableReadStream *openFileRaw(const Common::String &filename);
+ HRESULT closeFile(Common::SeekableReadStream *File);
+ Common::SeekableReadStream *openFile(const Common::String &filename, bool absPathWarning = true, bool keepTrackOf = true);
+ CBFileEntry *getPackageEntry(const Common::String &filename);
+ Common::File *openSingleFile(const Common::String &name);
+ Common::File *openPackage(const Common::String &name);
+ HRESULT registerPackages();
+ HRESULT initPaths();
+ HRESULT reloadPaths();
typedef enum {
PATH_PACKAGE, PATH_SINGLE
} TPathType;
- HRESULT AddPath(TPathType Type, const Common::String &path);
- HRESULT RequestCD(int CD, char *PackageFile, char *Filename);
+ HRESULT addPath(TPathType Type, const Common::String &path);
+ HRESULT requestCD(int CD, char *PackageFile, char *Filename);
Common::SeekableReadStream *loadSaveGame(const Common::String &filename);
- HRESULT SaveFile(const Common::String &filename, byte *Buffer, uint32 BufferSize, bool Compressed = false, byte *PrefixBuffer = NULL, uint32 PrefixSize = 0);
- byte *ReadWholeFile(const Common::String &filename, uint32 *Size = NULL, bool MustExist = true);
+ HRESULT saveFile(const Common::String &filename, byte *Buffer, uint32 BufferSize, bool Compressed = false, byte *PrefixBuffer = NULL, uint32 PrefixSize = 0);
+ byte *readWholeFile(const Common::String &filename, uint32 *Size = NULL, bool MustExist = true);
CBFileManager(CBGame *inGame = NULL);
virtual ~CBFileManager();
CBArray<char *, char *> _singlePaths;
@@ -74,10 +74,10 @@ public:
Common::HashMap<Common::String, CBFileEntry *> _files;
private:
- HRESULT RegisterPackage(const char *Path, const char *Name, bool SearchSignature = false);
- HRESULT RegisterPackage(const Common::String &filename, bool SearchSignature = false);
+ HRESULT registerPackage(const char *Path, const char *Name, bool SearchSignature = false);
+ HRESULT registerPackage(const Common::String &filename, bool SearchSignature = false);
Common::HashMap<Common::String, CBFileEntry *>::iterator _filesIter;
- bool IsValidPackage(const AnsiString &fileName) const;
+ bool isValidPackage(const AnsiString &fileName) const;
};
diff --git a/engines/wintermute/Base/BFont.cpp b/engines/wintermute/Base/BFont.cpp
index 28317b00ce..5a6513d7d3 100644
--- a/engines/wintermute/Base/BFont.cpp
+++ b/engines/wintermute/Base/BFont.cpp
@@ -73,7 +73,7 @@ int CBFont::GetTextWidth(byte *text, int MaxLenght) {
//////////////////////////////////////////////////////////////////////
HRESULT CBFont::LoadFile(const char * Filename)
{
- BYTE* Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ BYTE* Buffer = Game->_fileManager->readWholeFile(Filename);
if(Buffer==NULL){
Game->LOG(0, "CBFont::LoadFile failed for file '%s'", Filename);
return E_FAIL;
@@ -187,7 +187,7 @@ bool CBFont::IsTrueType(CBGame *Game, const char *Filename) {
TOKEN_TABLE_END
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) return false;
byte *WorkBuffer = Buffer;
diff --git a/engines/wintermute/Base/BFontBitmap.cpp b/engines/wintermute/Base/BFontBitmap.cpp
index 8650a077bd..e88a6f0589 100644
--- a/engines/wintermute/Base/BFontBitmap.cpp
+++ b/engines/wintermute/Base/BFontBitmap.cpp
@@ -246,7 +246,7 @@ void CBFontBitmap::DrawChar(byte c, int x, int y) {
//////////////////////////////////////////////////////////////////////
HRESULT CBFontBitmap::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CBFontBitmap::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Base/BFontTT.cpp b/engines/wintermute/Base/BFontTT.cpp
index 81dca9d293..fb3b6e3fb1 100644
--- a/engines/wintermute/Base/BFontTT.cpp
+++ b/engines/wintermute/Base/BFontTT.cpp
@@ -405,7 +405,7 @@ int CBFontTT::GetLetterHeight() {
//////////////////////////////////////////////////////////////////////
HRESULT CBFontTT::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CBFontTT::LoadFile failed for file '%s'", Filename);
return E_FAIL;
@@ -637,11 +637,11 @@ void CBFontTT::AfterLoad() {
HRESULT CBFontTT::InitFont() {
if (!_fontFile) return E_FAIL;
- Common::SeekableReadStream *file = Game->_fileManager->OpenFile(_fontFile);
+ Common::SeekableReadStream *file = Game->_fileManager->openFile(_fontFile);
if (!file) {
// the requested font file is not in wme file space; try loading a system font
AnsiString fontFileName = PathUtil::Combine(CBPlatform::GetSystemFontPath(), PathUtil::GetFileName(_fontFile));
- file = Game->_fileManager->OpenFile(fontFileName.c_str(), false);
+ file = Game->_fileManager->openFile(fontFileName.c_str(), false);
if (!file) {
Game->LOG(0, "Error loading TrueType font '%s'", _fontFile);
//return E_FAIL;
@@ -682,7 +682,7 @@ HRESULT CBFontTT::InitFont() {
error = FT_Open_Face(Game->_fontStorage->GetFTLibrary(), &args, 0, &_fTFace);
if (error) {
SAFE_DELETE_ARRAY(_fTStream);
- Game->_fileManager->CloseFile(file);
+ Game->_fileManager->closeFile(file);
return E_FAIL;
}
@@ -745,7 +745,7 @@ void CBFontTT::FTCloseProc(FT_Stream stream) {
CBGame *Game = f->Game;
- Game->_fileManager->CloseFile(f);
+ Game->_fileManager->closeFile(f);
stream->descriptor.pointer = NULL;
}*/
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp
index 1fdf555731..12398c109c 100644
--- a/engines/wintermute/Base/BGame.cpp
+++ b/engines/wintermute/Base/BGame.cpp
@@ -688,7 +688,7 @@ void CBGame::GetOffset(int *OffsetX, int *OffsetY) {
//////////////////////////////////////////////////////////////////////////
HRESULT CBGame::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CBGame::LoadFile failed for file '%s'", Filename);
return E_FAIL;
@@ -1728,10 +1728,10 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS
Stack->CorrectParams(1);
const char *Filename = Stack->Pop()->GetString();
- Common::SeekableReadStream *File = _fileManager->OpenFile(Filename, false);
+ Common::SeekableReadStream *File = _fileManager->openFile(Filename, false);
if (!File) Stack->PushBool(false);
else {
- _fileManager->CloseFile(File);
+ _fileManager->closeFile(File);
Stack->PushBool(true);
}
return S_OK;
@@ -2082,7 +2082,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS
const char *Filename = Stack->Pop()->GetString();
bool AsHex = Stack->Pop()->GetBool(false);
- Common::SeekableReadStream *File = _fileManager->OpenFile(Filename, false);
+ Common::SeekableReadStream *File = _fileManager->openFile(Filename, false);
if (File) {
crc remainder = crc_initialize();
byte Buf[1024];
@@ -2105,7 +2105,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS
} else
Stack->PushInt(checksum);
- _fileManager->CloseFile(File);
+ _fileManager->closeFile(File);
File = NULL;
} else Stack->PushNULL();
@@ -3515,7 +3515,7 @@ HRESULT CBGame::LoadSettings(const char *Filename) {
TOKEN_TABLE_END
- byte *OrigBuffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *OrigBuffer = Game->_fileManager->readWholeFile(Filename);
if (OrigBuffer == NULL) {
Game->LOG(0, "CBGame::LoadSettings failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Base/BImage.cpp b/engines/wintermute/Base/BImage.cpp
index eadf845109..cbe134c7c6 100644
--- a/engines/wintermute/Base/BImage.cpp
+++ b/engines/wintermute/Base/BImage.cpp
@@ -84,13 +84,13 @@ HRESULT CBImage::loadFile(const Common::String &filename) {
error("CBImage::loadFile : Unsupported fileformat %s", filename.c_str());
}
- Common::SeekableReadStream *file = Game->_fileManager->OpenFile(filename.c_str());
+ Common::SeekableReadStream *file = Game->_fileManager->openFile(filename.c_str());
if (!file) return E_FAIL;
_decoder->loadStream(*file);
_surface = _decoder->getSurface();
_palette = _decoder->getPalette();
- Game->_fileManager->CloseFile(file);
+ Game->_fileManager->closeFile(file);
return S_OK;
}
diff --git a/engines/wintermute/Base/BPackage.cpp b/engines/wintermute/Base/BPackage.cpp
index 9f68bfa2d0..69ae1c6eff 100644
--- a/engines/wintermute/Base/BPackage.cpp
+++ b/engines/wintermute/Base/BPackage.cpp
@@ -87,10 +87,10 @@ HRESULT CBPackage::read(Common::SeekableReadStream *file, uint32 offset, byte *b
//////////////////////////////////////////////////////////////////////////
Common::SeekableReadStream *CBPackage::GetFilePointer() {
- Common::File *file = Game->_fileManager->OpenPackage(_name);
+ Common::File *file = Game->_fileManager->openPackage(_name);
if (!file) {
- Game->_fileManager->RequestCD(_cD, _name, "");
- file = Game->_fileManager->OpenPackage(_name);
+ Game->_fileManager->requestCD(_cD, _name, "");
+ file = Game->_fileManager->openPackage(_name);
}
return file;
}
diff --git a/engines/wintermute/Base/BPersistMgr.cpp b/engines/wintermute/Base/BPersistMgr.cpp
index 64cbb76277..6db1fb5cd5 100644
--- a/engines/wintermute/Base/BPersistMgr.cpp
+++ b/engines/wintermute/Base/BPersistMgr.cpp
@@ -249,7 +249,7 @@ HRESULT CBPersistMgr::readHeader(const Common::String &filename) {
_saving = false;
_loadStream = g_system->getSavefileManager()->openForLoading(filename);
- //_buffer = Game->_fileManager->ReadWholeFile(Filename, &_bufferSize);
+ //_buffer = Game->_fileManager->readWholeFile(Filename, &_bufferSize);
if (_loadStream) {
uint32 Magic;
Magic = getDWORD();
@@ -348,7 +348,7 @@ HRESULT CBPersistMgr::initLoad(const char *filename) {
//////////////////////////////////////////////////////////////////////////
HRESULT CBPersistMgr::saveFile(const char *filename) {
- return Game->_fileManager->SaveFile(filename, ((Common::MemoryWriteStreamDynamic *)_saveStream)->getData(), ((Common::MemoryWriteStreamDynamic *)_saveStream)->size(), Game->_compressedSavegames, _richBuffer, _richBufferSize);
+ return Game->_fileManager->saveFile(filename, ((Common::MemoryWriteStreamDynamic *)_saveStream)->getData(), ((Common::MemoryWriteStreamDynamic *)_saveStream)->size(), Game->_compressedSavegames, _richBuffer, _richBufferSize);
}
diff --git a/engines/wintermute/Base/BRegion.cpp b/engines/wintermute/Base/BRegion.cpp
index 9de95bb858..8a0600792d 100644
--- a/engines/wintermute/Base/BRegion.cpp
+++ b/engines/wintermute/Base/BRegion.cpp
@@ -96,7 +96,7 @@ bool CBRegion::PointInRegion(int X, int Y) {
//////////////////////////////////////////////////////////////////////////
HRESULT CBRegion::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CBRegion::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Base/BSoundBuffer.cpp b/engines/wintermute/Base/BSoundBuffer.cpp
index b24bdcfb19..a60b78ee33 100644
--- a/engines/wintermute/Base/BSoundBuffer.cpp
+++ b/engines/wintermute/Base/BSoundBuffer.cpp
@@ -77,7 +77,7 @@ CBSoundBuffer::~CBSoundBuffer() {
}
if (_file) {
- Game->_fileManager->CloseFile(_file);
+ Game->_fileManager->closeFile(_file);
_file = NULL;
}
@@ -104,9 +104,9 @@ HRESULT CBSoundBuffer::loadFromFile(const char *Filename, bool ForceReload) {
delete _stream;
_stream = NULL;
- if (_file) Game->_fileManager->CloseFile(_file);
+ if (_file) Game->_fileManager->closeFile(_file);
- _file = Game->_fileManager->OpenFile(Filename);
+ _file = Game->_fileManager->openFile(Filename);
if (!_file) {
Game->LOG(0, "Error opening sound file '%s'", Filename);
return E_FAIL;
@@ -146,7 +146,7 @@ HRESULT CBSoundBuffer::loadFromFile(const char *Filename, bool ForceReload) {
bool NewlyCreated = false;
if(!_soundBuffer || ForceReload || _streamed){
- if(!_file) _file = Game->_fileManager->OpenFile(Filename);
+ if(!_file) _file = Game->_fileManager->openFile(Filename);
if(!_file){
Game->LOG(0, "Error opening sound file '%s'", Filename);
return E_FAIL;
@@ -176,7 +176,7 @@ HRESULT CBSoundBuffer::loadFromFile(const char *Filename, bool ForceReload) {
// close file (if not streaming)
if(!_streamed && _file){
- Game->_fileManager->CloseFile(_file);
+ Game->_fileManager->closeFile(_file);
_file = NULL;
}
*/
diff --git a/engines/wintermute/Base/BSoundMgr.cpp b/engines/wintermute/Base/BSoundMgr.cpp
index e931d95f2d..d9ef81b315 100644
--- a/engines/wintermute/Base/BSoundMgr.cpp
+++ b/engines/wintermute/Base/BSoundMgr.cpp
@@ -138,10 +138,10 @@ CBSoundBuffer *CBSoundMgr::addSound(const char *Filename, TSoundType Type, bool
AnsiString name = PathUtil::GetFileNameWithoutExtension(Filename);
AnsiString newFile = PathUtil::Combine(path, name + "ogg");
- Common::SeekableReadStream *file = Game->_fileManager->OpenFile(newFile.c_str());
+ Common::SeekableReadStream *file = Game->_fileManager->openFile(newFile.c_str());
if (file) {
Filename = newFile.c_str();
- Game->_fileManager->CloseFile(file);
+ Game->_fileManager->closeFile(file);
}
}
diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp
index f848ae456f..efe07505eb 100644
--- a/engines/wintermute/Base/BSprite.cpp
+++ b/engines/wintermute/Base/BSprite.cpp
@@ -123,13 +123,13 @@ HRESULT CBSprite::Draw(int X, int Y, CBObject *Register, float ZoomX, float Zoom
//////////////////////////////////////////////////////////////////////
HRESULT CBSprite::LoadFile(const char *Filename, int LifeTime, TSpriteCacheType CacheType) {
- Common::SeekableReadStream *File = Game->_fileManager->OpenFile(Filename);
+ Common::SeekableReadStream *File = Game->_fileManager->openFile(Filename);
if (!File) {
Game->LOG(0, "CBSprite::LoadFile failed for file '%s'", Filename);
if (Game->_dEBUG_DebugMode) return LoadFile("invalid_debug.bmp", LifeTime, CacheType);
else return LoadFile("invalid.bmp", LifeTime, CacheType);
} else {
- Game->_fileManager->CloseFile(File);
+ Game->_fileManager->closeFile(File);
File = NULL;
}
@@ -153,7 +153,7 @@ HRESULT CBSprite::LoadFile(const char *Filename, int LifeTime, TSpriteCacheType
ret = S_OK;
}
} else {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer) {
if (FAILED(ret = LoadBuffer(Buffer, true, LifeTime, CacheType))) Game->LOG(0, "Error parsing SPRITE file '%s'", Filename);
delete [] Buffer;
diff --git a/engines/wintermute/Base/BStringTable.cpp b/engines/wintermute/Base/BStringTable.cpp
index 8b71e2ac60..f494658906 100644
--- a/engines/wintermute/Base/BStringTable.cpp
+++ b/engines/wintermute/Base/BStringTable.cpp
@@ -175,7 +175,7 @@ HRESULT CBStringTable::LoadFile(const char *Filename, bool ClearOld) {
if (ClearOld) _strings.clear();
uint32 Size;
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename, &Size);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename, &Size);
if (Buffer == NULL) {
Game->LOG(0, "CBStringTable::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/Base/BSurfaceStorage.cpp b/engines/wintermute/Base/BSurfaceStorage.cpp
index 237c9d760d..8d30b01d19 100644
--- a/engines/wintermute/Base/BSurfaceStorage.cpp
+++ b/engines/wintermute/Base/BSurfaceStorage.cpp
@@ -105,14 +105,14 @@ CBSurface *CBSurfaceStorage::addSurface(const char *Filename, bool default_ck, b
}
}
- Common::SeekableReadStream *File = Game->_fileManager->OpenFile(Filename);
+ Common::SeekableReadStream *File = Game->_fileManager->openFile(Filename);
if (!File) {
if (Filename) Game->LOG(0, "Missing image: '%s'", Filename);
if (Game->_dEBUG_DebugMode)
return addSurface("invalid_debug.bmp", default_ck, ck_red, ck_green, ck_blue, LifeTime, KeepLoaded);
else
return addSurface("invalid.bmp", default_ck, ck_red, ck_green, ck_blue, LifeTime, KeepLoaded);
- } else Game->_fileManager->CloseFile(File);
+ } else Game->_fileManager->closeFile(File);
CBSurface *surface;
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp
index 1ff3bf1122..0c7606b4f0 100644
--- a/engines/wintermute/Base/PartEmitter.cpp
+++ b/engines/wintermute/Base/PartEmitter.cpp
@@ -125,11 +125,11 @@ HRESULT CPartEmitter::addSprite(const char *Filename) {
}
// check if file exists
- Common::SeekableReadStream *File = Game->_fileManager->OpenFile(Filename);
+ Common::SeekableReadStream *File = Game->_fileManager->openFile(Filename);
if (!File) {
Game->LOG(0, "Sprite '%s' not found", Filename);
return E_FAIL;
- } else Game->_fileManager->CloseFile(File);
+ } else Game->_fileManager->closeFile(File);
char *Str = new char[strlen(Filename) + 1];
strcpy(Str, Filename);
diff --git a/engines/wintermute/Base/file/BPkgFile.cpp b/engines/wintermute/Base/file/BPkgFile.cpp
index 02aec3419f..a7f634be25 100644
--- a/engines/wintermute/Base/file/BPkgFile.cpp
+++ b/engines/wintermute/Base/file/BPkgFile.cpp
@@ -76,7 +76,7 @@ Common::SeekableReadStream *openPkgFile(const Common::String &Filename, CBFileMa
if (fileName[i] == '/') fileName[i] = '\\';
}
- fileEntry = fileManager->GetPackageEntry(fileName);
+ fileEntry = fileManager->getPackageEntry(fileName);
if (!fileEntry) return NULL;
file = fileEntry->_package->GetFilePointer();
diff --git a/engines/wintermute/Base/scriptables/SXFile.cpp b/engines/wintermute/Base/scriptables/SXFile.cpp
index bffd1d462a..ec115ca50b 100644
--- a/engines/wintermute/Base/scriptables/SXFile.cpp
+++ b/engines/wintermute/Base/scriptables/SXFile.cpp
@@ -86,7 +86,7 @@ void CSXFile::cleanup() {
//////////////////////////////////////////////////////////////////////////
void CSXFile::Close() {
if (_readFile) {
- Game->_fileManager->CloseFile(_readFile);
+ Game->_fileManager->closeFile(_readFile);
_readFile = NULL;
}
if ((FILE *)_writeFile) {
@@ -130,7 +130,7 @@ HRESULT CSXFile::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *This
_mode = 1;
}
if (_mode == 1) {
- _readFile = Game->_fileManager->OpenFile(_filename);
+ _readFile = Game->_fileManager->openFile(_filename);
if (!_readFile) {
//Script->RuntimeError("File.%s: Error opening file '%s' for reading.", Name, _filename);
Close();
@@ -711,7 +711,7 @@ HRESULT CSXFile::persist(CBPersistMgr *persistMgr) {
if (_mode != 0) {
// open for reading
if (_mode == 1) {
- _readFile = Game->_fileManager->OpenFile(_filename);
+ _readFile = Game->_fileManager->openFile(_filename);
if (!_readFile) Close();
}
// open for writing / appending
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp
index 4e2dd203cc..a28a35948f 100644
--- a/engines/wintermute/Base/scriptables/ScEngine.cpp
+++ b/engines/wintermute/Base/scriptables/ScEngine.cpp
@@ -191,7 +191,7 @@ HRESULT CScEngine::cleanup() {
//////////////////////////////////////////////////////////////////////////
byte *WINAPI CScEngine::LoadFile(void *Data, char *Filename, uint32 *Size) {
CBGame *Game = (CBGame *)Data;
- return Game->_fileManager->ReadWholeFile(Filename, Size);
+ return Game->_fileManager->readWholeFile(Filename, Size);
}
@@ -286,7 +286,7 @@ byte *CScEngine::GetCompiledScript(const char *Filename, uint32 *OutSize, bool I
uint32 Size;
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename, &Size);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename, &Size);
if (!Buffer) {
Game->LOG(0, "CScEngine::GetCompiledScript - error opening script '%s'", Filename);
return NULL;
diff --git a/engines/wintermute/UI/UIButton.cpp b/engines/wintermute/UI/UIButton.cpp
index f545a0a745..a4653c2007 100644
--- a/engines/wintermute/UI/UIButton.cpp
+++ b/engines/wintermute/UI/UIButton.cpp
@@ -96,7 +96,7 @@ CUIButton::~CUIButton() {
//////////////////////////////////////////////////////////////////////////
HRESULT CUIButton::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CUIButton::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/UI/UIEdit.cpp b/engines/wintermute/UI/UIEdit.cpp
index fdb5b00a80..091de2c2c9 100644
--- a/engines/wintermute/UI/UIEdit.cpp
+++ b/engines/wintermute/UI/UIEdit.cpp
@@ -95,7 +95,7 @@ CUIEdit::~CUIEdit() {
//////////////////////////////////////////////////////////////////////////
HRESULT CUIEdit::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CUIEdit::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/UI/UIEntity.cpp b/engines/wintermute/UI/UIEntity.cpp
index 962a6b87d7..ef9e0df393 100644
--- a/engines/wintermute/UI/UIEntity.cpp
+++ b/engines/wintermute/UI/UIEntity.cpp
@@ -56,7 +56,7 @@ CUIEntity::~CUIEntity() {
//////////////////////////////////////////////////////////////////////////
HRESULT CUIEntity::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CUIEntity::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/UI/UIText.cpp b/engines/wintermute/UI/UIText.cpp
index e221314218..9b495efafd 100644
--- a/engines/wintermute/UI/UIText.cpp
+++ b/engines/wintermute/UI/UIText.cpp
@@ -96,7 +96,7 @@ HRESULT CUIText::display(int OffsetX, int OffsetY) {
//////////////////////////////////////////////////////////////////////////
HRESULT CUIText::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CUIText::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/UI/UITiledImage.cpp b/engines/wintermute/UI/UITiledImage.cpp
index 61ad44e8d8..c47f3f09de 100644
--- a/engines/wintermute/UI/UITiledImage.cpp
+++ b/engines/wintermute/UI/UITiledImage.cpp
@@ -120,7 +120,7 @@ HRESULT CUITiledImage::display(int X, int Y, int Width, int Height) {
//////////////////////////////////////////////////////////////////////////
HRESULT CUITiledImage::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CUITiledImage::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/UI/UIWindow.cpp b/engines/wintermute/UI/UIWindow.cpp
index 38c950c337..e0750a84f2 100644
--- a/engines/wintermute/UI/UIWindow.cpp
+++ b/engines/wintermute/UI/UIWindow.cpp
@@ -201,7 +201,7 @@ HRESULT CUIWindow::display(int OffsetX, int OffsetY) {
//////////////////////////////////////////////////////////////////////////
HRESULT CUIWindow::LoadFile(const char *Filename) {
- byte *Buffer = Game->_fileManager->ReadWholeFile(Filename);
+ byte *Buffer = Game->_fileManager->readWholeFile(Filename);
if (Buffer == NULL) {
Game->LOG(0, "CUIWindow::LoadFile failed for file '%s'", Filename);
return E_FAIL;
diff --git a/engines/wintermute/video/VidPlayer.cpp b/engines/wintermute/video/VidPlayer.cpp
index c0dbfea56f..7f35e022cf 100644
--- a/engines/wintermute/video/VidPlayer.cpp
+++ b/engines/wintermute/video/VidPlayer.cpp
@@ -395,7 +395,7 @@ HRESULT CVidPlayer::loadSubtitles(const char *Filename, const char *SubtitleFile
}
DWORD Size;
- BYTE *Buffer = Game->m_FileManager->ReadWholeFile(NewFile, &Size, false);
+ BYTE *Buffer = Game->m_FileManager->readWholeFile(NewFile, &Size, false);
if (Buffer == NULL) return S_OK; // no subtitles
diff --git a/engines/wintermute/video/VidTheoraPlayer.cpp b/engines/wintermute/video/VidTheoraPlayer.cpp
index 779827212a..b6793fbbbd 100644
--- a/engines/wintermute/video/VidTheoraPlayer.cpp
+++ b/engines/wintermute/video/VidTheoraPlayer.cpp
@@ -132,7 +132,7 @@ HRESULT CVidTheoraPlayer::initialize(const Common::String &filename, const Commo
cleanup();
_filename = filename;
- _file = Game->_fileManager->OpenFile(filename, true, false);
+ _file = Game->_fileManager->openFile(filename, true, false);
if (!_file) return E_FAIL;
//if (Filename != _filename) CBUtils::SetString(&_filename, Filename);
@@ -159,7 +159,7 @@ HRESULT CVidTheoraPlayer::initialize(const Common::String &filename, const Commo
#if 0
cleanup();
- _file = Game->_fileManager->OpenFile(Filename);
+ _file = Game->_fileManager->openFile(Filename);
if (!_file) return E_FAIL;
if (Filename != _filename) CBUtils::SetString(&_filename, Filename);