From c8b0d1e56f27c3141895d28b2fc768afffe7bb2d Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 21 Feb 2010 20:40:07 +0100 Subject: Made tick counter and framerate limiter work during login sequence Much code was moved from main() to the new Client::exec(). This new event loop now integrates with the Game class, so that the tick counter and framerate limiter apply universally. The Client class is also responsible for some things that used to be global variables. Mantis-issue: ... --- src/map.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 7c45050b..6d332d48 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -19,11 +19,12 @@ * along with this program. If not, see . */ +#include "map.h" + #include "beingmanager.h" +#include "client.h" #include "configuration.h" -#include "game.h" #include "graphics.h" -#include "map.h" #include "particle.h" #include "simpleanimation.h" #include "sprite.h" @@ -38,8 +39,6 @@ #include -extern volatile int tick_time; - /** * A location on a tile map. Used for pathfinding, open list. */ @@ -291,14 +290,13 @@ bool spriteCompare(const Sprite *a, const Sprite *b) void Map::update(int ticks) { - //update animated tiles + // Update animated tiles for (std::map::iterator iAni = mTileAnimations.begin(); iAni != mTileAnimations.end(); iAni++) { iAni->second->update(ticks); } - } void Map::draw(Graphics *graphics, int scrollX, int scrollY) -- cgit v1.2.3-60-g2f50