From 4fef6d8972cf34f0c6ea709b801183df65757b7f Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Tue, 6 Apr 2004 20:15:19 +0000 Subject: fix for bug #928549. Animations on objects/persons setup by cutaways can still be played after the end of the cutscene. (the only ?) one room in which this is reproducable is the first time you talk to the Oracle (first c44, then c47). As a Cutaway object is created for each cutscene, the _cutAnim member should be moved to an more "persistant" object. Otherwise we're reading data from free'd memory... svn-id: r13488 --- queen/graphics.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'queen/graphics.cpp') diff --git a/queen/graphics.cpp b/queen/graphics.cpp index 22ebf7de3f..a9dcebfd6b 100644 --- a/queen/graphics.cpp +++ b/queen/graphics.cpp @@ -600,6 +600,13 @@ void Graphics::setupNewRoom(const char *room, uint16 roomNum, int16 *furniture, } } +void Graphics::setBobCutawayAnim(uint16 bobNum, bool xflip, const AnimFrame *af, uint8 frameCount) { + assert(bobNum < 21 && frameCount < 30); + memcpy(_cutAnim[bobNum], af, sizeof(AnimFrame) * frameCount); + _bobs[bobNum].xflip = xflip; + _bobs[bobNum].animString(_cutAnim[bobNum]); +} + void Graphics::fillAnimBuffer(const char *anim, AnimFrame *af) { for (;;) { // anim frame format is "%3hu,%3hu," (frame number, frame speed) -- cgit v1.2.3