From caa5ee1d89de77f535f285904eb7c576d0397572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Einar=20Johan=20Tr=C3=B8an=20S=C3=B8ma=CC=8Aen?= Date: Tue, 26 Jun 2012 02:07:12 +0200 Subject: [PATCH] WINTERMUTE: Rename FuncName->funcName in BFileManager --- engines/wintermute/Ad/AdActor.cpp | 4 +- engines/wintermute/Ad/AdEntity.cpp | 2 +- engines/wintermute/Ad/AdGame.cpp | 12 +-- engines/wintermute/Ad/AdInventoryBox.cpp | 2 +- engines/wintermute/Ad/AdItem.cpp | 2 +- engines/wintermute/Ad/AdLayer.cpp | 2 +- engines/wintermute/Ad/AdRegion.cpp | 2 +- engines/wintermute/Ad/AdResponseBox.cpp | 2 +- engines/wintermute/Ad/AdRotLevel.cpp | 2 +- engines/wintermute/Ad/AdScaleLevel.cpp | 2 +- engines/wintermute/Ad/AdScene.cpp | 2 +- engines/wintermute/Ad/AdSentence.cpp | 4 +- engines/wintermute/Ad/AdSpriteSet.cpp | 2 +- engines/wintermute/Ad/AdTalkDef.cpp | 2 +- engines/wintermute/Ad/AdWaypointGroup.cpp | 2 +- engines/wintermute/Base/BFileManager.cpp | 84 +++++++++---------- engines/wintermute/Base/BFileManager.h | 40 ++++----- engines/wintermute/Base/BFont.cpp | 4 +- engines/wintermute/Base/BFontBitmap.cpp | 2 +- engines/wintermute/Base/BFontTT.cpp | 10 +-- engines/wintermute/Base/BGame.cpp | 12 +-- engines/wintermute/Base/BImage.cpp | 4 +- engines/wintermute/Base/BPackage.cpp | 6 +- engines/wintermute/Base/BPersistMgr.cpp | 4 +- engines/wintermute/Base/BRegion.cpp | 2 +- engines/wintermute/Base/BSoundBuffer.cpp | 10 +-- engines/wintermute/Base/BSoundMgr.cpp | 4 +- engines/wintermute/Base/BSprite.cpp | 6 +- engines/wintermute/Base/BStringTable.cpp | 2 +- engines/wintermute/Base/BSurfaceStorage.cpp | 4 +- engines/wintermute/Base/PartEmitter.cpp | 4 +- engines/wintermute/Base/file/BPkgFile.cpp | 2 +- .../wintermute/Base/scriptables/SXFile.cpp | 6 +- .../wintermute/Base/scriptables/ScEngine.cpp | 4 +- engines/wintermute/UI/UIButton.cpp | 2 +- engines/wintermute/UI/UIEdit.cpp | 2 +- engines/wintermute/UI/UIEntity.cpp | 2 +- engines/wintermute/UI/UIText.cpp | 2 +- engines/wintermute/UI/UITiledImage.cpp | 2 +- engines/wintermute/UI/UIWindow.cpp | 2 +- engines/wintermute/video/VidPlayer.cpp | 2 +- engines/wintermute/video/VidTheoraPlayer.cpp | 4 +- 42 files changed, 136 insertions(+), 136 deletions(-) diff --git a/engines/wintermute/Ad/AdActor.cpp b/engines/wintermute/Ad/AdActor.cpp index b2686245a64..f560bf90490 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 64a95316789..8b1cd0853d8 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 5e1af7fc777..2467a47e9fa 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 ee3e9dedfe4..55214f51ce5 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 28856234544..31bc3c76443 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 45c66781882..c5d24898cd7 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 c8b65a6691e..df124e76927 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 42f1038ffcd..d62324e4b17 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 b1256c9f276..4f20973958e 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 8e037813827..68cccac35a6 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 206bf67aa3b..098ea3829d9 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 feaeec714dd..d7bf67d7afd 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 3cd0b7aff02..62787b6c684 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 41ea23ff386..8aa3d3523fc 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 b8ee1be55c3..dc0059cf404 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 448c1d684f3..5ad65e8fe18 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 173bf4c570d..fdeb9b732dd 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 _singlePaths; @@ -74,10 +74,10 @@ public: Common::HashMap _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::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 28317b00ceb..5a6513d7d33 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 8650a077bd2..e88a6f05893 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 81dca9d2937..fb3b6e3fb1d 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 1fdf555731e..12398c109c9 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 eadf845109d..cbe134c7c64 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 9f68bfa2d0e..69ae1c6effc 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 64cbb762772..6db1fb5cd51 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 9de95bb858d..8a0600792da 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 b24bdcfb19a..a60b78ee339 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 e931d95f2d2..d9ef81b3153 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 f848ae456f2..efe07505eb3 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 8b71e2ac60d..f4946589065 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 237c9d760d7..8d30b01d192 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 1ff3bf11222..0c7606b4f00 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 02aec3419fe..a7f634be253 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 bffd1d462a8..ec115ca50b7 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 4e2dd203cc7..a28a35948fd 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 f545a0a7451..a4653c20074 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 fdb5b00a80e..091de2c2c99 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 962a6b87d72..ef9e0df393f 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 e2213142188..9b495efafdb 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 61ad44e8d8e..c47f3f09de7 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 38c950c3372..e0750a84f23 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 c0dbfea56f3..7f35e022cfb 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 779827212ae..b6793fbbbda 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);