diff options
author | Einar Johan Trøan Sømåen | 2012-06-26 02:07:12 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-26 02:07:12 +0200 |
commit | caa5ee1d89de77f535f285904eb7c576d0397572 (patch) | |
tree | 0516797089e676516cd7aa8a7ce770df275ea05a /engines/wintermute/Base | |
parent | 95983fa2eabd2c5f507f095d89efb6bbda0d3701 (diff) | |
download | scummvm-rg350-caa5ee1d89de77f535f285904eb7c576d0397572.tar.gz scummvm-rg350-caa5ee1d89de77f535f285904eb7c576d0397572.tar.bz2 scummvm-rg350-caa5ee1d89de77f535f285904eb7c576d0397572.zip |
WINTERMUTE: Rename FuncName->funcName in BFileManager
Diffstat (limited to 'engines/wintermute/Base')
-rw-r--r-- | engines/wintermute/Base/BFileManager.cpp | 84 | ||||
-rw-r--r-- | engines/wintermute/Base/BFileManager.h | 40 | ||||
-rw-r--r-- | engines/wintermute/Base/BFont.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BFontBitmap.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BFontTT.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/Base/BGame.cpp | 12 | ||||
-rw-r--r-- | engines/wintermute/Base/BImage.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BPackage.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/BPersistMgr.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BRegion.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BSoundBuffer.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/Base/BSoundMgr.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BSprite.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/BStringTable.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BSurfaceStorage.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/PartEmitter.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/file/BPkgFile.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/SXFile.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScEngine.cpp | 4 |
19 files changed, 105 insertions, 105 deletions
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;
|