summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-10 02:24:56 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-10 02:24:56 +0000
commitdecb141cc131cfd5f7e44e1ac4ca9e1e6525e686 (patch)
treeab1973915b960ecf54853c6058b212f3fc50aaf9 /src/game.cpp
parent31047c05a9b56c101566301d81931c66bc4b9ecd (diff)
downloadmana-decb141cc131cfd5f7e44e1ac4ca9e1e6525e686.tar.gz
mana-decb141cc131cfd5f7e44e1ac4ca9e1e6525e686.tar.bz2
mana-decb141cc131cfd5f7e44e1ac4ca9e1e6525e686.tar.xz
mana-decb141cc131cfd5f7e44e1ac4ca9e1e6525e686.zip
Always compile with debug window and hide it on startup. Also added fading out
effect on damage font (only works in OpenGL).
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:
{