From 8f018529676006ed744138a929fcc621694d6d75 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 28 Dec 2013 13:27:26 +0300 Subject: In renderers replace ImagePattern in methods into Pattern. --- src/render/graphics.cpp | 20 ++++++------ src/render/graphics.h | 32 +++++++++---------- src/render/mobileopenglgraphics.cpp | 36 ++++++++++----------- src/render/mobileopenglgraphics.h | 36 ++++++++++----------- src/render/normalopenglgraphics.cpp | 36 ++++++++++----------- src/render/normalopenglgraphics.h | 36 ++++++++++----------- src/render/nullopenglgraphics.cpp | 36 ++++++++++----------- src/render/nullopenglgraphics.h | 36 ++++++++++----------- src/render/safeopenglgraphics.cpp | 44 +++++++++++++------------- src/render/safeopenglgraphics.h | 32 +++++++++---------- src/render/sdl2graphics.cpp | 36 ++++++++++----------- src/render/sdl2graphics.h | 38 +++++++++++------------ src/render/sdl2softwaregraphics.cpp | 34 ++++++++++---------- src/render/sdl2softwaregraphics.h | 38 +++++++++++------------ src/render/sdlgraphics.cpp | 36 ++++++++++----------- src/render/sdlgraphics.h | 38 +++++++++++------------ src/render/surfacegraphics.h | 62 ++++++++++++++++++------------------- 17 files changed, 313 insertions(+), 313 deletions(-) (limited to 'src/render') diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index fc8be7509..83e5a45bf 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -474,7 +474,7 @@ void Graphics::drawImageRect(const int x, const int y, { const int tlw = topLeft->getWidth(); const int tlh = topLeft->getHeight(); - drawImagePattern(center, tlw + x, tlh + y, + drawPattern(center, tlw + x, tlh + y, w - tlw - topRight->getWidth(), h - tlh - bottomLeft->getHeight()); } @@ -486,11 +486,11 @@ void Graphics::drawImageRect(const int x, const int y, const int rw = right->getWidth(); const int th = top->getHeight(); const int bh = bottom->getHeight(); - drawImagePattern(top, x + lw, y, w - lw - rw, th); - drawImagePattern(bottom, x + lw, h - bh + y, w - lw - rw, bh); - drawImagePattern(left, x, y + th, lw, h - th - bh); + drawPattern(top, x + lw, y, w - lw - rw, th); + drawPattern(bottom, x + lw, h - bh + y, w - lw - rw, bh); + drawPattern(left, x, y + th, lw, h - th - bh); if (w > rw) - drawImagePattern(right, x + w - rw, th + y, rw, h - th - bh); + drawPattern(right, x + w - rw, th + y, rw, h - th - bh); } // Draw the corners if (drawMain) @@ -561,7 +561,7 @@ bool Graphics::calcImageRect(ImageVertexes *const vert, { const int tlw = topLeft->getWidth(); const int tlh = topLeft->getHeight(); - calcImagePattern(vert, center, tlw + x, tlh + y, + calcPattern(vert, center, tlw + x, tlh + y, w - tlw - topRight->getWidth(), h - tlh - bottomLeft->getHeight()); } @@ -572,11 +572,11 @@ bool Graphics::calcImageRect(ImageVertexes *const vert, const int rw = right->getWidth(); const int th = top->getHeight(); const int bh = bottom->getHeight(); - calcImagePattern(vert, top, x + lw, y, w - lw - rw, th); - calcImagePattern(vert, bottom, x + lw, y + h - bh, w - lw - rw, bh); - calcImagePattern(vert, left, x, y + th, lw, h - th - bh); + calcPattern(vert, top, x + lw, y, w - lw - rw, th); + calcPattern(vert, bottom, x + lw, y + h - bh, w - lw - rw, bh); + calcPattern(vert, left, x, y + th, lw, h - th - bh); if (w > rw) - calcImagePattern(vert, right, x + w - rw, y + th, rw, h - th - bh); + calcPattern(vert, right, x + w - rw, y + th, rw, h - th - bh); } calcTileVertexes(vert, topLeft, x, y); diff --git a/src/render/graphics.h b/src/render/graphics.h index 79dc008b9..5bb82e40d 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -176,18 +176,18 @@ class Graphics : public gcn::Graphics const int desiredHeight, const bool useColor = false) = 0; - virtual void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) = 0; + virtual void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) = 0; /** * Draw a pattern based on a rescaled version of the given image... */ - 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) = 0; + virtual void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) = 0; /** * Draws a rectangle using images. 4 corner images, 4 side images and 1 @@ -224,15 +224,15 @@ class Graphics : public gcn::Graphics const Image *const left, const Image *const center); - virtual void calcImagePattern(ImageVertexes *const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const = 0; + virtual void calcPattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const = 0; - virtual void calcImagePattern(ImageCollection *const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const = 0; + virtual void calcPattern(ImageCollection *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const = 0; virtual void calcTileVertexes(ImageVertexes *const vert, const Image *const image, diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index 1d0feb085..a56510871 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -291,11 +291,11 @@ bool MobileOpenGLGraphics::drawRescaledImage(const Image *const image, return true; } -void MobileOpenGLGraphics::drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) +void MobileOpenGLGraphics::drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) { - FUNC_BLOCK("Graphics::drawImagePattern", 1) + FUNC_BLOCK("Graphics::drawPattern", 1) if (!image) return; @@ -389,11 +389,11 @@ void MobileOpenGLGraphics::drawImagePattern(const Image *const image, // } } -void MobileOpenGLGraphics::drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) +void MobileOpenGLGraphics::drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) { if (!image) return; @@ -528,10 +528,10 @@ inline void MobileOpenGLGraphics::drawVertexes(const } } -void MobileOpenGLGraphics::calcImagePattern(ImageVertexes *const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void MobileOpenGLGraphics::calcPattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const { if (!image || !vert) return; @@ -662,10 +662,10 @@ void MobileOpenGLGraphics::drawTileCollection(const ImageCollection } } -void MobileOpenGLGraphics::calcImagePattern(ImageCollection* const vertCol, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void MobileOpenGLGraphics::calcPattern(ImageCollection* const vertCol, + const Image *const image, + const int x, const int y, + const int w, const int h) const { ImageVertexes *vert = nullptr; if (vertCol->currentGLImage != image->mGLImage) @@ -681,7 +681,7 @@ void MobileOpenGLGraphics::calcImagePattern(ImageCollection* const vertCol, vert = vertCol->currentVert; } - calcImagePattern(vert, image, x, y, w, h); + calcPattern(vert, image, x, y, w, h); } void MobileOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert, diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index ca8d70a3a..8a2469267 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -82,28 +82,28 @@ class MobileOpenGLGraphics final : public Graphics const int desiredWidth, const int desiredHeight, const bool useColor, bool smooth); - void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) override final; + void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... */ - void drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - 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 final; - - void calcImagePattern(ImageCollection *const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const override final; + void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) override final; + + void calcPattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; + + void calcPattern(ImageCollection *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; void calcTileVertexes(ImageVertexes *const vert, const Image *const image, diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index 76f95cf9c..88a9f448f 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -338,11 +338,11 @@ bool NormalOpenGLGraphics::drawRescaledImage(const Image *const image, return true; } -void NormalOpenGLGraphics::drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) +void NormalOpenGLGraphics::drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) { - FUNC_BLOCK("Graphics::drawImagePattern", 1) + FUNC_BLOCK("Graphics::drawPattern", 1) if (!image) return; @@ -470,11 +470,11 @@ void NormalOpenGLGraphics::drawImagePattern(const Image *const image, } } -void NormalOpenGLGraphics::drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) +void NormalOpenGLGraphics::drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) { if (!image) return; @@ -665,10 +665,10 @@ inline void NormalOpenGLGraphics::drawVertexes(const } } -void NormalOpenGLGraphics::calcImagePattern(ImageVertexes* const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void NormalOpenGLGraphics::calcPattern(ImageVertexes* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const { if (!image || !vert) return; @@ -836,10 +836,10 @@ void NormalOpenGLGraphics::drawTileCollection(const ImageCollection } } -void NormalOpenGLGraphics::calcImagePattern(ImageCollection* const vertCol, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void NormalOpenGLGraphics::calcPattern(ImageCollection* const vertCol, + const Image *const image, + const int x, const int y, + const int w, const int h) const { ImageVertexes *vert = nullptr; if (vertCol->currentGLImage != image->mGLImage) @@ -855,7 +855,7 @@ void NormalOpenGLGraphics::calcImagePattern(ImageCollection* const vertCol, vert = vertCol->currentVert; } - calcImagePattern(vert, image, x, y, w, h); + calcPattern(vert, image, x, y, w, h); } void NormalOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert, diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index 7042cf413..a62a97df7 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -82,28 +82,28 @@ class NormalOpenGLGraphics final : public Graphics const int desiredWidth, const int desiredHeight, const bool useColor, bool smooth); - void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) override final; + void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... */ - void drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - 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 final; - - void calcImagePattern(ImageCollection* const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const override final; + void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) override final; + + void calcPattern(ImageVertexes* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; + + void calcPattern(ImageCollection* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; void calcTileVertexes(ImageVertexes *const vert, const Image *const image, diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp index 0a831513b..0bee724ee 100644 --- a/src/render/nullopenglgraphics.cpp +++ b/src/render/nullopenglgraphics.cpp @@ -241,11 +241,11 @@ bool NullOpenGLGraphics::drawRescaledImage(const Image *const image, return true; } -void NullOpenGLGraphics::drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) +void NullOpenGLGraphics::drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) { - FUNC_BLOCK("Graphics::drawImagePattern", 1) + FUNC_BLOCK("Graphics::drawPattern", 1) if (!image) return; @@ -373,11 +373,11 @@ void NullOpenGLGraphics::drawImagePattern(const Image *const image, } } -void NullOpenGLGraphics::drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) +void NullOpenGLGraphics::drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) { if (!image) return; @@ -568,10 +568,10 @@ inline void NullOpenGLGraphics::drawVertexes(const } } -void NullOpenGLGraphics::calcImagePattern(ImageVertexes* const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void NullOpenGLGraphics::calcPattern(ImageVertexes* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const { if (!image || !vert) return; @@ -739,10 +739,10 @@ void NullOpenGLGraphics::drawTileCollection(const ImageCollection } } -void NullOpenGLGraphics::calcImagePattern(ImageCollection* const vertCol, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void NullOpenGLGraphics::calcPattern(ImageCollection* const vertCol, + const Image *const image, + const int x, const int y, + const int w, const int h) const { ImageVertexes *vert = nullptr; if (vertCol->currentGLImage != image->mGLImage) @@ -758,7 +758,7 @@ void NullOpenGLGraphics::calcImagePattern(ImageCollection* const vertCol, vert = vertCol->currentVert; } - calcImagePattern(vert, image, x, y, w, h); + calcPattern(vert, image, x, y, w, h); } void NullOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert, diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index 82285f90d..bf424bb8d 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -82,28 +82,28 @@ class NullOpenGLGraphics final : public Graphics const int desiredWidth, const int desiredHeight, const bool useColor, bool smooth); - void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) override final; + void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... */ - void drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - 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 final; - - void calcImagePattern(ImageCollection* const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const override final; + void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) override final; + + void calcPattern(ImageVertexes* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; + + void calcPattern(ImageCollection* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; void calcTileVertexes(ImageVertexes *const vert, const Image *const image, diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index 02369fef4..e1540dbab 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -237,13 +237,13 @@ bool SafeOpenGLGraphics::drawRescaledImage(const Image *const image, int srcX, return true; } -/* Optimising the functions that Graphics::drawImagePattern would call, +/* Optimising the functions that Graphics::drawPattern would call, * so that glBegin...glEnd are outside the main loop. */ -void SafeOpenGLGraphics::drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) +void SafeOpenGLGraphics::drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) { - FUNC_BLOCK("Graphics::drawImagePattern", 1) + FUNC_BLOCK("Graphics::drawPattern", 1) if (!image) return; @@ -278,11 +278,11 @@ void SafeOpenGLGraphics::drawImagePattern(const Image *const image, glEnd(); } -void SafeOpenGLGraphics::drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) +void SafeOpenGLGraphics::drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) { if (!image) return; @@ -339,21 +339,21 @@ void SafeOpenGLGraphics::calcTileVertexes(ImageVertexes *const vert A_UNUSED, { } -void SafeOpenGLGraphics::calcImagePattern(ImageVertexes *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 +void SafeOpenGLGraphics::calcPattern(ImageVertexes *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 { } -void SafeOpenGLGraphics::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 +void SafeOpenGLGraphics::calcPattern(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 { } diff --git a/src/render/safeopenglgraphics.h b/src/render/safeopenglgraphics.h index 705e580e1..60a726845 100644 --- a/src/render/safeopenglgraphics.h +++ b/src/render/safeopenglgraphics.h @@ -75,18 +75,18 @@ class SafeOpenGLGraphics final : public Graphics const int desiredWidth, const int desiredHeight, const bool useColor, bool smooth); - void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) override final; + void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) override final; /** * Draw a pattern based on a rescaled version of the given image... */ - void drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) override final; + void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) override final; void calcTileVertexes(ImageVertexes *const vert, const Image *const image, @@ -96,15 +96,15 @@ class SafeOpenGLGraphics final : public Graphics 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 override final; + void calcPattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + 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 final; + void calcPattern(ImageCollection *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; void drawTileVertexes(const ImageVertexes *const vert) override final; diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp index 979de3c31..6426506ee 100644 --- a/src/render/sdl2graphics.cpp +++ b/src/render/sdl2graphics.cpp @@ -149,11 +149,11 @@ bool SDLGraphics::drawImage2(const Image *const image, int srcX, int srcY, return !MSDL_RenderCopy(mRenderer, image->mTexture, &srcRect, &dstRect); } -void SDLGraphics::drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) +void SDLGraphics::drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) { - FUNC_BLOCK("Graphics::drawImagePattern", 1) + FUNC_BLOCK("Graphics::drawPattern", 1) // Check that preconditions for blitting are met. if (!mWindow || !image) return; @@ -196,11 +196,11 @@ void SDLGraphics::drawImagePattern(const Image *const image, } } -void SDLGraphics::drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) +void SDLGraphics::drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) { // Check that preconditions for blitting are met. if (!mWindow || !image) @@ -254,10 +254,10 @@ void SDLGraphics::drawRescaledImagePattern(const Image *const image, delete tmpImage; } -void SDLGraphics::calcImagePattern(ImageVertexes* const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void SDLGraphics::calcPattern(ImageVertexes* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const { // Check that preconditions for blitting are met. if (!vert || !mWindow || !image || !image->mTexture) @@ -304,10 +304,10 @@ void SDLGraphics::calcImagePattern(ImageVertexes* const vert, } } -void SDLGraphics::calcImagePattern(ImageCollection* const vertCol, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void SDLGraphics::calcPattern(ImageCollection* const vertCol, + const Image *const image, + const int x, const int y, + const int w, const int h) const { ImageVertexes *vert = nullptr; if (vertCol->currentImage != image) @@ -323,7 +323,7 @@ void SDLGraphics::calcImagePattern(ImageCollection* const vertCol, vert = vertCol->currentVert; } - calcImagePattern(vert, image, x, y, w, h); + calcPattern(vert, image, x, y, w, h); } void SDLGraphics::calcTileVertexes(ImageVertexes *const vert, diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h index 362d7cbc0..cbb2ff901 100644 --- a/src/render/sdl2graphics.h +++ b/src/render/sdl2graphics.h @@ -69,25 +69,25 @@ class SDLGraphics final : public Graphics const int desiredHeight, const bool useColor = false) override final; - void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) override final; - - void drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - 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 final; - - void calcImagePattern(ImageCollection *const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const override final; + void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) override final; + + void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) override final; + + void calcPattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; + + void calcPattern(ImageCollection *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; void calcTileVertexes(ImageVertexes *const vert, const Image *const image, diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp index 7556bc5ac..e4e3d822f 100644 --- a/src/render/sdl2softwaregraphics.cpp +++ b/src/render/sdl2softwaregraphics.cpp @@ -203,11 +203,11 @@ bool SDL2SoftwareGraphics::drawImage2(const Image *const image, return 0; } -void SDL2SoftwareGraphics::drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) +void SDL2SoftwareGraphics::drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) { - FUNC_BLOCK("Graphics::drawImagePattern", 1) + FUNC_BLOCK("Graphics::drawPattern", 1) // Check that preconditions for blitting are met. if (!mSurface || !image) return; @@ -313,11 +313,11 @@ void SDL2SoftwareGraphics::drawImagePattern(const Image *const image, } } -void SDL2SoftwareGraphics::drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) +void SDL2SoftwareGraphics::drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) { // Check that preconditions for blitting are met. if (!mSurface || !image) @@ -379,10 +379,10 @@ void SDL2SoftwareGraphics::drawRescaledImagePattern(const Image *const image, delete tmpImage; } -void SDL2SoftwareGraphics::calcImagePattern(ImageVertexes* const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void SDL2SoftwareGraphics::calcPattern(ImageVertexes* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const { // Check that preconditions for blitting are met. if (!vert || !mSurface || !image || !image->mSDLSurface) @@ -433,10 +433,10 @@ void SDL2SoftwareGraphics::calcImagePattern(ImageVertexes* const vert, } } -void SDL2SoftwareGraphics::calcImagePattern(ImageCollection* const vertCol, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void SDL2SoftwareGraphics::calcPattern(ImageCollection* const vertCol, + const Image *const image, + const int x, const int y, + const int w, const int h) const { ImageVertexes *vert = nullptr; if (vertCol->currentImage != image) diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h index 54a45d4fe..609ef6cf5 100644 --- a/src/render/sdl2softwaregraphics.h +++ b/src/render/sdl2softwaregraphics.h @@ -70,25 +70,25 @@ class SDL2SoftwareGraphics final : public Graphics const int desiredHeight, const bool useColor = false) override final; - void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) override final; - - void drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - 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 final; - - void calcImagePattern(ImageCollection *const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const override final; + void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) override final; + + void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) override final; + + void calcPattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; + + void calcPattern(ImageCollection *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; void calcTileVertexes(ImageVertexes *const vert, const Image *const image, diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp index 52439f1c3..f62d9dd56 100644 --- a/src/render/sdlgraphics.cpp +++ b/src/render/sdlgraphics.cpp @@ -194,11 +194,11 @@ bool SDLGraphics::drawImage2(const Image *const image, int srcX, int srcY, return 0; } -void SDLGraphics::drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) +void SDLGraphics::drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) { - FUNC_BLOCK("Graphics::drawImagePattern", 1) + FUNC_BLOCK("Graphics::drawPattern", 1) // Check that preconditions for blitting are met. if (!mWindow || !image) return; @@ -304,11 +304,11 @@ void SDLGraphics::drawImagePattern(const Image *const image, } } -void SDLGraphics::drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - const int scaledHeight) +void SDLGraphics::drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) { // Check that preconditions for blitting are met. if (!mWindow || !image) @@ -370,10 +370,10 @@ void SDLGraphics::drawRescaledImagePattern(const Image *const image, delete tmpImage; } -void SDLGraphics::calcImagePattern(ImageVertexes* const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void SDLGraphics::calcPattern(ImageVertexes* const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const { // Check that preconditions for blitting are met. if (!vert || !mWindow || !image || !image->mSDLSurface) @@ -424,10 +424,10 @@ void SDLGraphics::calcImagePattern(ImageVertexes* const vert, } } -void SDLGraphics::calcImagePattern(ImageCollection* const vertCol, - const Image *const image, - const int x, const int y, - const int w, const int h) const +void SDLGraphics::calcPattern(ImageCollection* const vertCol, + const Image *const image, + const int x, const int y, + const int w, const int h) const { ImageVertexes *vert = nullptr; if (vertCol->currentImage != image) @@ -443,7 +443,7 @@ void SDLGraphics::calcImagePattern(ImageCollection* const vertCol, vert = vertCol->currentVert; } - calcImagePattern(vert, image, x, y, w, h); + calcPattern(vert, image, x, y, w, h); } void SDLGraphics::calcTileVertexes(ImageVertexes *const vert, diff --git a/src/render/sdlgraphics.h b/src/render/sdlgraphics.h index fcb624b12..b88a47dc4 100644 --- a/src/render/sdlgraphics.h +++ b/src/render/sdlgraphics.h @@ -69,25 +69,25 @@ class SDLGraphics final : public Graphics const int desiredHeight, const bool useColor = false) override final; - void drawImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h) override final; - - void drawRescaledImagePattern(const Image *const image, - const int x, const int y, - const int w, const int h, - const int scaledWidth, - 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 final; - - void calcImagePattern(ImageCollection *const vert, - const Image *const image, - const int x, const int y, - const int w, const int h) const override final; + void drawPattern(const Image *const image, + const int x, const int y, + const int w, const int h) override final; + + void drawRescaledPattern(const Image *const image, + const int x, const int y, + const int w, const int h, + const int scaledWidth, + const int scaledHeight) override final; + + void calcPattern(ImageVertexes *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; + + void calcPattern(ImageCollection *const vert, + const Image *const image, + const int x, const int y, + const int w, const int h) const override final; void calcTileVertexes(ImageVertexes *const vert, const Image *const image, diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h index a81ff590c..b33fa0d63 100644 --- a/src/render/surfacegraphics.h +++ b/src/render/surfacegraphics.h @@ -80,37 +80,37 @@ class SurfaceGraphics final : public Graphics 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) override final - { } - - void drawRescaledImagePattern(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 scaledWidth A_UNUSED, - const int scaledHeight A_UNUSED) - override final - { } - - void calcImagePattern(ImageVertexes *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 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 override final + void drawPattern(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) override final + { } + + void drawRescaledPattern(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 scaledWidth A_UNUSED, + const int scaledHeight A_UNUSED) + override final + { } + + void calcPattern(ImageVertexes *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 override final + { } + + void calcPattern(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 override final { } void calcTileVertexes(ImageVertexes *const vert A_UNUSED, -- cgit v1.2.3-70-g09d2