aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-08 18:48:39 +0000
committerJohannes Schickel2008-09-08 18:48:39 +0000
commitc6b6a99f2ae4f946bd07443f3364ab7ddc0ae3ae (patch)
tree0940bddc5899949e0c14ff71bbcda13a869d4bd1 /engines
parentfbc62e56fa1feda9f0c69b91a6e8f4dc6467ff54 (diff)
downloadscummvm-rg350-c6b6a99f2ae4f946bd07443f3364ab7ddc0ae3ae.tar.gz
scummvm-rg350-c6b6a99f2ae4f946bd07443f3364ab7ddc0ae3ae.tar.bz2
scummvm-rg350-c6b6a99f2ae4f946bd07443f3364ab7ddc0ae3ae.zip
Fixed LoL file loading regression.
svn-id: r34451
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/lol.cpp30
-rw-r--r--engines/kyra/resource.cpp2
2 files changed, 13 insertions, 19 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index b9cb7bcc0b..baa527b574 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -241,27 +241,21 @@ void LoLEngine::resetSkipFlag(bool removeEvent) {
void LoLEngine::setupPrologueData(bool load) {
static const char * const fileList[] = {
- "xxx/general.pak",
- "xxx/introvoc.pak",
- "xxx/startup.pak",
- "xxx/intro1.pak",
- "xxx/intro2.pak",
- "xxx/intro3.pak",
- "xxx/intro4.pak",
- "xxx/intro5.pak",
- "xxx/intro6.pak",
- "xxx/intro7.pak",
- "xxx/intro8.pak",
- "xxx/intro9.pak"
+ "general.pak", "introvoc.pak", "startup.pak", "intro1.pak",
+ "intro2.pak", "intro3.pak", "intro4.pak", "intro5.pak",
+ "intro6.pak", "intro7.pak", "intro8.pak", "intro9.pak"
};
- char filepath[32];
- char *filename = filepath;
+ char filename[32];
for (uint i = 0; i < ARRAYSIZE(fileList); ++i) {
- strcpy(filename, fileList[i]);
- memcpy(filename, _languageExt[_lang], 3);
- if (!_flags.isTalkie)
- filename += 4;
+ filename[0] = '\0';
+
+ if (_flags.isTalkie) {
+ strcpy(filename, _languageExt[_lang]);
+ strcat(filename, "/");
+ }
+
+ strcat(filename, fileList[i]);
if (load) {
if (!_res->loadPakFile(filename))
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index bc83111d14..531f875cc3 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -38,7 +38,7 @@ namespace Kyra {
Resource::Resource(KyraEngine_v1 *vm) : _archiveCache(), _files(), _archiveFiles(new Common::SearchSet()), _protectedFiles(new Common::SearchSet()), _loaders(), _vm(vm) {
initializeLoaders();
- Common::SharedPtr<Common::Archive> path(new Common::FSDirectory(ConfMan.get("path")));
+ Common::SharedPtr<Common::Archive> path(new Common::FSDirectory(ConfMan.get("path"), 2));
Common::SharedPtr<Common::Archive> extrapath(new Common::FSDirectory(ConfMan.get("extrapath")));
_files.add("path", path, 4);