diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/resource.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/resource.h | 2 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index c043e47289..45e3416616 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -69,8 +69,8 @@ bool Resource::reset() { if (_vm->game() == GI_KYRA1) { // we're loading KYRA.DAT here too (but just for Kyrandia 1) - if (!loadPakFile(StaticResource::_staticDataFile) || !StaticResource::checkKyraDat()) { - Common::String errorMessage = "You're missing the '" + StaticResource::_staticDataFile + "' file or it got corrupted, (re)get it from the ScummVM website"; + if (!loadPakFile(StaticResource::staticDataFilename()) || !StaticResource::checkKyraDat()) { + Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website"; GUI::MessageDialog errorMsg(errorMessage); errorMsg.runModal(); error(errorMessage.c_str()); @@ -145,7 +145,7 @@ bool Resource::loadPakFile(const Common::String &filename) { return true; } - const bool isKyraDat = filename.equalsIgnoreCase(StaticResource::_staticDataFile); + const bool isKyraDat = filename.equalsIgnoreCase(StaticResource::staticDataFilename()); uint32 size = 0; Common::File handle; diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index ff2e46a40a..45a3bcde0c 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -226,7 +226,7 @@ struct Room; class StaticResource { public: - static const Common::String _staticDataFile; + static const Common::String staticDataFilename() { return "kyra.dat"; } StaticResource(KyraEngine *vm) : _vm(vm), _resList(), _fileLoader(0), _builtIn(0), _filenameTable(0) {} ~StaticResource() { deinit(); } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 1c1a17597c..0c06bd4035 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -39,7 +39,7 @@ namespace Kyra { bool StaticResource::checkKyraDat() { Common::File kyraDat; - if (!kyraDat.open(StaticResource::_staticDataFile)) + if (!kyraDat.open(StaticResource::staticDataFilename())) return false; uint32 size = kyraDat.size() - 16; @@ -50,7 +50,7 @@ bool StaticResource::checkKyraDat() { kyraDat.close(); uint8 digestCalc[16]; - if (!Common::md5_file(StaticResource::_staticDataFile.c_str(), digestCalc, size)) + if (!Common::md5_file(StaticResource::staticDataFilename().c_str(), digestCalc, size)) return false; for (int i = 0; i < 16; ++i) @@ -854,8 +854,6 @@ void KyraEngine_v1::loadMainScreen(int page) { _screen->copyRegion(0, 0, 0, 0, 320, 200, page, 0); } -const Common::String StaticResource::_staticDataFile = "kyra.dat"; - const ScreenDim Screen::_screenDimTable[] = { { 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 }, { 0x08, 0x48, 0x18, 0x38, 0x0F, 0x0C, 0x00, 0x00 }, |