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/game.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 750725db..2ee4ad13 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -41,6 +41,7 @@ #include "keyboardconfig.h" #include "localplayer.h" #include "log.h" +#include "map.h" #include "npc.h" #include "particle.h" #include "player_relations.h" @@ -95,8 +96,6 @@ #include "utils/gettext.h" -class Map; - std::string map_path; bool done = false; @@ -473,6 +472,9 @@ void Game::logic() while (!done) { + if (Map *map = engine->getCurrentMap()) + map->update(get_elapsed_time(gameTime)); + // Handle all necessary game logic while (get_elapsed_time(gameTime) > 0) { -- cgit v1.2.3-70-g09d2