summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-26 22:33:53 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-26 22:33:53 +0000
commit9e4f25acd69489d949104eebec690ce5586849e6 (patch)
treedc4fe4483ece1a374bc44280c72e43cfd5725feb /src/engine.cpp
parent34e18a818a7696629515c39b920ba35b64832748 (diff)
downloadmana-9e4f25acd69489d949104eebec690ce5586849e6.tar.gz
mana-9e4f25acd69489d949104eebec690ce5586849e6.tar.bz2
mana-9e4f25acd69489d949104eebec690ce5586849e6.tar.xz
mana-9e4f25acd69489d949104eebec690ce5586849e6.zip
OpenGL/SDL combined in the same exe. Not in the cutest way, but we'll find a
nicer approach after the release.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 45a2c3e4..1d511e6a 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -29,6 +29,7 @@
#include "log.h"
#include "being.h"
#include "floor_item.h"
+#include "graphics.h"
#include "gui/gui.h"
#include "gui/minimap.h"
#include "gui/chargedialog.h"
@@ -536,7 +537,12 @@ void Engine::draw()
int squareX = (node.x - camera_x) * 32 - offset_x + 12;
int squareY = (node.y - camera_y) * 32 - offset_y + 12;
guiGraphics->setColor(gcn::Color(255, 0, 0));
- guiGraphics->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8));
+ if (useOpenGL) {
+ dynamic_cast<gcn::OpenGLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8));
+ }
+ else {
+ dynamic_cast<gcn::SDLGraphics*>(graphics)->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8));
+ }
MetaTile *tile = mCurrentMap->getMetaTile(node.x, node.y);