aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/animator.cpp
diff options
context:
space:
mode:
authorOystein Eftevaag2007-01-06 17:11:08 +0000
committerOystein Eftevaag2007-01-06 17:11:08 +0000
commit8fbf9a1e238ca0a341b1a79ef9362e0d6eb2bd29 (patch)
treee1ae76674b15f7ffef487839563e58d1f3342ba4 /engines/kyra/animator.cpp
parent5e2bd94f7a22d826be0606baceef10d522aec4d3 (diff)
downloadscummvm-rg350-8fbf9a1e238ca0a341b1a79ef9362e0d6eb2bd29.tar.gz
scummvm-rg350-8fbf9a1e238ca0a341b1a79ef9362e0d6eb2bd29.tar.bz2
scummvm-rg350-8fbf9a1e238ca0a341b1a79ef9362e0d6eb2bd29.zip
A few minor fixes and optimizations (biggest one is splitting decodeFrameDeltaPage() into two functions to avoid a high amount of conditional jumps per decided animation frame
svn-id: r25034
Diffstat (limited to 'engines/kyra/animator.cpp')
-rw-r--r--engines/kyra/animator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/kyra/animator.cpp b/engines/kyra/animator.cpp
index 8d28bcc934..3a632634cd 100644
--- a/engines/kyra/animator.cpp
+++ b/engines/kyra/animator.cpp
@@ -677,8 +677,9 @@ void ScreenAnimator::animRefreshNPC(int character) {
animObj->x1 = ch->x1;
animObj->y1 = ch->y1;
- _brandonScaleX = _vm->_scaleTable[ch->y1];
- _brandonScaleY = _vm->_scaleTable[ch->y1];
+ int newScale = _vm->_scaleTable[ch->y1];
+ _brandonScaleX = newScale;
+ _brandonScaleY = newScale;
animObj->x1 += (_brandonScaleX * xOffset) >> 8;
animObj->y1 += (_brandonScaleY * yOffset) >> 8;