diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-18 15:09:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-18 15:09:34 +0300 |
commit | 924dfdb11eb71a2b45bac78362e7b111b9dfce98 (patch) | |
tree | 223c25994fa3c5782c816fab002495eb654f1043 /src/graphics.h | |
parent | 09ec2b1ecc1a812e03878ccc07708a0aad02896a (diff) | |
download | manaplus-924dfdb11eb71a2b45bac78362e7b111b9dfce98.tar.gz manaplus-924dfdb11eb71a2b45bac78362e7b111b9dfce98.tar.bz2 manaplus-924dfdb11eb71a2b45bac78362e7b111b9dfce98.tar.xz manaplus-924dfdb11eb71a2b45bac78362e7b111b9dfce98.zip |
Remove gcn::SDLGraphics from basic classes.
Diffstat (limited to 'src/graphics.h')
-rw-r--r-- | src/graphics.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/graphics.h b/src/graphics.h index 60313fdaf..62bf064b1 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -23,7 +23,10 @@ #ifndef GRAPHICS_H #define GRAPHICS_H -#include <guichan/sdl/sdlgraphics.hpp> +#include "SDL.h" + +#include <guichan/color.hpp> +#include <guichan/graphics.hpp> #include "localconsts.h" @@ -87,7 +90,7 @@ class ImageRect final /** * A central point of control for graphics. */ -class Graphics : public gcn::SDLGraphics +class Graphics : public gcn::Graphics { public: /** @@ -102,6 +105,12 @@ class Graphics : public gcn::SDLGraphics */ virtual ~Graphics(); + void setTarget(SDL_Surface *const target) + { mTarget = target; } + + SDL_Surface *getTarget() const + { return mTarget; } + /** * Sets whether vertical refresh syncing is enabled. Takes effect after * the next call to setVideoMode(). Only implemented on MacOS for now. @@ -136,6 +145,14 @@ class Graphics : public gcn::SDLGraphics */ bool drawImage(const Image *image, int x, int y); + // override unused abstract function + void drawImage(const gcn::Image* image A_UNUSED, + int srcX A_UNUSED, int srcY A_UNUSED, + int dstX A_UNUSED, int dstY A_UNUSED, + int width A_UNUSED, int height A_UNUSED) override + { + } + /** * Draws a resclaled version of the image */ @@ -326,6 +343,9 @@ class Graphics : public gcn::SDLGraphics mAlpha = (color.a != 255); } + const gcn::Color &getColor() const override + { return mColor; } + const gcn::Color &getColor2() const { return mColor2; } @@ -367,7 +387,9 @@ class Graphics : public gcn::SDLGraphics bool videoInfo(); + SDL_Surface* mTarget; int mBpp; + bool mAlpha; bool mFullscreen; bool mHWAccel; bool mRedraw; @@ -380,6 +402,7 @@ class Graphics : public gcn::SDLGraphics std::string mName; int mStartFreeMem; bool mSync; + gcn::Color mColor; gcn::Color mColor2; }; |