aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2007-06-15 14:28:14 +0000
committerTravis Howell2007-06-15 14:28:14 +0000
commit6c3a81cd4eeadef58d89f315f14ccb2e3f6fbcb0 (patch)
tree26e37e3f6bc5fa163334609da4955e67f8af1067
parent03d82560c76e6dc61b63afc1897bd239f1e8550f (diff)
downloadscummvm-rg350-6c3a81cd4eeadef58d89f315f14ccb2e3f6fbcb0.tar.gz
scummvm-rg350-6c3a81cd4eeadef58d89f315f14ccb2e3f6fbcb0.tar.bz2
scummvm-rg350-6c3a81cd4eeadef58d89f315f14ccb2e3f6fbcb0.zip
More adjustments for Amiga version.
svn-id: r27416
-rw-r--r--engines/parallaction/disk.cpp33
1 files changed, 25 insertions, 8 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
index 1351c33f91..b09cee0837 100644
--- a/engines/parallaction/disk.cpp
+++ b/engines/parallaction/disk.cpp
@@ -775,17 +775,31 @@ Cnv* AmigaDisk::makeCnv(Common::SeekableReadStream &stream) {
#undef NUM_PLANES
Script* AmigaDisk::loadLocation(const char *name) {
- debugC(1, kDebugDisk, "AmigaDisk::loadLocation '%s'", name);
+ char archivefile[PATH_LEN];
- char path[PATH_LEN];
- sprintf(path, "%s%s%s.loc.pp", _vm->_characterName, _languageDir, name);
- if (!_locArchive.openArchivedFile(path)) {
- sprintf(path, "%s%s.loc.pp", _languageDir, name);
- if (!_locArchive.openArchivedFile(path)) {
- errorFileNotFound(name);
+ if (IS_MINI_CHARACTER(_vm->_characterName)) {
+ sprintf(archivefile, "%s%s", _vm->_characterName+4, _languageDir);
+ } else {
+ if (IS_DUMMY_CHARACTER(_vm->_characterName)) {
+ strcpy(archivefile, _languageDir);
+ } else {
+ sprintf(archivefile, "%s%s", _vm->_characterName, _languageDir);
}
}
+ strcat(archivefile, name);
+ strcat(archivefile, ".loc.pp");
+
+ debugC(1, kDebugDisk, "AmigaDisk::loadLocation(%s): trying '%s'", name, archivefile);
+
+ if (!_locArchive.openArchivedFile(archivefile)) {
+ sprintf(archivefile, "%s%s.loc.pp", _languageDir, name);
+ debugC(3, kDebugDisk, "AmigaDisk::loadLocation(%s): trying '%s'", name, archivefile);
+
+ if (!_locArchive.openArchivedFile(archivefile))
+ errorFileNotFound(name);
+ }
+
return new Script(new PowerPackerStream(_locArchive), true);
}
@@ -1030,7 +1044,10 @@ void AmigaDisk::loadMask(const char *name) {
char path[PATH_LEN];
sprintf(path, "%s.mask", name);
- Common::SeekableReadStream *s = openArchivedFile(path, true);
+ Common::SeekableReadStream *s = openArchivedFile(path, false);
+ if (s == NULL)
+ return; // no errors if missing mask files: not every location has one
+
s->seek(0x30, SEEK_SET);
byte r, g, b;