Opened 10 years ago
Last modified 4 years ago
#6867 new defect
TOON: Missing Flux animation when asking him to open cupboard
Reported by: | eriktorbjorn | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Engine: Toon |
Version: | Keywords: | ||
Cc: | Game: | Toonstruck |
Description
English version of the game, current ScummVM Git snapshot
If you use Flux on the cupboard at the foot of the stairs in the first room, Flux explains that he can't open it, but that he is a pretty good dancer. At this point, the game plays a brief drum riff and he's supposed to - but doesn't - do a little dance.
My only theory is that sys_Cmd_Play_Flux_Anim() currently is a no-op, and it does get called at this point. But if so, I have no idea what it's supposed to do.
Ticket imported from: bugs/6867.
Attachments (2)
Change History (13)
comment:1 by , 10 years ago
Component: | Engine: ZVision → Engine: Toon |
---|---|
Game: | Zork Grand Inquisitor → Toonstruck |
by , 9 years ago
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Scratch that. I restarted ScummVM and loaded my savegame again, and now the sheep was animated, just like expected. So I guess there is a bug lurking in there, but it's not anywhere near as easy to reproduce as I first thought.
by , 9 years ago
comment:4 by , 9 years ago
I may have found how I got the bug to happen in the first place. In this new savegame, use the magnet on the haystack and then - without putting it away first - use the Churnatron part on the Churnatron. (In the previous savegame, I had already put the piece away.)
comment:5 by , 9 years ago
It also looks like I can only reproduce it if I press Space to skip Drew's lines. I don't know why that would also skip the sheep animation, which doesn't happen until a few seconds later...
comment:6 by , 4 years ago
The sys_Cmd_Play_Flux_Anim() apparently takes two parameters. This is what I see if I turn on script debugging:
[0x00001E28] EMCInterpreter::op_push([12/12]) [0x00001E2C] EMCInterpreter::op_push([38/38]) [0x00001E30] EMCInterpreter::op_sysCall([72/72]) [0x00001E34] EMCInterpreter::op_addSP([2/2])
On a hunch, I tried this:
int32 ScriptFunc::sys_Cmd_Play_Flux_Anim(EMCState *state) { _vm->getFlux()->playAnim(stackPos(0), 0, stackPos(1)); return 0; }
That does seem to start the correct animation. Unfortunately, the animation never stops.
(It's very easy to compare this behavior to the original in DOSBox, because the bug happens in the very first room of the game. All you have to do is walk down the stairs and then use Flux on the cupboard.)
comment:8 by , 4 years ago
Tested here and it looks good. Flux doesn't stop dancing until you do another action, but that may be the same as the original. Would need to test with original interpreter
to confirm.
comment:9 by , 4 years ago
In DOSBox, he does two or three cycles of the animation (I guess; I don't actually know where one cycle ends and the next begins) and then stops on his own. This is one reason why I never committed my proof-of-concept patch.
comment:10 by , 4 years ago
I did notice that there is some commented-out, incomplete code in Character::update() dealing with flag 4. Maybe that has something to do with it?
#if 0 // handle special anims if ((_flags & 4) == 0) return; if (_animScriptId != -1) { _animationInstance = _vm->getSceneAnimation(this->) #endif
Or maybe it's just that the code that comes after supersedes it?
comment:11 by , 4 years ago
Maybe the animation should stop once the sound effect it plays for it ends? But I don't see any mechanism for scripts to query if a sound is running or not.
On the other hand, Sys_Cmd_Play_Sfx_Plus() has some unhandled parameters, and sys_Cmd_Dummy() does get called (though not at a point where it would be used to stop the animation)...
There is another that I'm going to assume is missing for the same reason: After you repair the Chrurnatron, the cow and the sheep will thank you. The sheep isn't moving when she's talking. I've checked with DOSBox, and there she is moving. I'm attaching a savegame from right before repairing the Churnatron.