summaryrefslogtreecommitdiff
path: root/src/graphics.h
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/graphics.h
parent34e18a818a7696629515c39b920ba35b64832748 (diff)
downloadmana-client-9e4f25acd69489d949104eebec690ce5586849e6.tar.gz
mana-client-9e4f25acd69489d949104eebec690ce5586849e6.tar.bz2
mana-client-9e4f25acd69489d949104eebec690ce5586849e6.tar.xz
mana-client-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/graphics.h')
-rw-r--r--src/graphics.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/graphics.h b/src/graphics.h
index 26b83692..a66bb2da 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -26,10 +26,10 @@
#include <guichan/sdl.hpp>
#include <SDL.h>
-#ifdef USE_OPENGL
#include <guichan/opengl.hpp>
#include <SDL_opengl.h>
-#endif
+#include <guichan/imagefont.hpp>
+#include <guichan/rectangle.hpp>
#include "resources/image.h"
/**
@@ -56,11 +56,7 @@ struct ImageRect {
/**
* A central point of control for graphics.
*/
-#ifdef USE_OPENGL
-class Graphics : public gcn::OpenGLGraphics {
-#else
-class Graphics : public gcn::SDLGraphics {
-#endif
+class Graphics : public gcn::SDLGraphics, public gcn::OpenGLGraphics {
public:
/**
* Constructor.
@@ -104,7 +100,7 @@ class Graphics : public gcn::SDLGraphics {
/**
* Returns the width of the screen.
*/
- int getWidth();
+ virtual int getWidth();
/**
* Returns the height of the screen.
@@ -118,6 +114,15 @@ class Graphics : public gcn::SDLGraphics {
*/
void setScreen(SDL_Surface *screen);
+ void setFont(gcn::ImageFont *font);
+
+ void drawText(const std::string &text,
+ int x,
+ int y,
+ unsigned int alignment);
+
+ void setColor(gcn::Color color);
+
private:
SDL_Surface *mScreen;
};