From 15b70d6b622ae2ba3cc4a605da20d307c13c1d76 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 10 Oct 2005 12:11:46 +0000 Subject: Don't include debugwindow.h/cpp twice in Makefile.am --- ChangeLog | 1 + src/Makefile.am | 2 -- src/gui/debugwindow.cpp | 24 +++++++++++++++--------- src/gui/debugwindow.h | 3 ++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6040e2a8..5aefa930 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * src/being.cpp, src/being.h, src/game.cpp: Always compile with debug window and hide it on startup. Also added fading out effect on damage font (only works in OpenGL). + * src/Makefile.am: Don't include debugwindow.h/cpp twice. 2005-10-09 Yohann Ferreira diff --git a/src/Makefile.am b/src/Makefile.am index 63d8553f..1284e7bb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -110,8 +110,6 @@ tmw_SOURCES = graphic/spriteset.cpp \ gui/hbox.cpp \ gui/updatewindow.h \ gui/updatewindow.cpp \ - gui/debugwindow.cpp \ - gui/debugwindow.h \ net/messagein.cpp \ net/messagein.h \ net/messageout.cpp \ 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 -#include "button.h" #include -#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 #include "window.h" -#include "../map.h" #include "../guichanfwd.h" +class Map; + /** * The chat window. * -- cgit v1.2.3-70-g09d2