diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-26 16:40:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-27 23:15:04 +0300 |
commit | c8465553c8a3d86dc1dda153e94f40331aa687d1 (patch) | |
tree | d3cc5650f7a8d83b70ed7f2155b2c1f32b24ad5e /src | |
parent | 468b24f6aeab58838432a3dd9774ad2e7ac87ea8 (diff) | |
download | plus-c8465553c8a3d86dc1dda153e94f40331aa687d1.tar.gz plus-c8465553c8a3d86dc1dda153e94f40331aa687d1.tar.bz2 plus-c8465553c8a3d86dc1dda153e94f40331aa687d1.tar.xz plus-c8465553c8a3d86dc1dda153e94f40331aa687d1.zip |
Move setColor from guichan to own graphics class.
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics.cpp | 6 | ||||
-rw-r--r-- | src/graphics.h | 2 | ||||
-rw-r--r-- | src/guichan/sdl/sdlgraphics.cpp | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 2086981de..c6f8cf57a 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -1206,3 +1206,9 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle) SDL_FillRect(mTarget, &rect, color); } } + +void Graphics::setColor(const gcn::Color &color) +{ + mColor = color; + mAlpha = (color.a != 255); +} diff --git a/src/graphics.h b/src/graphics.h index 84a4a8418..0c62191e5 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -327,6 +327,8 @@ class Graphics : public gcn::SDLGraphics virtual void initArrays() { } + void setColor(const gcn::Color &color); + #ifdef DEBUG_DRAW_CALLS virtual unsigned int getDrawCalls() const { return 0; } diff --git a/src/guichan/sdl/sdlgraphics.cpp b/src/guichan/sdl/sdlgraphics.cpp index eae2bb035..85efd5ef6 100644 --- a/src/guichan/sdl/sdlgraphics.cpp +++ b/src/guichan/sdl/sdlgraphics.cpp @@ -572,11 +572,8 @@ namespace gcn } } - void SDLGraphics::setColor(const Color& color) + void SDLGraphics::setColor(const Color& color A_UNUSED) { - mColor = color; - - mAlpha = color.a != 255; } const Color& SDLGraphics::getColor() const |