diff options
author | Matthew Hoops | 2012-03-20 14:18:57 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-03-20 14:49:16 -0400 |
commit | 71756bdf4eae5ba9cc3f329b85e894f04640aaef (patch) | |
tree | 40d464262da107ab5eed82f198685209161ebac1 /engines/kyra/resource.cpp | |
parent | 03eba05b09e5c9e5a351f8111185934b92a3fed3 (diff) | |
parent | 3c3576a224b92c703b4e8ea20008ac8a069980dd (diff) | |
download | scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.gz scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.bz2 scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/kyra/resource.cpp')
-rw-r--r-- | engines/kyra/resource.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index a35ec3d81b..adb3063344 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -59,14 +59,14 @@ bool Resource::reset() { if (!dir.exists() || !dir.isDirectory()) error("invalid game path '%s'", dir.getPath().c_str()); - if (_vm->game() == GI_KYRA1) { + if (_vm->game() == GI_KYRA1 || _vm->game() == GI_EOB1) { // We only need kyra.dat for the demo. if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) return true; if (!_vm->gameFlags().isDemo && _vm->gameFlags().isTalkie) { // List of files in the talkie version, which can never be unload. - static const char * const list[] = { + static const char *const list[] = { "ADL.PAK", "CHAPTER1.VRM", "COL.PAK", "FINALE.PAK", "INTRO1.PAK", "INTRO2.PAK", "INTRO3.PAK", "INTRO4.PAK", "MISC.PAK", "SND.PAK", "STARTUP.PAK", "XMI.PAK", "CAVE.APK", "DRAGON1.APK", "DRAGON2.APK", "LAGOON.APK", 0 @@ -84,7 +84,7 @@ bool Resource::reset() { name.toUppercase(); // No PAK file - if (name == "TWMUSIC.PAK") + if (name == "TWMUSIC.PAK" || name == "EYE.PAK") continue; // We need to only load the script archive for the language the user specified @@ -122,15 +122,15 @@ bool Resource::reset() { _files.add("installer", loadInstallerArchive("WESTWOOD", "%d", 0), 2, false); if (!_vm->gameFlags().isTalkie && !_vm->gameFlags().isDemo) { - static const char * const list[] = { + static const char *const list[] = { "GENERAL.PAK", 0 }; loadProtectedFiles(list); } - } else { + } else if (_vm->game() != GI_EOB2) { error("Unknown game id: %d", _vm->game()); - return false; // for compilers that don't support NORETURN + return false; // for compilers that don't support NORETURN } return true; @@ -173,7 +173,7 @@ bool Resource::loadFileList(const Common::String &filedata) { f->seek(filenameOffset, SEEK_SET); uint8 buffer[13]; - f->read(buffer, sizeof(buffer)-1); + f->read(buffer, sizeof(buffer) - 1); buffer[12] = 0; f->seek(offset + 16, SEEK_SET); @@ -189,7 +189,7 @@ bool Resource::loadFileList(const Common::String &filedata) { } else if (!loadPakFile(filename)) { delete f; error("couldn't load file '%s'", filename.c_str()); - return false; // for compilers that don't support NORETURN + return false; // for compilers that don't support NORETURN } } } @@ -198,21 +198,21 @@ bool Resource::loadFileList(const Common::String &filedata) { return true; } -bool Resource::loadFileList(const char * const *filelist, uint32 numFiles) { +bool Resource::loadFileList(const char *const *filelist, uint32 numFiles) { if (!filelist) return false; while (numFiles--) { if (!loadPakFile(filelist[numFiles])) { error("couldn't load file '%s'", filelist[numFiles]); - return false; // for compilers that don't support NORETURN + return false; // for compilers that don't support NORETURN } } return true; } -bool Resource::loadProtectedFiles(const char * const * list) { +bool Resource::loadProtectedFiles(const char *const *list) { for (uint i = 0; list[i]; ++i) { Common::ArchiveMemberPtr file = _files.getMember(list[i]); if (!file) |