[Scummvm-tracker] [ScummVM :: Bugs] #13385: SCUMM: Loom Talkie: can't go back to the cave to get the reflection draft
ScummVM :: Bugs
trac at scummvm.org
Sun Apr 3 11:35:46 UTC 2022
#13385: SCUMM: Loom Talkie: can't go back to the cave to get the reflection draft
------------------------------------------+----------------------------
Reporter: dwatteau | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: loom,talkie,hot spot,dead-end | Game: Loom
------------------------------------------+----------------------------
Comment (by eriktorbjorn):
The problem seems to be that VGA Loom registers the click on the wrong
object. Here are the objects in the EGA version, according to the ScummVM
debugger:
{{{
+-----------------------------------------------------------+
|num | name | x | y |width|height|state|fl| cls |
+----+------------+----+----+-----+------+-----+--+---------+
| 542|cave | 0| 8| 40| 40| 0| 0|$00000002|
| 543| | 288| 0| 32| 144| 0| 0|$00800002|
| 544|steps | 120| 16| 32| 48| 0| 0|$00000001|
| 545| | 144| 56| 32| 80| 0| 0|$00800000|
| 546| | 176| 64| 32| 72| 0| 0|$00800000|
| 547| | 88| 56| 88| 80| 1| 0|$00800000|
| 548| | 176| 64| 32| 72| 1| 0|$00800000|
| 549| | 208| 64| 24| 72| 1| 0|$00800000|
| 550| | 232| 88| 72| 48| 1| 0|$00800000|
| 551| | 88| 56| 56| 80| 0| 0|$00800000|
| 552| | 144| 56| 32| 40| 0| 0|$00800000|
| 553| | 176| 64| 56| 72| 0| 0|$00800000|
| 554| | 232| 88| 72| 48| 0| 0|$00800000|
| 555| | 0| 0| 48| 40| 0| 0|$00000000|
| 556| | 0| 0| 48| 40| 0| 0|$00000000|
}}}
Clicking on the cave registers as a click on object 542, causing you to
walk towards it. Once you reach it, apparently the object's script
(roomobj-33-542) takes over:
{{{
Events:
38 - 001A
[001A] (24) loadRoomWithEgo(506,30,406,34);
[0022] (00) stopObjectCode();
END
}}}
In the VGA version, the objects are in a different order:
{{{
+-----------------------------------------------------------+
|num | name | x | y |width|height|state|fl| cls |
+----+------------+----+----+-----+------+-----+--+---------+
| 477| | 88| 56| 56| 80| 0| 0|$00800000|
| 478| | 144| 56| 32| 80| 0| 0|$00800000|
| 479| | 176| 64| 56| 72| 0| 0|$00800000|
| 480| | 232| 88| 72| 48| 0| 0|$00800000|
| 473| | 88| 56| 88| 80| 1| 0|$00800000|
| 474| | 176| 64| 32| 72| 1| 0|$00800000|
| 475| | 208| 64| 24| 72| 1| 0|$00800000|
| 476| | 232| 88| 72| 48| 1| 0|$00800000|
| 482| | 0| 0| 48| 40| 0| 0|$00000000|
| 468|cave | 0| 8| 40| 40| 0| 0|$00000002|
| 469| | 288| 0| 32| 144| 0| 0|$00800002|
| 470|steps | 120| 16| 32| 48| 0| 0|$00000001|
| 481| | 0| 0| 48| 40| 0| 0|$00000000|
| 471| | 144| 56| 32| 80| 0| 0|$00800000|
| 472| | 176| 64| 32| 72| 0| 0|$00800000|
}}}
Clicking on most of the cave, except for a sliver at the bottom (actually
below the cave entrance) registers as a click on object 482. This object
has an empty object script, so you are not moved back into the caves.
I have no idea what these objects overlapping the cave entrance are used
for. Here's a possible workaround, if it turns out to be a script bug
rather than a ScummVM bug:
{{{
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 74121f4d039..12f9e71f0c1 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -2385,6 +2385,14 @@ void ScummEngine_v5::o5_startObject() {
obj = getVarOrDirectWord(PARAM_1);
script = getVarOrDirectByte(PARAM_2);
+ // WORKAROUND bug #13385: Clicking on the cave entrance to go back
into
+ // the dragon caves registers on the incorrect object. Redirect to
the
+ // cave's object script, which handles the actual moving to the
other
+ // room.
+ if (_game.id == GID_LOOM && _game.version == 4 && _currentRoom ==
33 && obj == 482 && script == 56) {
+ obj = 468;
+ }
+
getWordVararg(data);
runObjectScript(obj, script, 0, 0, data);
}
}}}
(If it's a script bug, I guess it should be marked as a workaround. Or
maybe not. It's not a behavior I can see anyone actually wanting to
disable...)
--
Ticket URL: <https://bugs.scummvm.org/ticket/13385#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list