[Scummvm-cvs-logs] SF.net SVN: scummvm: [27416] scummvm/trunk/engines/parallaction/disk.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Fri Jun 15 16:28:24 CEST 2007
Revision: 27416
http://scummvm.svn.sourceforge.net/scummvm/?rev=27416&view=rev
Author: Kirben
Date: 2007-06-15 07:28:14 -0700 (Fri, 15 Jun 2007)
Log Message:
-----------
More adjustments for Amiga version.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/disk.cpp
Modified: scummvm/trunk/engines/parallaction/disk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk.cpp 2007-06-15 09:04:08 UTC (rev 27415)
+++ scummvm/trunk/engines/parallaction/disk.cpp 2007-06-15 14:28:14 UTC (rev 27416)
@@ -775,17 +775,31 @@
#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 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list