[Scummvm-cvs-logs] SF.net SVN: scummvm: [25954] scummvm/trunk/engines/scumm
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Mar 4 00:02:54 CET 2007
Revision: 25954
http://scummvm.svn.sourceforge.net/scummvm/?rev=25954&view=rev
Author: kirben
Date: 2007-03-03 15:02:54 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Fix level selection in PC Engine version of Loom.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/costume.cpp
scummvm/trunk/engines/scumm/object.cpp
scummvm/trunk/engines/scumm/script.cpp
scummvm/trunk/engines/scumm/script_v5.cpp
scummvm/trunk/engines/scumm/sound.cpp
Modified: scummvm/trunk/engines/scumm/costume.cpp
===================================================================
--- scummvm/trunk/engines/scumm/costume.cpp 2007-03-03 18:36:05 UTC (rev 25953)
+++ scummvm/trunk/engines/scumm/costume.cpp 2007-03-03 23:02:54 UTC (rev 25954)
@@ -88,7 +88,11 @@
int step;
Codec1 v1;
-
+ if (_vm->_game.id == GID_LOOM && _vm->_game.platform == Common::kPlatformPCEngine) {
+ // FIXME: Unknown costume format
+ return 0;
+ }
+
const int scaletableSize = 128;
const bool newAmiCost = (_vm->_game.version == 5) && (_vm->_game.platform == Common::kPlatformAmiga);
@@ -551,6 +555,11 @@
_id = id;
byte *ptr = _vm->getResourceAddress(rtCostume, id);
+ if (_vm->_game.id == GID_LOOM && _vm->_game.platform == Common::kPlatformPCEngine) {
+ // FIXME: Unknown costume format
+ return;
+ }
+
if (_vm->_game.version >= 6)
ptr += 8;
else if (_vm->_game.features & GF_OLD_BUNDLE)
Modified: scummvm/trunk/engines/scumm/object.cpp
===================================================================
--- scummvm/trunk/engines/scumm/object.cpp 2007-03-03 18:36:05 UTC (rev 25953)
+++ scummvm/trunk/engines/scumm/object.cpp 2007-03-03 23:02:54 UTC (rev 25954)
@@ -900,27 +900,41 @@
od->obj_nr = READ_LE_UINT16(ptr + 6);
- od->x_pos = *(ptr + 9) * 8;
- od->y_pos = ((*(ptr + 10)) & 0x7F) * 8;
+ if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) {
+ od->x_pos = *(ptr + 8) * 8;
+ od->y_pos = ((*(ptr + 9)) & 0x7F) * 8;
- od->parentstate = (*(ptr + 10) & 0x80) ? 1 : 0;
- if (_game.version <= 2)
- od->parentstate *= 8;
+ od->parentstate = (*(ptr + 11) & 0x80) ? 1 : 0;
+ od->width = *(ptr + 10) * 8;
- od->width = *(ptr + 11) * 8;
-
- od->parent = *(ptr + 12);
-
- if (_game.version <= 2) {
+ od->parent = *(ptr + 11);
od->walk_x = *(ptr + 13) * 8;
od->walk_y = (*(ptr + 14) & 0x1f) * 8;
od->actordir = (*(ptr + 15)) & 7;
od->height = *(ptr + 15) & 0xf8;
} else {
- od->walk_x = READ_LE_UINT16(ptr + 13);
- od->walk_y = READ_LE_UINT16(ptr + 15);
- od->actordir = (*(ptr + 17)) & 7;
- od->height = *(ptr + 17) & 0xf8;
+ od->x_pos = *(ptr + 9) * 8;
+ od->y_pos = ((*(ptr + 10)) & 0x7F) * 8;
+
+ od->parentstate = (*(ptr + 10) & 0x80) ? 1 : 0;
+ if (_game.version <= 2)
+ od->parentstate *= 8;
+
+ od->width = *(ptr + 11) * 8;
+
+ od->parent = *(ptr + 12);
+
+ if (_game.version <= 2) {
+ od->walk_x = *(ptr + 13) * 8;
+ od->walk_y = (*(ptr + 14) & 0x1f) * 8;
+ od->actordir = (*(ptr + 15)) & 7;
+ od->height = *(ptr + 15) & 0xf8;
+ } else {
+ od->walk_x = READ_LE_UINT16(ptr + 13);
+ od->walk_y = READ_LE_UINT16(ptr + 15);
+ od->actordir = (*(ptr + 17)) & 7;
+ od->height = *(ptr + 17) & 0xf8;
+ }
}
}
Modified: scummvm/trunk/engines/scumm/script.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script.cpp 2007-03-03 18:36:05 UTC (rev 25953)
+++ scummvm/trunk/engines/scumm/script.cpp 2007-03-03 23:02:54 UTC (rev 25954)
@@ -167,7 +167,8 @@
verbptr = objptr + 14;
else if (_game.version <= 2)
verbptr = objptr + 15;
- else if (_game.features & GF_OLD_BUNDLE)
+ else if ((_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) ||
+ _game.features & GF_OLD_BUNDLE)
verbptr = objptr + 17;
else if (_game.features & GF_SMALL_HEADER)
verbptr = objptr + 19;
@@ -212,7 +213,9 @@
verbptr += 3;
} while (1);
- if (_game.features & GF_SMALL_HEADER)
+ if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine)
+ return verboffs + READ_LE_UINT16(verbptr + 1) + 3;
+ else if (_game.features & GF_SMALL_HEADER)
return READ_LE_UINT16(verbptr + 1);
else
return verboffs + READ_LE_UINT16(verbptr + 1);
Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp 2007-03-03 18:36:05 UTC (rev 25953)
+++ scummvm/trunk/engines/scumm/script_v5.cpp 2007-03-03 23:02:54 UTC (rev 25954)
@@ -1705,6 +1705,12 @@
int op = _opcode & 0x3F;
+ // FIXME: Sound resources are currently missing
+ if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine &&
+ (op == 2 || op == 6)) {
+ return;
+ }
+
switch (op) {
case 1: // SO_LOAD_SCRIPT
case 2: // SO_LOAD_SOUND
@@ -1739,6 +1745,9 @@
_res->lock(rtScript, resid);
break;
case 10: // SO_LOCK_SOUND
+ // FIXME: Sound resources are currently missing
+ if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine)
+ break;
_res->lock(rtSound, resid);
break;
case 11: // SO_LOCK_COSTUME
@@ -1756,6 +1765,9 @@
_res->unlock(rtScript, resid);
break;
case 14: // SO_UNLOCK_SOUND
+ // FIXME: Sound resources are currently missing
+ if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine)
+ break;
_res->unlock(rtSound, resid);
break;
case 15: // SO_UNLOCK_COSTUME
Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp 2007-03-03 18:36:05 UTC (rev 25953)
+++ scummvm/trunk/engines/scumm/sound.cpp 2007-03-03 23:02:54 UTC (rev 25954)
@@ -165,6 +165,10 @@
int rate;
byte flags = Audio::Mixer::FLAG_UNSIGNED | Audio::Mixer::FLAG_AUTOFREE;
+ // FIXME: Sound resources are currently missing
+ if (_vm->_game.id == GID_LOOM && _vm->_game.platform == Common::kPlatformPCEngine)
+ return;
+
debugC(DEBUG_SOUND, "playSound #%d (room %d)", soundID,
_vm->getResourceRoomNr(rtSound, soundID));
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