diff options
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | base/commandLine.cpp | 6 | ||||
-rw-r--r-- | common/util.cpp | 3 | ||||
-rw-r--r-- | common/util.h | 2 | ||||
-rw-r--r-- | engines/scumm/gfx.cpp | 24 | ||||
-rw-r--r-- | engines/scumm/object.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/plugin.cpp | 1 | ||||
-rw-r--r-- | engines/scumm/script_v5.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/scumm-md5.h | 3 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 3 | ||||
-rw-r--r-- | tools/md5table.c | 5 | ||||
-rw-r--r-- | tools/scumm-md5.txt | 2 |
12 files changed, 47 insertions, 22 deletions
@@ -697,9 +697,9 @@ arguments -- see the next section. --cdrom=NUM CD drive to play CD audio from (default: 0 = first drive) --joystick[=NUM] Enable joystick input (default: 0 = first joystick) - --platform=WORD Specify version of game (allowed values: 3do, acorn, - amiga, atari, c64, fmtowns, mac, nes, pc, segacd, - windows) + --platform=WORD Specify version of game (allowed values: 2gs, 3do, + acorn, amiga, atari, c64, fmtowns, mac, nes, pc, + pce, segacd, windows) --savepath=PATH Path to where savegames are stored --soundfont=FILE Select the SoundFont for MIDI playback (Only supported by some MIDI drivers) diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 8ef899414e..3255a3bf8a 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -101,9 +101,9 @@ static const char HELP_STRING[] = " drive)\n" " --joystick[=NUM] Enable input with joystick (default: 0 = first\n" " joystick)\n" - " --platform=WORD Specify platform of game (allowed values: 3do, acorn,\n" - " amiga, atari, c64, fmtowns, nes, mac, pc, segacd,\n" - " windows)\n" + " --platform=WORD Specify platform of game (allowed values: 2gs, 3do,\n" + " acorn, amiga, atari, c64, fmtowns, nes, mac, pc,\n" + " pce, segacd, windows)\n" " --savepath=PATH Path to where savegames are stored\n" " --soundfont=FILE Select the SoundFont for MIDI playback (only\n" " supported by some MIDI drivers)\n" diff --git a/common/util.cpp b/common/util.cpp index 693285ff26..bcad8696fb 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -175,6 +175,7 @@ const char *getLanguageDescription(Language id) { const PlatformDescription g_platforms[] = { + {"2gs", "2gs", "2gs", "Apple IIgs", kPlatformApple2GS }, {"3do", "3do", "3do", "3DO", kPlatform3DO}, {"acorn", "acorn", "acorn", "Acorn", kPlatformAcorn}, {"amiga", "ami", "amiga", "Amiga", kPlatformAmiga}, @@ -189,11 +190,11 @@ const PlatformDescription g_platforms[] = { {"linux", "linux", "linux", "Linux", kPlatformLinux}, {"macintosh", "mac", "mac", "Macintosh", kPlatformMacintosh}, + {"pce", "pce", "pce", "PC-Engine", kPlatformPCEngine }, {"nes", "nes", "nes", "NES", kPlatformNES}, {"segacd", "segacd", "sega", "SegaCD", kPlatformSegaCD}, {"windows", "win", "win", "Windows", kPlatformWindows}, - {"2gs", "2gs", "2gs", "Apple IIgs", kPlatformApple2GS }, {0, 0, 0, "Default", kPlatformUnknown} }; diff --git a/common/util.h b/common/util.h index 93b16a3c2e..da76bd7220 100644 --- a/common/util.h +++ b/common/util.h @@ -145,7 +145,7 @@ enum Platform { kPlatformAcorn, kPlatformSegaCD, kPlatform3DO, -// kPlatformPCEngine, + kPlatformPCEngine, kPlatformApple2GS, diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 9426d8dbde..f9b825d8ac 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -1495,6 +1495,11 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const // Check whether lights are turned on or not const bool lightsOn = _vm->isLightOn(); + if (_vm->_game.id == GID_LOOM && _vm->_game.platform == Common::kPlatformPCEngine) { + // FIXME: Image format unknown + return; + } + if (_vm->_game.features & GF_SMALL_HEADER) { smap_ptr = ptr; } else if (_vm->_game.version == 8) { @@ -1602,20 +1607,31 @@ bool Gdi::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width, // but if e.g. a savegame gets corrupted, we can easily get into // trouble here. See also bug #795214. int offset = -1, smapLen; - if (_vm->_game.features & GF_16COLOR) { + if (_vm->_game.id == GID_LOOM && _vm->_game.platform == Common::kPlatformPCEngine) { + // Length of offsets segment only + smapLen = READ_LE_UINT16(smap_ptr); + if (stripnr * 2 + 2 < smapLen) { + offset = READ_LE_UINT16(smap_ptr + stripnr * 2 + 2); + offset += stripnr * 2 + 9; + } + debug(0, "stripnr %d len %d offset %d", stripnr, smapLen, offset); + } else if (_vm->_game.features & GF_16COLOR) { smapLen = READ_LE_UINT16(smap_ptr); - if (stripnr * 2 + 2 < smapLen) + if (stripnr * 2 + 2 < smapLen) { offset = READ_LE_UINT16(smap_ptr + stripnr * 2 + 2); + } + assertRange(0, offset, smapLen-1, "screen strip"); } else if (_vm->_game.features & GF_SMALL_HEADER) { smapLen = READ_LE_UINT32(smap_ptr); if (stripnr * 4 + 4 < smapLen) offset = READ_LE_UINT32(smap_ptr + stripnr * 4 + 4); + assertRange(0, offset, smapLen-1, "screen strip"); } else { smapLen = READ_BE_UINT32(smap_ptr); if (stripnr * 4 + 8 < smapLen) offset = READ_LE_UINT32(smap_ptr + stripnr * 4 + 8); + assertRange(0, offset, smapLen-1, "screen strip"); } - assertRange(0, offset, smapLen-1, "screen strip"); return decompressBitmap(dstPtr, vs->pitch, smap_ptr + offset, height); } @@ -1937,7 +1953,7 @@ void Gdi::resetBackground(int top, int bottom, int strip) { bool Gdi::decompressBitmap(byte *dst, int dstPitch, const byte *src, int numLinesToProcess) { assert(numLinesToProcess); - + if (_vm->_game.features & GF_16COLOR) { drawStripEGA(dst, dstPitch, src, numLinesToProcess); return false; diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 08c720f814..db3155d6e2 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -846,9 +846,11 @@ void ScummEngine_v4::resetRoomObjects() { ResourceIterator obims(room, true); for (i = 0; i < _numObjectsInRoom; i++) { + // In the PC Engine version of Loom, there aren't image blocks + // for all objects. ptr = obims.findNext(MKID_BE('OBIM')); if (ptr == NULL) - error("Room %d missing image blocks(s)", _roomResource); + break; obim_id = READ_LE_UINT16(ptr + 6); diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp index c91d2d889b..4b5ec4027d 100644 --- a/engines/scumm/plugin.cpp +++ b/engines/scumm/plugin.cpp @@ -225,6 +225,7 @@ static const GameSettings gameVariantsTable[] = { {"loom", "EGA", "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI, 0, UNK}, {"loom", "No Adlib", "ega", GID_LOOM, 3, 0, MDT_PCSPK, 0, UNK}, {"loom", "FM-TOWNS", 0, GID_LOOM, 3, 0, MDT_TOWNS, GF_AUDIOTRACKS | GF_OLD256, Common::kPlatformFMTowns}, + {"loom", "PC-Engine", 0, GID_LOOM, 3, 0, MDT_NONE, GF_16COLOR | GF_AUDIOTRACKS | GF_OLD256, Common::kPlatformPCEngine}, {"loom", "VGA", "vga", GID_LOOM, 4, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformPC}, {"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_ADLIB, GF_16COLOR, Common::kPlatformPC}, diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index 7a84235deb..650a946f93 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -1816,7 +1816,7 @@ void ScummEngine_v5::o5_resourceRoutines() { void ScummEngine_v5::o5_roomOps() { int a = 0, b = 0, c, d, e; - if (_game.version == 3) { + if (_game.version == 3 && _game.platform != Common::kPlatformPCEngine) { a = getVarOrDirectWord(PARAM_1); b = getVarOrDirectWord(PARAM_2); } @@ -1824,7 +1824,7 @@ void ScummEngine_v5::o5_roomOps() { _opcode = fetchScriptByte(); switch (_opcode & 0x1F) { case 1: // SO_ROOM_SCROLL - if (_game.version != 3) { + if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) { a = getVarOrDirectWord(PARAM_1); b = getVarOrDirectWord(PARAM_2); } @@ -1841,7 +1841,7 @@ void ScummEngine_v5::o5_roomOps() { break; case 2: // SO_ROOM_COLOR if (_game.features & GF_SMALL_HEADER) { - if (_game.version != 3) { + if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) { a = getVarOrDirectWord(PARAM_1); b = getVarOrDirectWord(PARAM_2); } @@ -1854,7 +1854,7 @@ void ScummEngine_v5::o5_roomOps() { break; case 3: // SO_ROOM_SCREEN - if (_game.version != 3) { + if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) { a = getVarOrDirectWord(PARAM_1); b = getVarOrDirectWord(PARAM_2); } @@ -1862,7 +1862,7 @@ void ScummEngine_v5::o5_roomOps() { break; case 4: // SO_ROOM_PALETTE if (_game.features & GF_SMALL_HEADER) { - if (_game.version != 3) { + if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) { a = getVarOrDirectWord(PARAM_1); b = getVarOrDirectWord(PARAM_2); } diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 07ed10ce0b..deaa7fcb6b 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sun Feb 25 11:49:10 2007 + This file was generated by the md5table tool on Sat Mar 03 11:19:16 2007 DO NOT EDIT MANUALLY! */ @@ -25,6 +25,7 @@ static const MD5Table md5table[] = { { "04687cdf7f975a89d2474929f7b80946", "indy3", "FM-TOWNS", "", 7552, Common::EN_ANY, Common::kPlatformFMTowns }, { "0557df19f046a84c2fdc63507c6616cb", "farm", "HE 72", "Demo", -1, Common::NL_NLD, Common::kPlatformWindows }, { "055ffe4f47753e47594ac67823220c54", "puttrace", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, + { "0650e8ab1432564607cd651c0fa3f344", "loom", "PC-Engine", "", -1, Common::EN_ANY, Common::kPlatformPCEngine }, { "06b187468113f9ae5a400b148a847fac", "atlantis", "", "Floppy", 12075, Common::EN_ANY, Common::kPlatformMacintosh }, { "06c3cf4f31daad8b1cd93153491db9e6", "pajama3", "", "", -1, Common::NL_NLD, Common::kPlatformMacintosh }, { "07433205acdca3bc553d0e731588b35f", "airport", "", "", -1, Common::EN_ANY, Common::kPlatformWindows }, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index e107bca6aa..9c7d8b6a7c 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1572,7 +1572,8 @@ void ScummEngine::setupMusic(int midi) { // Init iMuse if (_game.version >= 7) { // Setup for digital iMuse is performed in another place - } else if (_game.platform == Common::kPlatformApple2GS || _game.platform == Common::kPlatformC64) { + } else if (_game.platform == Common::kPlatformApple2GS || _game.platform == Common::kPlatformC64 || + _game.platform == Common::kPlatformPCEngine) { // TODO _musicEngine = NULL; } else if (_game.platform == Common::kPlatformNES) { diff --git a/tools/md5table.c b/tools/md5table.c index 145aa14e3b..b57f39e7bd 100644 --- a/tools/md5table.c +++ b/tools/md5table.c @@ -79,11 +79,12 @@ static const StringMap platformMap[] = { { "Atari", "kPlatformAtariST" }, { "C64", "kPlatformC64" }, { "DOS", "kPlatformPC" }, - { "FM-TOWNS", "kPlatformFMTowns" }, + { "FM-TOWNS", "kPlatformFMTowns" }, { "Mac", "kPlatformMacintosh" }, { "NES", "kPlatformNES" }, + { "PC-Engine", "kPlatformPCEngine" }, { "SEGA", "kPlatformSegaCD" }, - { "Windows", "kPlatformWindows" }, + { "Windows", "kPlatformWindows" }, { "All?", "kPlatformUnknown" }, { "All", "kPlatformUnknown" }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 06e4b3468c..9036a5336e 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -169,6 +169,8 @@ loom Loom c5d10e190d4b4d59114b824f2fdbd00e -1 en FM-TOWNS FM-TOWNS - - dhewg, Andrea Petrucci 31b8fda4c8c7413fa6b39997e776eba4 -1 jp FM-TOWNS FM-TOWNS - - khalek, Andrea Petrucci + 0650e8ab1432564607cd651c0fa3f344 -1 en PC-Engine PC-Engine - - Kirben + 5a35e36fd777e9c37a49c5b2faca52f9 6108 en DOS EGA EGA Demo non-interactive Fingolfin a00554c31d623fdb9fcb0f924b89b42b -1 en DOS EGA EGA Demo non-interactive Adrian C. Fruehwirth |