diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-26 17:00:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-27 23:15:04 +0300 |
commit | 53db1412f7d6e29e9e1cfdb272a40ebb30ba1fe6 (patch) | |
tree | aaeb9cb039c8a992d5b82361279f17d7518ad3c3 | |
parent | c8465553c8a3d86dc1dda153e94f40331aa687d1 (diff) | |
download | manaverse-53db1412f7d6e29e9e1cfdb272a40ebb30ba1fe6.tar.gz manaverse-53db1412f7d6e29e9e1cfdb272a40ebb30ba1fe6.tar.bz2 manaverse-53db1412f7d6e29e9e1cfdb272a40ebb30ba1fe6.tar.xz manaverse-53db1412f7d6e29e9e1cfdb272a40ebb30ba1fe6.zip |
Move setColor in graphics classes from cpp to h.
-rw-r--r-- | src/graphics.cpp | 6 | ||||
-rw-r--r-- | src/graphics.h | 6 | ||||
-rw-r--r-- | src/mobileopenglgraphics.cpp | 6 | ||||
-rw-r--r-- | src/mobileopenglgraphics.h | 6 | ||||
-rw-r--r-- | src/normalopenglgraphics.cpp | 6 | ||||
-rw-r--r-- | src/normalopenglgraphics.h | 6 | ||||
-rw-r--r-- | src/safeopenglgraphics.cpp | 6 | ||||
-rw-r--r-- | src/safeopenglgraphics.h | 6 |
8 files changed, 20 insertions, 28 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index c6f8cf57a..2086981de 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -1206,9 +1206,3 @@ 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 0c62191e5..72e7c4dbb 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -327,7 +327,11 @@ class Graphics : public gcn::SDLGraphics virtual void initArrays() { } - void setColor(const gcn::Color &color); + void setColor(const gcn::Color &color) + { + mColor = color; + mAlpha = (color.a != 255); + } #ifdef DEBUG_DRAW_CALLS virtual unsigned int getDrawCalls() const diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp index cbd1a8720..53b97f1d5 100644 --- a/src/mobileopenglgraphics.cpp +++ b/src/mobileopenglgraphics.cpp @@ -978,12 +978,6 @@ void MobileOpenGLGraphics::popClipArea() clipArea.width, clipArea.height); } -void MobileOpenGLGraphics::setColor(const gcn::Color& color) -{ - mColor = color; - mColorAlpha = (color.a != 255); -} - #ifdef ANDROID void MobileOpenGLGraphics::drawPoint(int x A_UNUSED, int y A_UNUSED) #else diff --git a/src/mobileopenglgraphics.h b/src/mobileopenglgraphics.h index ba03aee99..12b244996 100644 --- a/src/mobileopenglgraphics.h +++ b/src/mobileopenglgraphics.h @@ -125,7 +125,11 @@ class MobileOpenGLGraphics final : public Graphics void popClipArea(); - void setColor(const gcn::Color &color); + void setColor(const gcn::Color &color) + { + mColor = color; + mColorAlpha = (color.a != 255); + } void drawPoint(int x, int y); diff --git a/src/normalopenglgraphics.cpp b/src/normalopenglgraphics.cpp index 00db5c647..e263631b9 100644 --- a/src/normalopenglgraphics.cpp +++ b/src/normalopenglgraphics.cpp @@ -1175,12 +1175,6 @@ void NormalOpenGLGraphics::popClipArea() clipArea.width, clipArea.height); } -void NormalOpenGLGraphics::setColor(const gcn::Color& color) -{ - mColor = color; - mColorAlpha = (color.a != 255); -} - void NormalOpenGLGraphics::drawPoint(int x, int y) { setTexturingAndBlending(false); diff --git a/src/normalopenglgraphics.h b/src/normalopenglgraphics.h index 874e68fad..feedeb65a 100644 --- a/src/normalopenglgraphics.h +++ b/src/normalopenglgraphics.h @@ -125,7 +125,11 @@ class NormalOpenGLGraphics final : public Graphics void popClipArea(); - void setColor(const gcn::Color &color); + void setColor(const gcn::Color &color) + { + mColor = color; + mColorAlpha = (color.a != 255); + } void drawPoint(int x, int y); diff --git a/src/safeopenglgraphics.cpp b/src/safeopenglgraphics.cpp index 076edbfbb..d65bd4fec 100644 --- a/src/safeopenglgraphics.cpp +++ b/src/safeopenglgraphics.cpp @@ -482,12 +482,6 @@ void SafeOpenGLGraphics::popClipArea() clipArea.width, clipArea.height); } -void SafeOpenGLGraphics::setColor(const gcn::Color& color) -{ - mColor = color; - mColorAlpha = (color.a != 255); -} - void SafeOpenGLGraphics::drawPoint(int x, int y) { setTexturingAndBlending(false); diff --git a/src/safeopenglgraphics.h b/src/safeopenglgraphics.h index 9be2ba943..6bc152b00 100644 --- a/src/safeopenglgraphics.h +++ b/src/safeopenglgraphics.h @@ -101,7 +101,11 @@ class SafeOpenGLGraphics final : public Graphics void popClipArea(); - void setColor(const gcn::Color &color); + void setColor(const gcn::Color &color) + { + mColor = color; + mColorAlpha = (color.a != 255); + } void drawPoint(int x, int y); |