Opened 19 years ago

Closed 16 years ago

Last modified 16 years ago

#269 closed defect (fixed)

SAM: Dinosaur does not stop properly

Reported by: SF/linnard Owned by: eriktorbjorn
Priority: low Component: Engine: SCUMM
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)

samnmax.000 (8.9 KB ) - added by SF/linnard 19 years ago.
At the Dinosaur Park, Mount Rushmore (S'n'M)
samnmax.s03 (64.0 KB ) - added by SF/linnard 19 years ago.
At the Dinosaur Park, Proper Save

Download all attachments as: .zip

Change History (27)

by SF/linnard, 19 years ago

Attachment: samnmax.000 added

At the Dinosaur Park, Mount Rushmore (S'n'M)

comment:1 by SF/ender, 19 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 SF/ender, 19 years ago

Priority: normallow

comment:3 by SF/linnard, 19 years ago

Removed file--wrong file uploaded. x.x

Will get savegame sometime today.

comment:4 by SF/linnard, 19 years ago

Or not, seeing as I'm not allowed to delete it.

by SF/linnard, 19 years ago

Attachment: samnmax.s03 added

At the Dinosaur Park, Proper Save

comment:5 by fingolfin, 19 years ago

Summary: Dinosaur does not stop properlySAM: Dinosaur does not stop properly

comment:6 by eriktorbjorn, 18 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:7 by fingolfin, 18 years ago

What is the status of this item?

comment:8 by eriktorbjorn, 18 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 SF/bagobones, 17 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:10 by SF/ender, 17 years ago

Closing, problem is obviously out of date and was fixed somewhere :)

comment:11 by SF/ender, 17 years ago

Owner: set to SF/ender
Resolution: outdated
Status: newclosed

comment:12 by eriktorbjorn, 17 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:13 by fingolfin, 17 years ago

This bug is *not* fixed nor out of date.

comment:14 by fingolfin, 17 years ago

Owner: SF/ender removed
Status: closednew

comment:15 by SF/linnard, 17 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 eriktorbjorn, 17 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 fingolfin, 17 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:18 by SF/noscript, 17 years ago

Did you use the latest build? I didnt had have this problem.

comment:19 by Kirben, 16 years ago

Resolution: outdatedinvalid

comment:20 by Kirben, 16 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:21 by fingolfin, 16 years ago

I am not sure which "suggested hack" you are referring to, Kirben... ?

comment:22 by Kirben, 16 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 Kirben, 16 years ago

Status: newclosed

comment:24 by Kirben, 16 years ago

Added eriktorbjorn's suggested hack as work around for bug in original game.

comment:25 by Kirben, 16 years ago

Owner: set to eriktorbjorn
Resolution: invalidfixed
Note: See TracTickets for help on using tickets.