summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-04-15 20:08:21 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-15 20:10:13 +0200
commit9c2139f8b11f554cbc884bbb52278399e6994074 (patch)
treeb9b71740adb94bf9fd37d75dfb750cf34312806d /src/map.h
parentdcca13ea04fd7aa9b1539c1325cd0e465f9b545a (diff)
downloadmana-9c2139f8b11f554cbc884bbb52278399e6994074.tar.gz
mana-9c2139f8b11f554cbc884bbb52278399e6994074.tar.bz2
mana-9c2139f8b11f554cbc884bbb52278399e6994074.tar.xz
mana-9c2139f8b11f554cbc884bbb52278399e6994074.zip
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. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h6
1 files changed, 3 insertions, 3 deletions
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