summaryrefslogtreecommitdiff
path: root/src/animatedsprite.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-05-20 01:35:17 -0600
committerJared Adams <jaxad0127@gmail.com>2010-05-20 12:25:37 -0600
commit487a86fe7dc9904f445d91667095f641f72f7c81 (patch)
tree57191d175f7b2fe771f6b2da225bc2d9cb5ff1d9 /src/animatedsprite.h
parent36832f3a5378f739da7040f0711b7101dbc2af02 (diff)
downloadmana-client-487a86fe7dc9904f445d91667095f641f72f7c81.tar.gz
mana-client-487a86fe7dc9904f445d91667095f641f72f7c81.tar.bz2
mana-client-487a86fe7dc9904f445d91667095f641f72f7c81.tar.xz
mana-client-487a86fe7dc9904f445d91667095f641f72f7c81.zip
Buffer layered sprites under SDL
This improves framerate and allows transparent overlay for complex sprites. Two copies of the buffer are kept, one at full opacity, one with variable opactiy, to reduce calls to setAlpha. Reviewed-by: Bertram
Diffstat (limited to 'src/animatedsprite.h')
-rw-r--r--src/animatedsprite.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/animatedsprite.h b/src/animatedsprite.h
index 833a07a3..aae116be 100644
--- a/src/animatedsprite.h
+++ b/src/animatedsprite.h
@@ -54,11 +54,11 @@ class AnimatedSprite : public Sprite
virtual ~AnimatedSprite();
- void reset();
+ bool reset();
- void play(SpriteAction action);
+ bool play(SpriteAction action);
- void update(int time);
+ bool update(int time);
bool draw(Graphics* graphics, int posX, int posY) const;
@@ -66,9 +66,9 @@ class AnimatedSprite : public Sprite
int getHeight() const;
- Image* getImage() const;
+ const Image* getImage() const;
- void setDirection(SpriteDirection direction);
+ bool setDirection(SpriteDirection direction);
int getNumberOfLayers()
{ return 1; }