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/gui/minimap.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/gui/minimap.cpp')
-rw-r--r-- | src/gui/minimap.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index c6069821..b4ef3491 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -88,18 +88,9 @@ void Minimap::draw(gcn::Graphics *graphics) { // Player dot graphics->setColor(gcn::Color(209, 52, 61)); - if (useOpenGL) { -#ifdef USE_OPENGL - dynamic_cast<gcn::OpenGLGraphics*>(graphics)->fillRectangle(gcn::Rectangle( - being->x / 2 + getPadding() - 1, - being->y / 2 + getTitleBarHeight() - 1, 3, 3)); -#endif - } - else { - dynamic_cast<gcn::SDLGraphics*>(graphics)->fillRectangle(gcn::Rectangle( + graphics->fillRectangle(gcn::Rectangle( being->x / 2 + getPadding() - 1, being->y / 2 + getTitleBarHeight() - 1, 3, 3)); - } } else { |