From f71b32dd96cc524fbb433752ea2ead51e1cf02a4 Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Sun, 11 Oct 2009 23:01:59 +0000 Subject: Loading and caching sound samples in memory. The sounds are not played yet, but the infrastructure is getting ready. svn-id: r44957 --- engines/draci/animation.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/draci/animation.cpp') diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp index 3429884397..c3ae4a8f12 100644 --- a/engines/draci/animation.cpp +++ b/engines/draci/animation.cpp @@ -191,8 +191,9 @@ double Animation::getScaleY() const { return _displacement.extraScaleY; } -void Animation::addFrame(Drawable *frame) { +void Animation::addFrame(Drawable *frame, const SoundSample *sample) { _frames.push_back(frame); + _samples.push_back(sample); } int Animation::getIndex() const { @@ -246,6 +247,7 @@ void Animation::deleteFrames() { delete _frames[i]; _frames.pop_back(); } + _samples.clear(); } void Animation::stopAnimation() { @@ -382,7 +384,7 @@ void AnimationManager::addOverlay(Drawable *overlay, uint z) { anim->setID(kOverlayImage); anim->setZ(z); anim->setPlaying(true); - anim->addFrame(overlay); + anim->addFrame(overlay, NULL); insertAnimation(anim); } -- cgit v1.2.3