summaryrefslogtreecommitdiff
path: root/src/gui
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
parent51e14c9d7aab75fe60f68d4943759eef66eafe9a (diff)
downloadmana-client-242e3bb8d92def67d5c30f2f2fd974cfb117ec04.tar.gz
mana-client-242e3bb8d92def67d5c30f2f2fd974cfb117ec04.tar.bz2
mana-client-242e3bb8d92def67d5c30f2f2fd974cfb117ec04.tar.xz
mana-client-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')
-rw-r--r--src/gui/debugwindow.cpp21
-rw-r--r--src/gui/debugwindow.h1
-rw-r--r--src/gui/setup_video.cpp4
3 files changed, 8 insertions, 18 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"),
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index 50a5fc06..1ef32e02 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -50,7 +50,6 @@ class DebugWindow : public Window
Label *mParticleCountLabel, *mParticleDetailLabel;
Label *mAmbientDetailLabel;
-
std::string mFPSText;
};
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index aaa3ea35..f5bff9ba 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -22,7 +22,7 @@
#include "gui/setup_video.h"
#include "configuration.h"
-#include "engine.h"
+#include "game.h"
#include "graphics.h"
#include "localplayer.h"
#include "log.h"
@@ -502,7 +502,7 @@ void Setup_Video::action(const gcn::ActionEvent &event)
mParticleEffectsCheckBox->isSelected());
Particle::enabled = mParticleEffectsCheckBox->isSelected();
- if (engine)
+ if (Game::instance())
{
new OkDialog(_("Particle Effect Settings Changed."),
_("Changes will take effect on map change."));