diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 23:57:06 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-14 23:57:06 +0000 |
commit | cfaf8b836b21842b5d22ad774f93c2c364d33c0b (patch) | |
tree | 00dca4d03b2f9cff3ec0cef4ed8b6b05c4218c2b /src/main.cpp | |
parent | e475dc028ca49324f824a7e4d6d16f54781b9bee (diff) | |
download | mana-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.tar.gz mana-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.tar.bz2 mana-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.tar.xz mana-cfaf8b836b21842b5d22ad774f93c2c364d33c0b.zip |
Fully removed the useOpenGL global.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 24f9cb76..5d06cf97 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,7 +76,6 @@ short map_port; char map_name[16]; unsigned char state; unsigned char screen_mode; -bool useOpenGL = false; volatile int framesToDraw = 0; Sound sound; @@ -222,10 +221,6 @@ void init_engine() SDL_WM_SetCaption("The Mana World", NULL); SDL_WM_SetIcon(IMG_Load(TMW_DATADIR "data/icons/tmw-icon.png"), NULL); -#ifdef USE_OPENGL - useOpenGL = (config.getValue("opengl", 0) == 1); -#endif - int width, height, bpp; bool fullscreen, hwaccel; @@ -235,6 +230,13 @@ void init_engine() fullscreen = ((int)config.getValue("screen", 0) == 1); hwaccel = ((int)config.getValue("hwaccel", 0) == 1); + bool useOpenGL = (config.getValue("opengl", 0) == 1); + +#ifdef USE_OPENGL + // Setup image loading for the right image format + Image::setLoadAsOpenGL(useOpenGL); +#endif + // Create the graphics context graphics = new Graphics(useOpenGL); |