summaryrefslogtreecommitdiff
path: root/src/gui/debugwindow.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-05 22:15:43 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-06 21:25:37 +0100
commit242e3bb8d92def67d5c30f2f2fd974cfb117ec04 (patch)
tree7f247e04e238a0edc0281ec8ed85539b2be81137 /src/gui/debugwindow.cpp
parent51e14c9d7aab75fe60f68d4943759eef66eafe9a (diff)
downloadmana-242e3bb8d92def67d5c30f2f2fd974cfb117ec04.tar.gz
mana-242e3bb8d92def67d5c30f2f2fd974cfb117ec04.tar.bz2
mana-242e3bb8d92def67d5c30f2f2fd974cfb117ec04.tar.xz
mana-242e3bb8d92def67d5c30f2f2fd974cfb117ec04.zip
Merged the Engine class into the Game class
There was little point in keeping the Engine class separate. It wasn't an engine at all, but only kept track of the currently active map, a job more suitable for the Game class anyway.
Diffstat (limited to 'src/gui/debugwindow.cpp')
-rw-r--r--src/gui/debugwindow.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 2b5616cb..f4f2fd14 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -21,7 +21,6 @@
#include "gui/debugwindow.h"
-#include "engine.h"
#include "game.h"
#include "particle.h"
#include "main.h"
@@ -93,24 +92,16 @@ void DebugWindow::logic()
mFPSLabel->setCaption(strprintf(mFPSText.c_str(), fps));
- mTileMouseLabel->setCaption(strprintf(_("Cursor: (%d, %d)"), mouseTileX,
+ mTileMouseLabel->setCaption(strprintf(_("Cursor: (%d, %d)"),
+ mouseTileX,
mouseTileY));
- Map *currentMap = engine->getCurrentMap();
- if (currentMap)
+ if (const Map *map = Game::instance()->getCurrentMap())
{
// TODO: Add gettext support below
- const std::string music =
- "Music: " + currentMap->getProperty("music");
- mMusicFileLabel->setCaption(music);
-
- const std::string minimap =
- "Minimap: " + currentMap->getProperty("minimap");
- mMinimapLabel->setCaption(minimap);
-
- const std::string map =
- "Map: " + currentMap->getProperty("_filename");
- mMapLabel->setCaption(map);
+ mMusicFileLabel->setCaption("Music: " + map->getProperty("music"));
+ mMinimapLabel->setCaption("Minimap: " + map->getProperty("minimap"));
+ mMapLabel->setCaption("Map: " + map->getProperty("_filename"));
}
mParticleCountLabel->setCaption(strprintf(_("Particle count: %d"),