[ scummvm-Patches-650135 ] FOA: Possible fixes for bug #649540

noreply at sourceforge.net noreply at sourceforge.net
Sat Dec 7 19:43:21 CET 2002


Patches item #650135, was opened at 2002-12-07 19:43
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=650135&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Torbjörn Andersson (eriktorbjorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: FOA: Possible fixes for bug #649540

Initial Comment:
I've been looking at bug #649540 ("INDY4 CD: Tikal
bird..."), and I know what's causing it.

When you talk to the parrot, the script instructs Sohia
to walk to a certain spot, waits for her to stop
moving, and then tells her to turn and face left. This
is what the script looks like:

[0057] (9E) walkActorTo(Var[1],610,115)
[005E] (80) breakHere()
[005F] (80) breakHere()
[0060] (80) breakHere()
[0061] (80) breakHere()
[0062] (80) breakHere()
[0063] (80) breakHere()
[0064] (9E) walkActorTo(Var[182],650,120)
[006B] (12) panCameraTo(600)
[006E] (AE) WaitForActor(Var[182])
[0072] (AE) WaitForActor(Var[1])
[0076] (11) animateCostume(2,244)
[0079] (11) animateCostume(1,244)
[007C] (AE) WaitForCamera()

The turnToDirection() function will set Sophia's
'moving' variable to indicate she's turning, and then
trust walkActors() to do the actual turning. However,
only actors that are actually in the room are walked,
and in this case Sophia isn't. So the next time you
talk to the parrot, the WaitForActor opcode will never
terminate.

There are several possible ways of fixing this, and I'm
going to need some help deciding which one is the most
appropriate.

1. Make animateActor() a no-op if the actor isn't present.
2. Make walkActors() mark actors who aren't present as
not moving.
3. Make WaitForActor terminate if the actor isn't present.

1 is perhaps the most direct approach, but it's
probably worth noting that 3 is most similar to already
existing code -- the "wait until actor drawn" case in
script_v2.cpp already checks if the actor is present.

I haven't done any regression testing of either of
these, and in the case of 3 I haven't even checked if
o6_wait() is working, since FOA uses o5_wait().

All patches are made against the same December 6 CVS
snapshot.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=650135&group_id=37116




More information about the Scummvm-tracker mailing list