aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/animation.h
diff options
context:
space:
mode:
authorDenis Kasak2009-07-24 01:54:13 +0000
committerDenis Kasak2009-07-24 01:54:13 +0000
commita2bca06b3fe00379d8accf29e7f442fe0a3cd781 (patch)
tree51ece4e3f0baf6da31dbf89905373f356a6945fe /engines/draci/animation.h
parent1726cc8d247f2ad8ac5b4136b866055d3e30155b (diff)
downloadscummvm-rg350-a2bca06b3fe00379d8accf29e7f442fe0a3cd781.tar.gz
scummvm-rg350-a2bca06b3fe00379d8accf29e7f442fe0a3cd781.tar.bz2
scummvm-rg350-a2bca06b3fe00379d8accf29e7f442fe0a3cd781.zip
Added support for per-animation scaling (via scaling factors). I have decided to go for a mixed approach (where Animation has a global scaling factor for the whole animation which is separate from Drawable's scaled width and height) so the animation can be scaled more naturally when the scale often changes (like with perspective when the dragon is walking). Previously, one had to alter the sizes of each frame of the dragon's animation whenever the dragon moved which was unclean.
svn-id: r42680
Diffstat (limited to 'engines/draci/animation.h')
-rw-r--r--engines/draci/animation.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/draci/animation.h b/engines/draci/animation.h
index 0e29934699..683af7c812 100644
--- a/engines/draci/animation.h
+++ b/engines/draci/animation.h
@@ -66,6 +66,8 @@ public:
int getRelativeX();
int getRelativeY();
+ void setScaleFactors(double scaleX, double scaleY);
+
void markDirtyRect(Surface *surface);
private:
@@ -79,6 +81,9 @@ private:
int _relX;
int _relY;
+ double _scaleX;
+ double _scaleY;
+
uint _tick;
bool _playing;
bool _looping;