summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-13 12:49:52 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-13 12:49:52 +0000
commit10b881f997384378a299bff358716db5183b65a5 (patch)
tree2231d834a69c1db68980c1ccefdc6586df351fc0 /src/gui/gui.cpp
parentda5a71f65682dbb3f830be4d5ffcd0046aa7b7ce (diff)
downloadmana-10b881f997384378a299bff358716db5183b65a5.tar.gz
mana-10b881f997384378a299bff358716db5183b65a5.tar.bz2
mana-10b881f997384378a299bff358716db5183b65a5.tar.xz
mana-10b881f997384378a299bff358716db5183b65a5.zip
Huge header cleanup to reduce dependencies and compile time.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp54
1 files changed, 34 insertions, 20 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index bd6a9ba4..95cd85d7 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -22,14 +22,33 @@
*/
#include "gui.h"
+
+#include <guichan/exception.hpp>
+#include <guichan/imagefont.hpp>
+
+#ifdef USE_OPENGL
+#include <guichan/opengl/openglimageloader.hpp>
+#endif
+
+#include <guichan/sdl/sdlimageloader.hpp>
+#include <guichan/sdl/sdlinput.hpp>
+
+#include "focushandler.h"
#include "window.h"
#include "windowcontainer.h"
-#include "focushandler.h"
-#include "../net/protocol.h"
-#include "../main.h"
+
+#include "../being.h"
+#include "../configuration.h"
#include "../engine.h"
#include "../game.h"
+#include "../graphics.h"
#include "../log.h"
+#include "../main.h"
+#include "../map.h"
+
+#include "../net/protocol.h"
+
+#include "../resources/image.h"
#include "../resources/resourcemanager.h"
extern Being* autoTarget;
@@ -52,35 +71,30 @@ Gui::Gui(Graphics *graphics):
mMouseCursor(NULL),
mCustomCursor(false)
{
- // Set graphics
guiGraphics = graphics;
//setGraphics(graphics);
- if (useOpenGL) {
#ifdef USE_OPENGL
+ if (useOpenGL) {
+ // Set graphics
setGraphics((gcn::OpenGLGraphics*)graphics);
+
+ // Set image loader
+ mHostImageLoader = new gcn::SDLImageLoader();
+ mImageLoader = new gcn::OpenGLImageLoader(mHostImageLoader);
+ } else
#endif
- }
- else {
+ {
+ // Set graphics
setGraphics((gcn::SDLGraphics*)graphics);
+
+ // Set image loader
+ mImageLoader = new gcn::SDLImageLoader();
}
// Set input
guiInput = new gcn::SDLInput();
setInput(guiInput);
- // Set image loader
-#ifdef USE_OPENGL
- if (useOpenGL) {
- mHostImageLoader = new gcn::SDLImageLoader();
- mImageLoader = new gcn::OpenGLImageLoader(mHostImageLoader);
- }
- else {
- mImageLoader = new gcn::SDLImageLoader();
- }
-#else
- mImageLoader = new gcn::SDLImageLoader();
-#endif
-
gcn::Image::setImageLoader(mImageLoader);
// Set focus handler