From 9e4f25acd69489d949104eebec690ce5586849e6 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 26 Jul 2005 22:33:53 +0000 Subject: OpenGL/SDL combined in the same exe. Not in the cutest way, but we'll find a nicer approach after the release. --- src/graphics.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/graphics.h') 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 #include -#ifdef USE_OPENGL #include #include -#endif +#include +#include #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; }; -- cgit v1.2.3-70-g09d2