From 950b1bc690ff36013e5e650572872ee7acd5e942 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 24 Oct 2013 12:18:04 +0300 Subject: add final keyword to render files. --- src/render/graphics.h | 2 +- src/render/mobileopenglgraphics.h | 65 +++++++++++++++++++----------------- src/render/normalopenglgraphics.h | 55 +++++++++++++++--------------- src/render/nullopenglgraphics.h | 62 ++++++++++++++++++---------------- src/render/safeopenglgraphics.h | 48 +++++++++++++-------------- src/render/sdl2graphics.h | 66 ++++++++++++++++++++---------------- src/render/sdl2softwaregraphics.h | 70 +++++++++++++++++++++++---------------- src/render/sdlgraphics.h | 67 +++++++++++++++++++++---------------- src/render/surfacegraphics.h | 58 ++++++++++++++++++-------------- 9 files changed, 273 insertions(+), 220 deletions(-) diff --git a/src/render/graphics.h b/src/render/graphics.h index 78e348be6..7d4d7c524 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -332,7 +332,7 @@ class Graphics : public gcn::Graphics virtual void initArrays() { } - void setColor(const gcn::Color &color) + void setColor(const gcn::Color &color) override { mColor = color; mColor2 = color; diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index 748302221..c5d39ff7f 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -56,9 +56,12 @@ class MobileOpenGLGraphics final : public Graphics ~MobileOpenGLGraphics(); - bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) override; + bool setVideoMode(const int w, const int h, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) override final; /** @@ -68,7 +71,7 @@ class MobileOpenGLGraphics final : public Graphics int dstX, int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight, - const bool useColor) override; + const bool useColor) override final; /** * Used to get the smooth rescale option over the standard function. @@ -81,7 +84,7 @@ class MobileOpenGLGraphics final : public Graphics void drawImagePattern(const Image *const image, const int x, const int y, - const int w, const int h) override; + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... @@ -90,66 +93,68 @@ class MobileOpenGLGraphics final : public Graphics const int x, const int y, const int w, const int h, const int scaledWidth, - const int scaledHeight) override; + const int scaledHeight) override final; void calcImagePattern(ImageVertexes *const vert, const Image *const image, const int x, const int y, - const int w, const int h) const override; + const int w, const int h) const override final; void calcImagePattern(ImageCollection *const vert, const Image *const image, const int x, const int y, - const int w, const int h) const override; + const int w, const int h) const override final; void calcTile(ImageVertexes *const vert, const Image *const image, - int x, int y) const override; + int x, int y) const override final; - void drawTile(const ImageCollection *const vertCol); + void drawTile(const ImageCollection *const vertCol) override final; void calcTile(ImageCollection *const vertCol, - const Image *const image, int x, int y) override; + const Image *const image, int x, int y) override final; - void drawTile(const ImageVertexes *const vert) override; + void drawTile(const ImageVertexes *const vert) override final; bool calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, - const ImageRect &imgRect); + const ImageRect &imgRect) override final; - void updateScreen() override; + void updateScreen() override final; - void _beginDraw(); + void _beginDraw() override final; - void _endDraw(); + void _endDraw() override final; - bool pushClipArea(gcn::Rectangle area); + bool pushClipArea(gcn::Rectangle area) override final; - void popClipArea(); + void popClipArea() override final; - void setColor(const gcn::Color &color) + void setColor(const gcn::Color &color) override final { mColor = color; mColor2 = color; mColorAlpha = (color.a != 255); } - void setColorAll(const gcn::Color &color, const gcn::Color &color2) + void setColorAll(const gcn::Color &color, + const gcn::Color &color2) { mColor = color; mColor2 = color2; mColorAlpha = (color.a != 255); } - void drawPoint(int x, int y); + void drawPoint(int x, int y) override final; - void drawLine(int x1, int y1, int x2, int y2); + void drawLine(int x1, int y1, int x2, int y2) override final; - void drawRectangle(const gcn::Rectangle &rect, const bool filled); + void drawRectangle(const gcn::Rectangle &rect, + const bool filled); - void drawRectangle(const gcn::Rectangle &rect); + void drawRectangle(const gcn::Rectangle &rect) override final; - void fillRectangle(const gcn::Rectangle &rect); + void fillRectangle(const gcn::Rectangle &rect) override final; void setTargetPlane(int width, int height); @@ -163,19 +168,19 @@ class MobileOpenGLGraphics final : public Graphics inline void drawVertexes(const NormalOpenGLGraphicsVertexes &ogl); - void initArrays() override; + void initArrays() override final; static void dumpSettings(); /** * Takes a screenshot and returns it as SDL surface. */ - SDL_Surface *getScreenshot() override A_WARN_UNUSED; + SDL_Surface *getScreenshot() override final A_WARN_UNUSED; - void prepareScreenshot() override; + void prepareScreenshot() override final; bool drawNet(const int x1, const int y1, const int x2, const int y2, - const int width, const int height) override; + const int width, const int height) override final; int getMemoryUsage(); @@ -199,7 +204,7 @@ class MobileOpenGLGraphics final : public Graphics int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor) override; + const bool useColor) override final; void setTexturingAndBlending(const bool enable); diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index 6f3597b6b..05ca3b7c4 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -58,7 +58,7 @@ class NormalOpenGLGraphics final : public Graphics bool setVideoMode(const int w, const int h, const int bpp, const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) override; + const bool resize, const bool noFrame) override final; /** @@ -68,7 +68,7 @@ class NormalOpenGLGraphics final : public Graphics int dstX, int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight, - const bool useColor) override; + const bool useColor) override final; /** * Used to get the smooth rescale option over the standard function. @@ -81,7 +81,7 @@ class NormalOpenGLGraphics final : public Graphics void drawImagePattern(const Image *const image, const int x, const int y, - const int w, const int h) override; + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... @@ -90,44 +90,44 @@ class NormalOpenGLGraphics final : public Graphics const int x, const int y, const int w, const int h, const int scaledWidth, - const int scaledHeight) override; + const int scaledHeight) override final; void calcImagePattern(ImageVertexes* const vert, const Image *const image, const int x, const int y, - const int w, const int h) const override; + const int w, const int h) const override final; void calcImagePattern(ImageCollection* const vert, const Image *const image, const int x, const int y, - const int w, const int h) const override; + const int w, const int h) const override final; void calcTile(ImageVertexes *const vert, const Image *const image, - int x, int y) const override; + int x, int y) const override final; void calcTile(ImageCollection *const vertCol, - const Image *const image, int x, int y) override; + const Image *const image, int x, int y) override final; - void drawTile(const ImageCollection *const vertCol) override; + void drawTile(const ImageCollection *const vertCol) override final; - void drawTile(const ImageVertexes *const vert) override; + void drawTile(const ImageVertexes *const vert) override final; bool calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, - const ImageRect &imgRect) override; + const ImageRect &imgRect) override final; - void updateScreen() override; + void updateScreen() override final; - void _beginDraw(); + void _beginDraw() override final; - void _endDraw(); + void _endDraw() override final; - bool pushClipArea(gcn::Rectangle area); + bool pushClipArea(gcn::Rectangle area) override final; - void popClipArea(); + void popClipArea() override final; - void setColor(const gcn::Color &color) + void setColor(const gcn::Color &color) override final { mColor = color; mColor2 = color; @@ -141,15 +141,16 @@ class NormalOpenGLGraphics final : public Graphics mColorAlpha = (color.a != 255); } - void drawPoint(int x, int y); + void drawPoint(int x, int y) override final; - void drawLine(int x1, int y1, int x2, int y2); + void drawLine(int x1, int y1, int x2, int y2) override final; - void drawRectangle(const gcn::Rectangle &rect, const bool filled); + void drawRectangle(const gcn::Rectangle &rect, + const bool filled); - void drawRectangle(const gcn::Rectangle &rect); + void drawRectangle(const gcn::Rectangle &rect) override final; - void fillRectangle(const gcn::Rectangle &rect); + void fillRectangle(const gcn::Rectangle &rect) override final; void setTargetPlane(int width, int height); @@ -171,19 +172,19 @@ class NormalOpenGLGraphics final : public Graphics inline void drawVertexes(const NormalOpenGLGraphicsVertexes &ogl); - void initArrays() override; + void initArrays() override final; static void dumpSettings(); /** * Takes a screenshot and returns it as SDL surface. */ - SDL_Surface *getScreenshot() override A_WARN_UNUSED; + SDL_Surface *getScreenshot() override final A_WARN_UNUSED; - void prepareScreenshot() override; + void prepareScreenshot() override final; bool drawNet(const int x1, const int y1, const int x2, const int y2, - const int width, const int height) override; + const int width, const int height) override final; int getMemoryUsage() A_WARN_UNUSED; @@ -210,7 +211,7 @@ class NormalOpenGLGraphics final : public Graphics int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor) override; + const bool useColor) override final; void setTexturingAndBlending(const bool enable); diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index 7734ca660..28d724820 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -56,9 +56,12 @@ class NullOpenGLGraphics final : public Graphics ~NullOpenGLGraphics(); - bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) override; + bool setVideoMode(const int w, const int h, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) override final; /** @@ -68,7 +71,7 @@ class NullOpenGLGraphics final : public Graphics int dstX, int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight, - const bool useColor) override; + const bool useColor) override final; /** * Used to get the smooth rescale option over the standard function. @@ -81,7 +84,7 @@ class NullOpenGLGraphics final : public Graphics void drawImagePattern(const Image *const image, const int x, const int y, - const int w, const int h) override; + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... @@ -90,44 +93,44 @@ class NullOpenGLGraphics final : public Graphics const int x, const int y, const int w, const int h, const int scaledWidth, - const int scaledHeight) override; + const int scaledHeight) override final; void calcImagePattern(ImageVertexes* const vert, const Image *const image, const int x, const int y, - const int w, const int h) const override; + const int w, const int h) const override final; void calcImagePattern(ImageCollection* const vert, const Image *const image, const int x, const int y, - const int w, const int h) const override; + const int w, const int h) const override final; void calcTile(ImageVertexes *const vert, const Image *const image, - int x, int y) const override; + int x, int y) const override final; void calcTile(ImageCollection *const vertCol, - const Image *const image, int x, int y) override; + const Image *const image, int x, int y) override final; - void drawTile(const ImageCollection *const vertCol) override; + void drawTile(const ImageCollection *const vertCol) override final; - void drawTile(const ImageVertexes *const vert) override; + void drawTile(const ImageVertexes *const vert) override final; bool calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, - const ImageRect &imgRect) override; + const ImageRect &imgRect) override final; - void updateScreen() override; + void updateScreen() override final; - void _beginDraw(); + void _beginDraw() override final; - void _endDraw(); + void _endDraw() override final; - bool pushClipArea(gcn::Rectangle area); + bool pushClipArea(gcn::Rectangle area) override final; - void popClipArea(); + void popClipArea() override final; - void setColor(const gcn::Color &color) + void setColor(const gcn::Color &color) override final { mColor = color; mColor2 = color; @@ -141,15 +144,16 @@ class NullOpenGLGraphics final : public Graphics mColorAlpha = (color.a != 255); } - void drawPoint(int x, int y); + void drawPoint(int x, int y) override final; - void drawLine(int x1, int y1, int x2, int y2); + void drawLine(int x1, int y1, int x2, int y2) override final; - void drawRectangle(const gcn::Rectangle &rect, const bool filled); + void drawRectangle(const gcn::Rectangle &rect, + const bool filled); - void drawRectangle(const gcn::Rectangle &rect); + void drawRectangle(const gcn::Rectangle &rect) override final; - void fillRectangle(const gcn::Rectangle &rect); + void fillRectangle(const gcn::Rectangle &rect) override final; void setTargetPlane(int width, int height); @@ -171,19 +175,19 @@ class NullOpenGLGraphics final : public Graphics inline void drawVertexes(const NormalOpenGLGraphicsVertexes &ogl); - void initArrays() override; + void initArrays() override final; static void dumpSettings(); /** * Takes a screenshot and returns it as SDL surface. */ - SDL_Surface *getScreenshot() override A_WARN_UNUSED; + SDL_Surface *getScreenshot() override final A_WARN_UNUSED; - void prepareScreenshot() override; + void prepareScreenshot() override final; bool drawNet(const int x1, const int y1, const int x2, const int y2, - const int width, const int height) override; + const int width, const int height) override final; int getMemoryUsage() A_WARN_UNUSED; @@ -207,7 +211,7 @@ class NullOpenGLGraphics final : public Graphics int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor) override; + const bool useColor) override final; void setTexturingAndBlending(const bool enable); diff --git a/src/render/safeopenglgraphics.h b/src/render/safeopenglgraphics.h index 666bc574a..34a8912ff 100644 --- a/src/render/safeopenglgraphics.h +++ b/src/render/safeopenglgraphics.h @@ -52,7 +52,7 @@ class SafeOpenGLGraphics final : public Graphics bool setVideoMode(const int w, const int h, const int bpp, const bool fs, const bool hwaccel, - const bool resize, const bool noFrame) override; + const bool resize, const bool noFrame) override final; /** * Draws a resclaled version of the image @@ -61,7 +61,7 @@ class SafeOpenGLGraphics final : public Graphics int dstX, int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight, - const bool useColor) override; + const bool useColor) override final; /** * Used to get the smooth rescale option over the standard function. @@ -74,7 +74,7 @@ class SafeOpenGLGraphics final : public Graphics void drawImagePattern(const Image *const image, const int x, const int y, - const int w, const int h) override; + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... @@ -83,44 +83,44 @@ class SafeOpenGLGraphics final : public Graphics const int x, const int y, const int w, const int h, const int scaledWidth, - const int scaledHeight) override; + const int scaledHeight) override final; void calcTile(ImageVertexes *const vert, const Image *const image, - int x, int y) const override; + int x, int y) const override final; void calcTile(ImageCollection *const vertCol, - const Image *const image, int x, int y) override; + const Image *const image, int x, int y) override final; void calcImagePattern(ImageVertexes *const vert, const Image *const image, const int x, const int y, - const int w, const int h) const; + const int w, const int h) const override final; void calcImagePattern(ImageCollection *const vert, const Image *const image, const int x, const int y, - const int w, const int h) const; + const int w, const int h) const override final; - void drawTile(const ImageVertexes *const vert) override; + void drawTile(const ImageVertexes *const vert) override final; - void drawTile(const ImageCollection *const vertCol) override; + void drawTile(const ImageCollection *const vertCol) override final; - void updateScreen() override; + void updateScreen() override final; bool calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, - const ImageRect &imgRect); + const ImageRect &imgRect) override final; - void _beginDraw(); + void _beginDraw() override final; - void _endDraw(); + void _endDraw() override final; - bool pushClipArea(gcn::Rectangle area); + bool pushClipArea(gcn::Rectangle area) override final; - void popClipArea(); + void popClipArea() override final; - void setColor(const gcn::Color &color) + void setColor(const gcn::Color &color) override final { mColor = color; mColor2 = color; @@ -134,24 +134,24 @@ class SafeOpenGLGraphics final : public Graphics mColorAlpha = (color.a != 255); } - void drawPoint(int x, int y); + void drawPoint(int x, int y) override final; - void drawLine(int x1, int y1, int x2, int y2); + void drawLine(int x1, int y1, int x2, int y2) override final; void drawRectangle(const gcn::Rectangle &rect, const bool filled); - void drawRectangle(const gcn::Rectangle &rect); + void drawRectangle(const gcn::Rectangle &rect) override final; - void fillRectangle(const gcn::Rectangle &rect) override; + void fillRectangle(const gcn::Rectangle &rect) override final; void setTargetPlane(int width, int height); /** * Takes a screenshot and returns it as SDL surface. */ - SDL_Surface *getScreenshot() override A_WARN_UNUSED; + SDL_Surface *getScreenshot() override final A_WARN_UNUSED; - void prepareScreenshot() override; + void prepareScreenshot() override final; static void bindTexture(const GLenum target, const GLuint texture); @@ -162,7 +162,7 @@ class SafeOpenGLGraphics final : public Graphics int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor); + const bool useColor) override final; void setTexturingAndBlending(const bool enable); diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h index e53719049..c35e1067e 100644 --- a/src/render/sdl2graphics.h +++ b/src/render/sdl2graphics.h @@ -54,79 +54,89 @@ class SDLGraphics : public Graphics */ virtual ~SDLGraphics(); - void _beginDraw(); + void _beginDraw() override final; - void _endDraw(); + void _endDraw() override final; - bool pushClipArea(gcn::Rectangle rect); + bool pushClipArea(gcn::Rectangle rect) override final; - void popClipArea(); + void popClipArea() override final; virtual bool drawRescaledImage(const Image *const image, int srcX, int srcY, int dstX, int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight, - const bool useColor = false); + const bool useColor = false) override final; virtual void drawImagePattern(const Image *const image, const int x, const int y, - const int w, const int h); + const int w, const int h) override final; virtual void drawRescaledImagePattern(const Image *const image, const int x, const int y, const int w, const int h, const int scaledWidth, - const int scaledHeight); + const int scaledHeight) + override final; virtual void calcImagePattern(ImageVertexes *const vert, const Image *const image, - const int x, const int y, - const int w, const int h) const; + const int x, + const int y, + const int w, + const int h) const override final; virtual void calcImagePattern(ImageCollection *const vert, const Image *const image, - const int x, const int y, - const int w, const int h) const; + const int x, + const int y, + const int w, + const int h) const override final; virtual void calcTile(ImageVertexes *const vert, - const Image *const image, int x, int y) const; + const Image *const image, + int x, int y) const override final; virtual void calcTileSDL(ImageVertexes *const vert, - int x, int y) const; + int x, int y) const override final; virtual void calcTile(ImageCollection *const vertCol, const Image *const image, - int x, int y); + int x, int y) override final; - virtual void drawTile(const ImageVertexes *const vert); + virtual void drawTile(const ImageVertexes *const vert) override final; - virtual void drawTile(const ImageCollection *const vertCol); + virtual void drawTile(const ImageCollection *const vertCol) + override final; - virtual void updateScreen(); + virtual void updateScreen() override final; - virtual SDL_Surface *getScreenshot() A_WARN_UNUSED; + virtual SDL_Surface *getScreenshot() override final A_WARN_UNUSED; virtual bool drawNet(const int x1, const int y1, const int x2, const int y2, - const int width, const int height); + const int width, const int height) override final; virtual bool calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, - const ImageRect &imgRect); + const ImageRect &imgRect) override final; - void fillRectangle(const gcn::Rectangle &rect) override; + void fillRectangle(const gcn::Rectangle &rect) override final; - void drawRectangle(const gcn::Rectangle &rect) override; + void drawRectangle(const gcn::Rectangle &rect) override final; - void drawPoint(int x, int y) override; + void drawPoint(int x, int y) override final; - void drawLine(int x1, int y1, int x2, int y2) override; + void drawLine(int x1, int y1, int x2, int y2) override final; - bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame); + bool setVideoMode(const int w, const int h, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) override final; void setRendererFlags(const uint32_t flags) { mRendererFlags = flags; } @@ -136,7 +146,7 @@ class SDLGraphics : public Graphics int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor); + const bool useColor) override final; uint32_t mRendererFlags; uint32_t mOldPixel; diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h index 19bf49373..eb97cf4de 100644 --- a/src/render/sdl2softwaregraphics.h +++ b/src/render/sdl2softwaregraphics.h @@ -62,88 +62,100 @@ class SDL2SoftwareGraphics : public Graphics void popClipArea(); - virtual bool drawRescaledImage(const Image *const image, int srcX, - int srcY, int dstX, int dstY, + virtual bool drawRescaledImage(const Image *const image, + int srcX, int srcY, + int dstX, int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight, - const bool useColor = false); + const bool useColor = false) + override final; virtual void drawImagePattern(const Image *const image, const int x, const int y, - const int w, const int h); + const int w, const int h) override final; virtual void drawRescaledImagePattern(const Image *const image, const int x, const int y, const int w, const int h, const int scaledWidth, - const int scaledHeight); + const int scaledHeight) + override final; virtual void calcImagePattern(ImageVertexes *const vert, const Image *const image, - const int x, const int y, - const int w, const int h) const; + const int x, + const int y, + const int w, + const int h) const override final; virtual void calcImagePattern(ImageCollection *const vert, const Image *const image, - const int x, const int y, - const int w, const int h) const; + const int x, + const int y, + const int w, + const int h) const override final; virtual void calcTile(ImageVertexes *const vert, - const Image *const image, int x, int y) const; + const Image *const image, + int x, int y) const override final; virtual void calcTileSDL(ImageVertexes *const vert, - int x, int y) const; + int x, int y) const override final; virtual void calcTile(ImageCollection *const vertCol, const Image *const image, - int x, int y); + int x, int y) override final; - virtual void drawTile(const ImageVertexes *const vert); + virtual void drawTile(const ImageVertexes *const vert) override final; - virtual void drawTile(const ImageCollection *const vertCol); + virtual void drawTile(const ImageCollection *const vertCol) + override final; - virtual void updateScreen(); + virtual void updateScreen() override final; - virtual SDL_Surface *getScreenshot() A_WARN_UNUSED; + virtual SDL_Surface *getScreenshot() override final A_WARN_UNUSED; virtual bool drawNet(const int x1, const int y1, const int x2, const int y2, - const int width, const int height); + const int width, const int height) override final; virtual bool calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, - const ImageRect &imgRect); + const ImageRect &imgRect) override final; - void fillRectangle(const gcn::Rectangle &rect) override; + void fillRectangle(const gcn::Rectangle &rect) override final; - void drawRectangle(const gcn::Rectangle &rect) override; + void drawRectangle(const gcn::Rectangle &rect) override final; - void drawPoint(int x, int y) override; + void drawPoint(int x, int y) override final override final; - void drawLine(int x1, int y1, int x2, int y2) override; + void drawLine(int x1, int y1, int x2, int y2) override final; - bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame); + bool setVideoMode(const int w, const int h, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) override final; - void setRendererFlags(const uint32_t flags) + void setRendererFlags(const uint32_t flags) override final { mRendererFlags = flags; } - bool resizeScreen(const int width, const int height); + bool resizeScreen(const int width, const int height) override final; protected: virtual bool drawImage2(const Image *const image, int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor); + const bool useColor) override final; int SDL_FakeUpperBlit(const SDL_Surface *const src, SDL_Rect *const srcrect, const SDL_Surface *const dst, - SDL_Rect *dstrect) const; + SDL_Rect *dstrect) const override final; void drawHLine(int x1, int y, int x2); diff --git a/src/render/sdlgraphics.h b/src/render/sdlgraphics.h index 79c2c1c5a..17540543e 100644 --- a/src/render/sdlgraphics.h +++ b/src/render/sdlgraphics.h @@ -54,86 +54,97 @@ class SDLGraphics : public Graphics */ virtual ~SDLGraphics(); - void _beginDraw(); + void _beginDraw() override final; - void _endDraw(); + void _endDraw() override final; - bool pushClipArea(gcn::Rectangle rect); + bool pushClipArea(gcn::Rectangle rect) override final; - void popClipArea(); + void popClipArea() override final; virtual bool drawRescaledImage(const Image *const image, int srcX, int srcY, int dstX, int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight, - const bool useColor = false); + const bool useColor = false) + override final; virtual void drawImagePattern(const Image *const image, const int x, const int y, - const int w, const int h); + const int w, const int h) override final; virtual void drawRescaledImagePattern(const Image *const image, const int x, const int y, const int w, const int h, const int scaledWidth, - const int scaledHeight); + const int scaledHeight) + override final; virtual void calcImagePattern(ImageVertexes *const vert, const Image *const image, - const int x, const int y, - const int w, const int h) const; + const int x, + const int y, + const int w, + const int h) const override final; virtual void calcImagePattern(ImageCollection *const vert, const Image *const image, - const int x, const int y, - const int w, const int h) const; + const int x, + const int y, + const int w, + const int h) const override final; virtual void calcTile(ImageVertexes *const vert, - const Image *const image, int x, int y) const; + const Image *const image, + int x, int y) const override final; virtual void calcTileSDL(ImageVertexes *const vert, - int x, int y) const; + int x, int y) const override final; virtual void calcTile(ImageCollection *const vertCol, const Image *const image, - int x, int y); + int x, int y) override final; - virtual void drawTile(const ImageVertexes *const vert); + virtual void drawTile(const ImageVertexes *const vert) override final; - virtual void drawTile(const ImageCollection *const vertCol); + virtual void drawTile(const ImageCollection *const vertCol) + override final; - virtual void updateScreen(); + virtual void updateScreen() override final; - virtual SDL_Surface *getScreenshot() A_WARN_UNUSED; + virtual SDL_Surface *getScreenshot() override final A_WARN_UNUSED; virtual bool drawNet(const int x1, const int y1, const int x2, const int y2, - const int width, const int height); + const int width, const int height) override final; virtual bool calcWindow(ImageCollection *const vertCol, const int x, const int y, const int w, const int h, - const ImageRect &imgRect); + const ImageRect &imgRect) override final; - void fillRectangle(const gcn::Rectangle &rect) override; + void fillRectangle(const gcn::Rectangle &rect) override final; - void drawRectangle(const gcn::Rectangle &rect) override; + void drawRectangle(const gcn::Rectangle &rect) override final; - void drawPoint(int x, int y) override; + void drawPoint(int x, int y) override final; - void drawLine(int x1, int y1, int x2, int y2) override; + void drawLine(int x1, int y1, int x2, int y2) override final; - bool setVideoMode(const int w, const int h, const int bpp, - const bool fs, const bool hwaccel, - const bool resize, const bool noFrame); + bool setVideoMode(const int w, const int h, + const int bpp, + const bool fs, + const bool hwaccel, + const bool resize, + const bool noFrame) override final; protected: virtual bool drawImage2(const Image *const image, int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor); + const bool useColor) override final; int SDL_FakeUpperBlit(const SDL_Surface *const src, SDL_Rect *const srcrect, diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h index cda29cc05..3d62b5c22 100644 --- a/src/render/surfacegraphics.h +++ b/src/render/surfacegraphics.h @@ -57,16 +57,16 @@ class SurfaceGraphics : public Graphics SDL_Surface *getTarget() const { return mTarget; } - void _beginDraw() + void _beginDraw() override final { } - void _endDraw() + void _endDraw() override final { } - bool pushClipArea(gcn::Rectangle rect A_UNUSED) + bool pushClipArea(gcn::Rectangle rect A_UNUSED) override final { return true; } - void popClipArea() + void popClipArea() override final { } bool drawRescaledImage(const Image *const image A_UNUSED, @@ -77,11 +77,14 @@ class SurfaceGraphics : public Graphics const int desiredWidth A_UNUSED, const int desiredHeight A_UNUSED, const bool useColor A_UNUSED = false) + override final { return false; } void drawImagePattern(const Image *const image A_UNUSED, - const int x A_UNUSED, const int y A_UNUSED, - const int w A_UNUSED, const int h A_UNUSED) + const int x A_UNUSED, + const int y A_UNUSED, + const int w A_UNUSED, + const int h A_UNUSED) override final { } void drawRescaledImagePattern(const Image *const image A_UNUSED, @@ -91,6 +94,7 @@ class SurfaceGraphics : public Graphics const int h A_UNUSED, const int scaledWidth A_UNUSED, const int scaledHeight A_UNUSED) + override final { } void calcImagePattern(ImageVertexes *const vert A_UNUSED, @@ -98,50 +102,56 @@ class SurfaceGraphics : public Graphics const int x A_UNUSED, const int y A_UNUSED, const int w A_UNUSED, - const int h A_UNUSED) const + const int h A_UNUSED) const override final { } void calcImagePattern(ImageCollection *const vert A_UNUSED, const Image *const image A_UNUSED, - const int x A_UNUSED, const int y A_UNUSED, - const int w A_UNUSED, const int h A_UNUSED) const + const int x A_UNUSED, + const int y A_UNUSED, + const int w A_UNUSED, + const int h A_UNUSED) const override final { } void calcTile(ImageVertexes *const vert A_UNUSED, const Image *const image A_UNUSED, - int x A_UNUSED, int y A_UNUSED) const + int x A_UNUSED, int y A_UNUSED) const override final { } void calcTileSDL(ImageVertexes *const vert A_UNUSED, - int x A_UNUSED, int y A_UNUSED) const + int x A_UNUSED, int y A_UNUSED) const override final { } void calcTile(ImageCollection *const vertCol A_UNUSED, const Image *const image A_UNUSED, - int x A_UNUSED, int y A_UNUSED) + int x A_UNUSED, int y A_UNUSED) override final { } - void drawTile(const ImageVertexes *const vert A_UNUSED) + void drawTile(const ImageVertexes *const vert A_UNUSED) override final { } void drawTile(const ImageCollection *const vertCol A_UNUSED) + override final { } void updateScreen() { } - SDL_Surface *getScreenshot() A_WARN_UNUSED + SDL_Surface *getScreenshot() override final A_WARN_UNUSED { return nullptr; } - bool drawNet(const int x1 A_UNUSED, const int y1 A_UNUSED, - const int x2 A_UNUSED, const int y2 A_UNUSED, - const int width A_UNUSED, const int height A_UNUSED) + bool drawNet(const int x1 A_UNUSED, + const int y1 A_UNUSED, + const int x2 A_UNUSED, + const int y2 A_UNUSED, + const int width A_UNUSED, + const int height A_UNUSED) override final { return false; } bool calcWindow(ImageCollection *const vertCol A_UNUSED, const int x A_UNUSED, const int y A_UNUSED, const int w A_UNUSED, const int h A_UNUSED, - const ImageRect &imgRect A_UNUSED) + const ImageRect &imgRect A_UNUSED) override final { return false; } void setBlitMode(const BlitMode mode) @@ -150,24 +160,24 @@ class SurfaceGraphics : public Graphics BlitMode getBlitMode() const A_WARN_UNUSED { return mBlitMode; } - void fillRectangle(const gcn::Rectangle &rect A_UNUSED) override + void fillRectangle(const gcn::Rectangle &rect A_UNUSED) override final { } - void drawRectangle(const gcn::Rectangle &rect A_UNUSED) override + void drawRectangle(const gcn::Rectangle &rect A_UNUSED) override final { } - void drawPoint(int x A_UNUSED, int y A_UNUSED) override + void drawPoint(int x A_UNUSED, int y A_UNUSED) override final { } void drawLine(int x1 A_UNUSED, int y1 A_UNUSED, - int x2 A_UNUSED, int y2 A_UNUSED) override + int x2 A_UNUSED, int y2 A_UNUSED) override final { } bool setVideoMode(const int w A_UNUSED, const int h A_UNUSED, const int bpp A_UNUSED, const bool fs A_UNUSED, const bool hwaccel A_UNUSED, const bool resize A_UNUSED, - const bool noFrame A_UNUSED) + const bool noFrame A_UNUSED) override final { return false; } protected: @@ -175,7 +185,7 @@ class SurfaceGraphics : public Graphics int srcX, int srcY, int dstX, int dstY, const int width, const int height, - const bool useColor); + const bool useColor) override final; BlitMode mBlitMode; SDL_Surface *mTarget; -- cgit v1.2.3-60-g2f50