From 9c2139f8b11f554cbc884bbb52278399e6994074 Mon Sep 17 00:00:00 2001 From: Tametomo Date: Wed, 15 Apr 2009 20:08:21 +0200 Subject: Moved tile animations outside of the clock time polling loop. There's no need to poll the CPU for them, when they already can compensate for missed clock ticks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tametomo Signed-off-by: Bjørn Lindeijer --- src/map.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 09bed293..c49ebb12 100644 --- a/src/map.h +++ b/src/map.h @@ -73,7 +73,7 @@ class TileAnimation public: TileAnimation(Animation *ani); ~TileAnimation(); - void update(); + void update(int ticks = 1); void addAffectedTile(MapLayer *layer, int index) { mAffected.push_back(std::make_pair(layer, index)); } private: @@ -169,9 +169,9 @@ class Map : public Properties void initializeOverlays(); /** - * Updates animations. Called every game tick. + * Updates animations. Called as needed. */ - void update(); + void update(int ticks = 1); /** * Draws the map to the given graphics output. This method draws all -- cgit v1.2.3-70-g09d2