summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-10 12:11:46 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-10 12:11:46 +0000
commit15b70d6b622ae2ba3cc4a605da20d307c13c1d76 (patch)
treeadca65679a4b4686d36352776eb1ffd937732363 /src/gui
parent586841e238c6d6264a5495ec36a3eb103565a7d9 (diff)
downloadmana-15b70d6b622ae2ba3cc4a605da20d307c13c1d76.tar.gz
mana-15b70d6b622ae2ba3cc4a605da20d307c13c1d76.tar.bz2
mana-15b70d6b622ae2ba3cc4a605da20d307c13c1d76.tar.xz
mana-15b70d6b622ae2ba3cc4a605da20d307c13c1d76.zip
Don't include debugwindow.h/cpp twice in Makefile.am
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/debugwindow.cpp24
-rw-r--r--src/gui/debugwindow.h3
2 files changed, 17 insertions, 10 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp
index 3823ab6a..2c125c62 100644
--- a/src/gui/debugwindow.cpp
+++ b/src/gui/debugwindow.cpp
@@ -22,14 +22,17 @@
*/
#include "debugwindow.h"
+#include "button.h"
+#include "minimap.h"
#include <guichan/widgets/label.hpp>
-#include "button.h"
#include <sstream>
-#include "minimap.h"
+
#include "../game.h"
#include "../graphics.h"
#include "../engine.h"
+#include "../map.h"
+
extern Graphics *graphics;
extern Minimap *minimap;
extern int frame;
@@ -72,7 +75,8 @@ DebugWindow::~DebugWindow()
delete closeButton;
}
-void DebugWindow::logic()
+void
+DebugWindow::logic()
{
// Get the current mouse position
int mouseX, mouseY;
@@ -80,7 +84,7 @@ void DebugWindow::logic()
int mouseTileX = mouseX / 32 + camera_x;
int mouseTileY = mouseY / 32 + camera_y;
-std::stringstream updatedText;
+ std::stringstream updatedText;
updatedText << "[" << fps << " FPS]";
FPSLabel->setCaption(updatedText.str());
FPSLabel->adjustSize();
@@ -92,21 +96,23 @@ std::stringstream updatedText;
updatedText.str("");
mCurrentMap = engine->getCurrentMap();
+
if (mCurrentMap != NULL)
{
- updatedText
- << " [Music File: " << mCurrentMap->getProperty("music") << "]";
+ updatedText << " [Music File: "
+ << mCurrentMap->getProperty("music") << "]";
musicFileLabel->setCaption(updatedText.str());
musicFileLabel->adjustSize();
updatedText.str("");
- updatedText
- << " [MiniMap File: " << mCurrentMap->getProperty("minimap") << "]";
+ updatedText << " [MiniMap File: "
+ << mCurrentMap->getProperty("minimap") << "]";
mapFileLabel->setCaption(updatedText.str());
mapFileLabel->adjustSize();
}
}
-void DebugWindow::action(const std::string& eventId)
+void
+DebugWindow::action(const std::string& eventId)
{
if (eventId == "close")
{
diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h
index e9222d53..5949cc78 100644
--- a/src/gui/debugwindow.h
+++ b/src/gui/debugwindow.h
@@ -29,9 +29,10 @@
#include <guichan/actionlistener.hpp>
#include "window.h"
-#include "../map.h"
#include "../guichanfwd.h"
+class Map;
+
/**
* The chat window.
*