[Scummvm-cvs-logs] SF.net SVN: scummvm: [26374] scummvm/trunk/engines/parallaction/disk.cpp

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Mon Apr 2 23:00:12 CEST 2007


Revision: 26374
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26374&view=rev
Author:   peres001
Date:     2007-04-02 14:00:11 -0700 (Mon, 02 Apr 2007)

Log Message:
-----------
miscellaneous improvements for amiga

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/disk.cpp

Modified: scummvm/trunk/engines/parallaction/disk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk.cpp	2007-04-02 20:53:25 UTC (rev 26373)
+++ scummvm/trunk/engines/parallaction/disk.cpp	2007-04-02 21:00:11 UTC (rev 26374)
@@ -758,8 +758,7 @@
 
 StaticCnv* AmigaDisk::makeStaticCnv(Common::SeekableReadStream &stream) {
 
-
-	uint16 numFrames = stream.readByte();
+	stream.skip(1);
 	uint16 width = stream.readByte();
 	uint16 height = stream.readByte();
 
@@ -815,16 +814,18 @@
 Script* AmigaDisk::loadLocation(const char *name) {
 	debugC(1, kDebugDisk, "AmigaDisk::loadLocation '%s'", name);
 
-	char path[PATH_LEN];
-
-	sprintf(path, "%s%s%s.loc.pp", _vm->_characterName, _languageDir, name);
-
 	_languageDir[2] = '\0';
 	_archive.open(_languageDir);
 	_languageDir[2] = '/';
 
-	if (!_archive.openArchivedFile(path))
-		error("can't find location file '%s'", path);
+	char path[PATH_LEN];
+	sprintf(path, "%s%s%s.loc.pp", _vm->_characterName, _languageDir, name);
+	if (!_archive.openArchivedFile(path)) {
+		sprintf(path, "%s%s.loc.pp", _languageDir, name);
+		if (!_archive.openArchivedFile(path)) {
+			error("can't find location file '%s'", path);
+		}
+	}
 
 	PowerPackerStream stream(_archive);
 
@@ -1083,7 +1084,8 @@
 
 	sprintf(path, "%s.path.pp", background);
 	if (!_archive.openArchivedFile(path))
-		error("can't open path file %s", path);
+		return;	// no errors if missing path files: not every location has one
+
 	stream = new PowerPackerStream(_archive);
 	stream->seek(0x120, SEEK_SET);	// HACK: skipping IFF/ILBM header should be done by analysis, not magic
 	stream2 = new RLEStream(stream);


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