aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/animation.cpp
diff options
context:
space:
mode:
authorRobert Špalek2009-10-11 23:01:59 +0000
committerRobert Špalek2009-10-11 23:01:59 +0000
commitf71b32dd96cc524fbb433752ea2ead51e1cf02a4 (patch)
tree51ad784a13c13329955c7859aef83862b790983b /engines/draci/animation.cpp
parente2db155b1a82150a4c651a643b6a4343e810b8e9 (diff)
downloadscummvm-rg350-f71b32dd96cc524fbb433752ea2ead51e1cf02a4.tar.gz
scummvm-rg350-f71b32dd96cc524fbb433752ea2ead51e1cf02a4.tar.bz2
scummvm-rg350-f71b32dd96cc524fbb433752ea2ead51e1cf02a4.zip
Loading and caching sound samples in memory.
The sounds are not played yet, but the infrastructure is getting ready. svn-id: r44957
Diffstat (limited to 'engines/draci/animation.cpp')
-rw-r--r--engines/draci/animation.cpp6
1 files changed, 4 insertions, 2 deletions
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);
}