#269 closed defect (fixed)
SAM: Dinosaur does not stop properly
Reported by: | SF/linnard | Owned by: | eriktorbjorn |
---|---|---|---|
Priority: | low | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Sam and Max |
Description
ScummVM 0.2.0 Release Built on May 15 2002 01:04:49 Linux-SDL Sam 'n' Max Hit The Road CD-Talkie US
At Mount Rushmore, the talking T-Rex is supposed to
start and stop talking when the voice box is Used.
(The Lucas-suggested solution to the puzzle here is
to start him talking, wait until he opens his mouth,
use the box again. Then his mouth will stay open.)
In ScummVM, using the voice box again causes another
instance of his dialogue to begin, over top of the
previous. This can be repeated several times (may
crash eventually?), can be stopped with ESC, but
tends to stop other input (except ESC).
Does not stop completion of puzzle, so is more annoying than anything.
Save included at point in question, before puzzle is completed.
Ticket imported from: #556558. Ticket imported from: bugs/269.
Attachments (2)
Change History (27)
by , 23 years ago
Attachment: | samnmax.000 added |
---|
comment:1 by , 23 years ago
Lowering priority as this doesn't affect game completion.
We'll look into this as soon as we can, thanks.
comment:2 by , 23 years ago
Priority: | normal → low |
---|
comment:3 by , 23 years ago
Removed file--wrong file uploaded. x.x
Will get savegame sometime today.
comment:5 by , 23 years ago
Summary: | Dinosaur does not stop properly → SAM: Dinosaur does not stop properly |
---|
comment:6 by , 22 years ago
As far as I can see, what's happening is that the scripts aren't executed in the correct order. However, I haven't a clue why this is. If anyone else wants to look into it, my notes can be found at http://www.update.uu.se/~d91tan/ScummVM/snm-dinosaur.txt
comment:8 by , 22 years ago
Unchanged, as far as I can see. I haven't looked at it since I wrote the document mentioned below. So, basically, I think I know how to hack around it, but I don't know how to fix it properly.
comment:9 by , 21 years ago
v0.4.1
I played all the way though.. It just stayed open for me after he finished talking.. But I did LOOK at his jaw first and Sam made a comment about it.
comment:11 by , 21 years ago
Owner: | set to |
---|---|
Resolution: | → outdated |
Status: | new → closed |
comment:12 by , 21 years ago
Are you sure it's fixed? Because the bug as originally described (pushing the button while the T-Rex is speaking restarts the speech instead of stopping it) still happens when I try it.
Doing any other action (or even changing the mouse cursor) will stop the speech (though Sam won't say anything about it), but that's how it's always been.
I don't know how the original interpreter behaves here.
comment:14 by , 21 years ago
Owner: | removed |
---|---|
Status: | closed → new |
comment:15 by , 21 years ago
The original interpreter acts as follows:
Pushing the button starts AND stops the dinosaur's dialogue, keeping his mouth in whatever position it's in when you stop it.
Doing anything except pushing the button does not stop the dialogue. You can even leave the screen and come back, and he'll still be talking (I believe). I'm not sure if Murray The Mammoth overrides him, though.
comment:16 by , 21 years ago
> You can even leave the screen and come back, and he'll > still be talking (I believe).
I've looked at the game scripts again, perhaps with greater understanding than the last time, and I don't really see how it could do this. I may still be misunderstanding though. I looked at Wally (the mammoth) since he's a bit less complicated than Rex. This is the script for Wally's button, roomobj-59-565:
Events: 3 - 0044 4 - 000F [000F] (BB) talkEgo(:sound:"`Push Button to Hear Wally Speak!`") [0043] (65) stopObjectCodeA() [0044] (5D) if (0== var151) { [004B] (82) animateActor(2,10) [0052] (6C) break() [0053] (82) animateActor(2,3) [005A] (6C) break() [005B] (43) g_verb_script = 201 [0061] (5E) startScriptEx(0,210,[]) [006D] (73) } else { [006B] (BB) talkEgo(:sound:"That was informative.") [0095] (**) } [0095] (65) stopObjectCodeA() END
The room-59-210 script loops Wally's speech. It also runs room-59-203 which I think is what's doing the squeaking noises of Wally's mouth. Note that it also changes the verb script to room-59-201. This script is run whenever the use does something, including right-clicking to change the mouse cursor apparently:
Script# 201 [0000] (82) animateActor(2,3) [0007] (5D) if (isScriptRunning(204)) {
[snipped -- script 204 is running when Rex is talking, not Wally]
[008C] (73) } else { [008A] (7C) stopScript(203) [0091] (7C) stopScript(210) [0095] (AC) soundKludge([14,82,0,1,0,30]) [00AB] (AC) soundKludge([14,80,0,1,127,60]) [00C1] (B4) print_0_begin() [00C3] (B4) print_0_msg(" ") [00C7] (B6) print_2_begin() [00C9] (B6) print_2_msg(:sound:" ") [00DD] (43) var151 = 1 [00E3] (**) } [00E3] (43) g_verb_script = 48 [00E9] (5E) startScriptEx(0,48,[localvar0,localvar1,localvar2]) [00FC] (43) var151 = 0 [0102] (66) stopObjectCodeB() END
So any action from the user will stop Wally's script, change the music (I think), set var151 to 1 and then run the original verb script, script-48, before setting var151 to 0 again. When script-48 invokes Wally's button script, it should probably display the "That was informative." message, since var151 ought to be 1. But this is where I think ScummVM may be buggy. The verb script uses the doSentence(3, 565, 0) opcode to trigger event 3 in object 565, but the way we implement this it's *not* instantaneous. The event is queued and run later. And by the time it is, the script above has already reset var151 to 0.
But I don't understand things well enough to fix it, unfortunately.
comment:17 by , 21 years ago
I looked at s&m disassmbly aquadran provided. Our doSentence opcode is correct. Likewise, runScript / runScriptNested seem to work correct. But of course there are many possible spots in the engine where a subtle change could potentially cause / fix the problem described here.
comment:19 by , 20 years ago
Resolution: | outdated → invalid |
---|
comment:20 by , 20 years ago
This isn't a ScummVM bug and the original game acts exactly the same, I just checked CD version. So maybe we should add the suggested hack of a manual break for script at this exact location, as a work around ?
comment:22 by , 20 years ago
The hack mentioned by eriktorbjorn at end of document at http://www.update.uu.se/~d91tan/ScummVM/snm- dinosaur.txt
comment:23 by , 20 years ago
Status: | new → closed |
---|
comment:24 by , 20 years ago
Added eriktorbjorn's suggested hack as work around for bug in original game.
comment:25 by , 20 years ago
Owner: | set to |
---|---|
Resolution: | invalid → fixed |
At the Dinosaur Park, Mount Rushmore (S'n'M)