summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 8b952ebd..8d5d0cf8 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -67,10 +67,7 @@
#include "gui/status.h"
#include "gui/ministatus.h"
#include "gui/trade.h"
-
-#ifdef DEBUG
#include "gui/debugwindow.h"
-#endif
#include "net/messagein.h"
#include "net/messageout.h"
@@ -120,9 +117,7 @@ TradeWindow *tradeWindow;
//BuddyWindow *buddyWindow;
HelpWindow *helpWindow;
PopupMenu *popupMenu;
-#ifdef DEBUG
DebugWindow *debugWindow;
-#endif
Inventory *inventory = NULL;
@@ -223,9 +218,8 @@ void createGuiWindows()
//buddyWindow = new BuddyWindow();
helpWindow = new HelpWindow();
popupMenu = new PopupMenu();
-#ifdef DEBUG
debugWindow = new DebugWindow();
-#endif
+
// Initialize window positions
int screenW = graphics->getWidth();
int screenH = graphics->getHeight();
@@ -259,9 +253,8 @@ void createGuiWindows()
//buddyWindow->setVisible(false);
helpWindow->setVisible(false);
popupMenu->setVisible(false);
-#ifdef DEBUG
- debugWindow->setVisible(true);
-#endif
+ debugWindow->setVisible(false);
+
// Do not focus any text field
gui->focusNone();
}
@@ -291,9 +284,7 @@ void destroyGuiWindows()
//delete buddyWindow;
delete helpWindow;
delete popupMenu;
-#ifdef DEBUG
delete debugWindow;
-#endif
}
void do_init()
@@ -649,14 +640,12 @@ void do_input()
setupWindow->requestMoveToTop();
used = true;
break;
-#ifdef DEBUG
+
// Debug window
case SDLK_d:
- debugWindow->setVisible(!debugWindow->isVisible());
- if (debugWindow->isVisible()) debugWindow->requestMoveToTop();
- used = true;
+ requestedWindow = debugWindow;
break;
-#endif
+
// screenshot (picture, hence the p)
case SDLK_p:
{