diff options
author | Johannes Schickel | 2006-09-16 14:36:53 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-09-16 14:36:53 +0000 |
commit | 250133baf0f665deca81d20631df1299ca571b81 (patch) | |
tree | 7d7e3674567b28272feffd3b3aaaf09f103ca76a /engines/kyra/resource.cpp | |
parent | 84c2a93db511a06fb82894dee596a268ae5323db (diff) | |
download | scummvm-rg350-250133baf0f665deca81d20631df1299ca571b81.tar.gz scummvm-rg350-250133baf0f665deca81d20631df1299ca571b81.tar.bz2 scummvm-rg350-250133baf0f665deca81d20631df1299ca571b81.zip |
Simplifies resource handling for the CD version of Kyrandia.
(also less file loading at startup, but more on room change)
svn-id: r23887
Diffstat (limited to 'engines/kyra/resource.cpp')
-rw-r--r-- | engines/kyra/resource.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index b1e5cd5c54..a2434e42a7 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -69,12 +69,24 @@ Resource::Resource(KyraEngine *engine) { error("invalid game path '%s'", dir.path().c_str()); } - for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { - Common::String filename = file->name(); - filename.toUppercase(); - if (filename.hasSuffix("PAK") || filename.hasSuffix("APK")) { - if (!loadPakFile(file->name())) { - error("couldn't open pakfile '%s'", file->name().c_str()); + if (_engine->game() == GI_KYRA1 && (_engine->features() & GF_TALKIE)) { + static const char *list[] = { + "adl.pak", "col.pak", "finale.pak", "intro1.pak", "intro2.pak", "intro3.pak", "intro4.pak", + "misc.pak", "snd.pak", "startup.pak", "xmi.pak", 0 + }; + + for (int i = 0; list[i]; ++i) { + if (!loadPakFile(list[i])) + error("couldn't open pakfile '%s'", list[i]); + } + } else { + for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { + Common::String filename = file->name(); + filename.toUppercase(); + if (filename.hasSuffix("PAK") || filename.hasSuffix("APK")) { + if (!loadPakFile(file->name())) { + error("couldn't open pakfile '%s'", file->name().c_str()); + } } } } |