Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#8037 closed patch

Fix for Sam & Max animation glitch

Reported by: eriktorbjorn Owned by:
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Sam and Max

Description

There is a slight animation bug when Sam & Max have disguised themselves as a bigfoot. Sometimes Sam's lips move when Max is speaking, and vice versa.

This phenomenon can be triggered by saying something profound to Evelyn Morrison or the eating bigfoot, or by asking (first time only) the eating bigfoot about Bruno. There are other cases as well, but these are the ones I've found that are the easiest to trigger.

The animation frame to use is embedded in the message to speak, and CHARSET_1() decodes that just fine. Problem is, that part of the code doesn't have the final say in the matter. In these cases:

* actorTalk() will call a->startAnimActor(a->talkFrame1) * CHARSET_1() will call a->startAnimActor(a->talkFrame1) * CHARSET_1() will call a->startAnimActor(frme) * processSfxQueues() will call a->startAnimActor(a->talkFrame1)

And since processSfxQueues() isn't called until after the screen has been updated, you will get one frame of the right animation, before the wrong one kicks in.

Note that, at least at the moment, it's not sufficient to simply set a->talkFrame1 = frme, because not every message specifies a starting frame. The original value needs to be kept as default.

By the way, the reason the same bug doesn't happen with the Kushman brothers is because that script doesn't use embedded commands. Instead it uses o6_actorSet() to explicitly set the talk frames before each line.

Fortunately, processSfxQueues()'s call to startAnimActor() seems to be triggered only from CHARSET_1(), so fixing the bug becomes mostly a matter of fixing that one function. The included patch does the following:

A fourth parameter is added to talkSound() to specify the talk sound frame, or -1 to indicate that the default should be used. This also requires a small update to processSfxQueues(), of course.

CHARSET_1() won't call talkSound() or startAnimActor() until after all the commands embedded into the message have been processed.

Ticket imported from: #606595. Ticket imported from: patches/142.

Attachments (2)

samanim.diff (4.0 KB ) - added by eriktorbjorn 22 years ago.
Patch against a September 8 CVS snapshot
samnmax.s30 (66.6 KB ) - added by eriktorbjorn 22 years ago.
Savegame with Sam and Max in disguise

Download all attachments as: .zip

Change History (7)

by eriktorbjorn, 22 years ago

Attachment: samanim.diff added

Patch against a September 8 CVS snapshot

by eriktorbjorn, 22 years ago

Attachment: samnmax.s30 added

Savegame with Sam and Max in disguise

comment:1 by eriktorbjorn, 22 years ago

Summary: MAX: fix for Sam & Max animation glitchFix for Sam & Max animation glitch

comment:2 by eriktorbjorn, 22 years ago

The problem described above is the same as reported in bug report #606700: Wrong character talks as yeti

comment:3 by Kirben, 22 years ago

Status: newclosed

comment:4 by Kirben, 22 years ago

Patch added to cvs

comment:5 by digitall, 6 years ago

Component: Engine: SCUMM
Game: Sam and Max
Note: See TracTickets for help on using tickets.