aboutsummaryrefslogtreecommitdiff
path: root/queen/graphics.cpp
diff options
context:
space:
mode:
authorGregory Montoir2004-04-06 20:15:19 +0000
committerGregory Montoir2004-04-06 20:15:19 +0000
commit4fef6d8972cf34f0c6ea709b801183df65757b7f (patch)
treef4526de9e07783078bfe48de7cf5ce9ab4039e14 /queen/graphics.cpp
parent36d667b2b599a8c58c7e0d52e47afc2a3f828ea0 (diff)
downloadscummvm-rg350-4fef6d8972cf34f0c6ea709b801183df65757b7f.tar.gz
scummvm-rg350-4fef6d8972cf34f0c6ea709b801183df65757b7f.tar.bz2
scummvm-rg350-4fef6d8972cf34f0c6ea709b801183df65757b7f.zip
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
Diffstat (limited to 'queen/graphics.cpp')
-rw-r--r--queen/graphics.cpp7
1 files changed, 7 insertions, 0 deletions
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)