aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/animation.cpp
diff options
context:
space:
mode:
authorRobert Špalek2009-11-22 05:10:31 +0000
committerRobert Špalek2009-11-22 05:10:31 +0000
commit0ee8f879fa718a7507f1b22108b7d173edd7bdb5 (patch)
tree40538b56c5dbcbab83d5ba3201414e85340de7ba /engines/draci/animation.cpp
parent509444cc9135e7d0bf7212ce01a1d61f8dcf0680 (diff)
downloadscummvm-rg350-0ee8f879fa718a7507f1b22108b7d173edd7bdb5.tar.gz
scummvm-rg350-0ee8f879fa718a7507f1b22108b7d173edd7bdb5.tar.bz2
scummvm-rg350-0ee8f879fa718a7507f1b22108b7d173edd7bdb5.zip
Fix positioning of one-time hero animations.
With the previous code, the position of the animation was doubled (due to counting the position twice, the second time being a relative shift), which put it mostly outside the screen. This is because one-time hero animations are actually stored using absolute coordinates. svn-id: r46057
Diffstat (limited to 'engines/draci/animation.cpp')
-rw-r--r--engines/draci/animation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp
index dc14c7bb0d..4012719add 100644
--- a/engines/draci/animation.cpp
+++ b/engines/draci/animation.cpp
@@ -43,6 +43,7 @@ Animation::Animation(DraciEngine *vm, int id, uint z, bool playing) : _vm(vm) {
_currentFrame = 0;
_hasChangedFrame = true;
_callback = &Animation::doNothing;
+ _isRelative = false;
}
Animation::~Animation() {
@@ -556,6 +557,7 @@ Animation *AnimationManager::load(uint animNum) {
insert(anim, true);
anim->setLooping(cyclic);
+ anim->setIsRelative(relative);
for (uint i = 0; i < numFrames; ++i) {
uint spriteNum = animationReader.readUint16LE() - 1;