diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 23:17:58 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 23:17:58 +0000 |
commit | 1c38618bb88e2e2b6f2c110382737e8e03c54a86 (patch) | |
tree | aa5a03382f0414b567dd07b0c595d0c73245316a | |
parent | 8e1c3b592c9ebcec9e006bcc54eea55bfea4a864 (diff) | |
download | mana-1c38618bb88e2e2b6f2c110382737e8e03c54a86.tar.gz mana-1c38618bb88e2e2b6f2c110382737e8e03c54a86.tar.bz2 mana-1c38618bb88e2e2b6f2c110382737e8e03c54a86.tar.xz mana-1c38618bb88e2e2b6f2c110382737e8e03c54a86.zip |
Started to fade out the useOpenGL global variable.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/graphics.cpp | 5 | ||||
-rw-r--r-- | src/graphics.h | 4 | ||||
-rw-r--r-- | src/gui/browserbox.cpp | 3 | ||||
-rw-r--r-- | src/gui/gui.cpp | 1 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/main.h | 1 | ||||
-rw-r--r-- | src/resources/image.cpp | 2 |
8 files changed, 13 insertions, 9 deletions
@@ -1,5 +1,9 @@ 2005-08-15 Björn Steinbrink <B.Steinbrink@gmx.de> + * M src/graphics.cpp, src/graphics.h, src/main.cpp, src/main.h, + src/gui/browserbox.cpp, src/gui/gui.cpp, src/resources/image.cpp: Started + to fade out the useOpenGL global variable. + * M src/engine.cpp, src/gui/char_select.cpp, src/gui/char_server.cpp, src/gui/chat.cpp, src/gui/gui.cpp, src/gui/gui.h, src/gui/login.cpp, src/gui/popupmenu.cpp, src/gui/setup.cpp, src/gui/updatewindow.cpp, diff --git a/src/graphics.cpp b/src/graphics.cpp index a0e5d921..e71052df 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -28,7 +28,6 @@ #endif #include "log.h" -#include "main.h" #include "graphic/imagerect.h" @@ -37,8 +36,8 @@ extern volatile int framesToDraw; -Graphics::Graphics(): - mScreen(0) +Graphics::Graphics(bool useOpenGL): + mScreen(0), useOpenGL(useOpenGL) { } diff --git a/src/graphics.h b/src/graphics.h index 4b6bdd67..cdbc4104 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -48,7 +48,7 @@ public gcn::SDLGraphics { /** * Constructor. */ - Graphics(); + Graphics(bool useOpenGL); /** * Destructor. @@ -145,7 +145,7 @@ public gcn::SDLGraphics { private: SDL_Surface *mScreen; - bool mFullscreen, mHWAccel; + bool mFullscreen, mHWAccel, useOpenGL; }; #endif diff --git a/src/gui/browserbox.cpp b/src/gui/browserbox.cpp index e00494cd..5cae9fb7 100644 --- a/src/gui/browserbox.cpp +++ b/src/gui/browserbox.cpp @@ -23,7 +23,6 @@ #include <guichan/imagefont.hpp> -#include "../main.h" #ifdef USE_OPENGL #include "../resources/resourcemanager.h" #endif @@ -31,6 +30,8 @@ #include "linkhandler.h" #include "gui.h" +extern bool useOpenGL; + int BrowserBox::instances = 0; gcn::ImageFont* BrowserBox::browserFont; diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index f77ad0be..2eaa9d76 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -52,6 +52,7 @@ #include "../resources/resourcemanager.h" extern Being* autoTarget; +extern bool useOpenGL; // Guichan stuff Gui *gui; diff --git a/src/main.cpp b/src/main.cpp index bbddce5f..24f9cb76 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -236,7 +236,7 @@ void init_engine() hwaccel = ((int)config.getValue("hwaccel", 0) == 1); // Create the graphics context - graphics = new Graphics(); + graphics = new Graphics(useOpenGL); // Try to set the desired video mode if (!graphics->setVideoMode(width, height, bpp, fullscreen, hwaccel)) { @@ -64,6 +64,5 @@ extern int account_ID, session_ID1, session_ID2; extern char sex, n_server, n_character; extern unsigned char state; extern Sound sound; -extern bool useOpenGL; #endif diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 854c65e8..4efe12e7 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -26,8 +26,8 @@ #include <SDL_image.h> #include "../log.h" -#include "../main.h" +extern bool useOpenGL; Image::Image(SDL_Surface *image): image(image) |