[Scummvm-cvs-logs] SF.net SVN: scummvm: [25951] scummvm/trunk
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Mar 3 13:59:49 CET 2007
Revision: 25951
http://scummvm.svn.sourceforge.net/scummvm/?rev=25951&view=rev
Author: kirben
Date: 2007-03-03 04:59:48 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Allow PC Engine version of Loom to at least start up.
Modified Paths:
--------------
scummvm/trunk/README
scummvm/trunk/base/commandLine.cpp
scummvm/trunk/common/util.cpp
scummvm/trunk/common/util.h
scummvm/trunk/engines/scumm/gfx.cpp
scummvm/trunk/engines/scumm/object.cpp
scummvm/trunk/engines/scumm/plugin.cpp
scummvm/trunk/engines/scumm/script_v5.cpp
scummvm/trunk/engines/scumm/scumm-md5.h
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/tools/md5table.c
scummvm/trunk/tools/scumm-md5.txt
Modified: scummvm/trunk/README
===================================================================
--- scummvm/trunk/README 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/README 2007-03-03 12:59:48 UTC (rev 25951)
@@ -697,9 +697,9 @@
--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)
Modified: scummvm/trunk/base/commandLine.cpp
===================================================================
--- scummvm/trunk/base/commandLine.cpp 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/base/commandLine.cpp 2007-03-03 12:59:48 UTC (rev 25951)
@@ -101,9 +101,9 @@
" 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"
Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/common/util.cpp 2007-03-03 12:59:48 UTC (rev 25951)
@@ -175,6 +175,7 @@
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 @@
{"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}
};
Modified: scummvm/trunk/common/util.h
===================================================================
--- scummvm/trunk/common/util.h 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/common/util.h 2007-03-03 12:59:48 UTC (rev 25951)
@@ -145,7 +145,7 @@
kPlatformAcorn,
kPlatformSegaCD,
kPlatform3DO,
-// kPlatformPCEngine,
+ kPlatformPCEngine,
kPlatformApple2GS,
Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/engines/scumm/gfx.cpp 2007-03-03 12:59:48 UTC (rev 25951)
@@ -1495,6 +1495,11 @@
// 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 @@
// 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)
+ 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) {
+ 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 @@
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;
Modified: scummvm/trunk/engines/scumm/object.cpp
===================================================================
--- scummvm/trunk/engines/scumm/object.cpp 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/engines/scumm/object.cpp 2007-03-03 12:59:48 UTC (rev 25951)
@@ -846,9 +846,11 @@
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);
Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/engines/scumm/plugin.cpp 2007-03-03 12:59:48 UTC (rev 25951)
@@ -225,6 +225,7 @@
{"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},
Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/engines/scumm/script_v5.cpp 2007-03-03 12:59:48 UTC (rev 25951)
@@ -1816,7 +1816,7 @@
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 @@
_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 @@
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 @@
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 @@
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);
}
Modified: scummvm/trunk/engines/scumm/scumm-md5.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm-md5.h 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/engines/scumm/scumm-md5.h 2007-03-03 12:59:48 UTC (rev 25951)
@@ -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 @@
{ "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 },
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2007-03-03 12:59:48 UTC (rev 25951)
@@ -1572,7 +1572,8 @@
// 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) {
Modified: scummvm/trunk/tools/md5table.c
===================================================================
--- scummvm/trunk/tools/md5table.c 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/tools/md5table.c 2007-03-03 12:59:48 UTC (rev 25951)
@@ -79,11 +79,12 @@
{ "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" },
Modified: scummvm/trunk/tools/scumm-md5.txt
===================================================================
--- scummvm/trunk/tools/scumm-md5.txt 2007-03-03 12:50:01 UTC (rev 25950)
+++ scummvm/trunk/tools/scumm-md5.txt 2007-03-03 12:59:48 UTC (rev 25951)
@@ -169,6 +169,8 @@
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
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