diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-10 07:46:41 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-10 07:46:41 +0000 |
commit | 7bbe721a23b9caba7a67ac806be10aa536f7f46d (patch) | |
tree | d87383830d132ca08b472abed69b20f3f3eee58a /src/engine.cpp | |
parent | 4d338e801f8b1175585de6b5e7b8b2ca331b682f (diff) | |
download | mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.tar.gz mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.tar.bz2 mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.tar.xz mana-7bbe721a23b9caba7a67ac806be10aa536f7f46d.zip |
Moved knowledge about whether we use OpenGL into the Graphics class. Added helper function for being creation to reduce code duplication. Some code simplifications.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 7fe4d4df..dae8c8be 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -531,14 +531,7 @@ void Engine::draw() int squareX = node.x * 32 - map_x + 12; int squareY = node.y * 32 - map_y + 12; guiGraphics->setColor(gcn::Color(255, 0, 0)); - if (useOpenGL) { -#ifdef USE_OPENGL - dynamic_cast<gcn::OpenGLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8)); -#endif - } - else { - dynamic_cast<gcn::SDLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8)); - } + graphics->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8)); MetaTile *tile = mCurrentMap->getMetaTile(node.x, node.y); |