From 8b63337ce014c3e3212c0d9cb6ee1294de8d1865 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Mon, 2 Apr 2007 21:00:11 +0000 Subject: miscellaneous improvements for amiga svn-id: r26374 --- engines/parallaction/disk.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'engines') diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index 37eac3c9f7..83c319c9be 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -758,8 +758,7 @@ void AmigaDisk::unpackBitmap(byte *dst, byte *src, uint16 numFrames, uint16 plan 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 @@ Cnv* AmigaDisk::makeCnv(Common::SeekableReadStream &stream) { 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 @@ void AmigaDisk::loadScenery(const char* background, const char* mask) { 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); -- cgit v1.2.3