diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-28 13:27:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-28 13:27:26 +0300 |
commit | 8f018529676006ed744138a929fcc621694d6d75 (patch) | |
tree | 03ef706a48100c1bb42a4611add5601844d2cbf5 | |
parent | ad43ff0ddf9b0484e00db7b7f0930bad975bf21a (diff) | |
download | plus-8f018529676006ed744138a929fcc621694d6d75.tar.gz plus-8f018529676006ed744138a929fcc621694d6d75.tar.bz2 plus-8f018529676006ed744138a929fcc621694d6d75.tar.xz plus-8f018529676006ed744138a929fcc621694d6d75.zip |
In renderers replace ImagePattern in methods into Pattern.
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 24 | ||||
-rw-r--r-- | src/gui/widgets/slider.cpp | 8 | ||||
-rw-r--r-- | src/maplayer.cpp | 4 | ||||
-rw-r--r-- | src/render/graphics.cpp | 20 | ||||
-rw-r--r-- | src/render/graphics.h | 32 | ||||
-rw-r--r-- | src/render/mobileopenglgraphics.cpp | 36 | ||||
-rw-r--r-- | src/render/mobileopenglgraphics.h | 36 | ||||
-rw-r--r-- | src/render/normalopenglgraphics.cpp | 36 | ||||
-rw-r--r-- | src/render/normalopenglgraphics.h | 36 | ||||
-rw-r--r-- | src/render/nullopenglgraphics.cpp | 36 | ||||
-rw-r--r-- | src/render/nullopenglgraphics.h | 36 | ||||
-rw-r--r-- | src/render/safeopenglgraphics.cpp | 44 | ||||
-rw-r--r-- | src/render/safeopenglgraphics.h | 32 | ||||
-rw-r--r-- | src/render/sdl2graphics.cpp | 36 | ||||
-rw-r--r-- | src/render/sdl2graphics.h | 38 | ||||
-rw-r--r-- | src/render/sdl2softwaregraphics.cpp | 34 | ||||
-rw-r--r-- | src/render/sdl2softwaregraphics.h | 38 | ||||
-rw-r--r-- | src/render/sdlgraphics.cpp | 36 | ||||
-rw-r--r-- | src/render/sdlgraphics.h | 38 | ||||
-rw-r--r-- | src/render/surfacegraphics.h | 62 | ||||
-rw-r--r-- | src/resources/ambientlayer.cpp | 8 |
21 files changed, 335 insertions, 335 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index ebb91f518..3a69ea0c0 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -479,17 +479,17 @@ void ScrollArea::drawVBar(gcn::Graphics *const graphics) if (vBackground.grid[4]) { - g->drawImagePattern(vBackground.grid[4], + g->drawPattern(vBackground.grid[4], dim.x, dim.y, dim.width, dim.height); } if (vBackground.grid[1]) { - g->drawImagePattern(vBackground.grid[1], + g->drawPattern(vBackground.grid[1], dim.x, dim.y, dim.width, vBackground.grid[1]->getHeight()); } if (vBackground.grid[7]) { - g->drawImagePattern(vBackground.grid[7], + g->drawPattern(vBackground.grid[7], dim.x, dim.height - vBackground.grid[7]->getHeight() + dim.y, dim.width, vBackground.grid[7]->getHeight()); } @@ -502,17 +502,17 @@ void ScrollArea::calcVBar(gcn::Graphics *const graphics) if (vBackground.grid[4]) { - g->calcImagePattern(mVertexes, vBackground.grid[4], + g->calcPattern(mVertexes, vBackground.grid[4], dim.x, dim.y, dim.width, dim.height); } if (vBackground.grid[1]) { - g->calcImagePattern(mVertexes, vBackground.grid[1], + g->calcPattern(mVertexes, vBackground.grid[1], dim.x, dim.y, dim.width, vBackground.grid[1]->getHeight()); } if (vBackground.grid[7]) { - g->calcImagePattern(mVertexes, vBackground.grid[7], + g->calcPattern(mVertexes, vBackground.grid[7], dim.x, dim.height - vBackground.grid[7]->getHeight() + dim.y, dim.width, vBackground.grid[7]->getHeight()); } @@ -525,19 +525,19 @@ void ScrollArea::drawHBar(gcn::Graphics *const graphics) if (hBackground.grid[4]) { - g->drawImagePattern(hBackground.grid[4], + g->drawPattern(hBackground.grid[4], dim.x, dim.y, dim.width, dim.height); } if (hBackground.grid[3]) { - g->drawImagePattern(hBackground.grid[3], + g->drawPattern(hBackground.grid[3], dim.x, dim.y, hBackground.grid[3]->getWidth(), dim.height); } if (hBackground.grid[5]) { - g->drawImagePattern(hBackground.grid[5], + g->drawPattern(hBackground.grid[5], dim.x + dim.width - hBackground.grid[5]->getWidth(), dim.y, hBackground.grid[5]->getWidth(), dim.height); } @@ -550,19 +550,19 @@ void ScrollArea::calcHBar(gcn::Graphics *const graphics) if (hBackground.grid[4]) { - g->calcImagePattern(mVertexes, hBackground.grid[4], + g->calcPattern(mVertexes, hBackground.grid[4], dim.x, dim.y, dim.width, dim.height); } if (hBackground.grid[3]) { - g->calcImagePattern(mVertexes, hBackground.grid[3], + g->calcPattern(mVertexes, hBackground.grid[3], dim.x, dim.y, hBackground.grid[3]->getWidth(), dim.height); } if (hBackground.grid[5]) { - g->calcImagePattern(mVertexes, hBackground.grid[5], + g->calcPattern(mVertexes, hBackground.grid[5], dim.x + dim.width - hBackground.grid[5]->getWidth(), dim.y, hBackground.grid[5]->getWidth(), dim.height); } diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp index 039af9743..e68482821 100644 --- a/src/gui/widgets/slider.cpp +++ b/src/gui/widgets/slider.cpp @@ -156,7 +156,7 @@ void Slider::draw(gcn::Graphics *graphics) if (buttons[0].grid[HMID]) { const Image *const hMid = buttons[0].grid[HMID]; - g->calcImagePattern(mVertexes, hMid, x, y, + g->calcPattern(mVertexes, hMid, x, y, w, hMid->getHeight()); } @@ -184,7 +184,7 @@ void Slider::draw(gcn::Graphics *graphics) if (buttons[1].grid[HMID]) { const Image *const hMid = buttons[1].grid[HMID]; - g->calcImagePattern(mVertexes, hMid, x, y, + g->calcPattern(mVertexes, hMid, x, y, w, hMid->getHeight()); } @@ -217,7 +217,7 @@ void Slider::draw(gcn::Graphics *graphics) if (buttons[0].grid[HMID]) { const Image *const hMid = buttons[0].grid[HMID]; - g->drawImagePattern(hMid, x, y, w, hMid->getHeight()); + g->drawPattern(hMid, x, y, w, hMid->getHeight()); } x += w; @@ -243,7 +243,7 @@ void Slider::draw(gcn::Graphics *graphics) if (buttons[1].grid[HMID]) { const Image *const hMid = buttons[1].grid[HMID]; - g->drawImagePattern(hMid, x, y, w, hMid->getHeight()); + g->drawPattern(hMid, x, y, w, hMid->getHeight()); } x += w; diff --git a/src/maplayer.cpp b/src/maplayer.cpp index ac33e8bd5..10e134e9d 100644 --- a/src/maplayer.cpp +++ b/src/maplayer.cpp @@ -143,7 +143,7 @@ void MapLayer::draw(Graphics *const graphics, } else { - graphics->drawImagePattern(img, px, py, + graphics->drawPattern(img, px, py, width, img->mBounds.h); } } @@ -459,7 +459,7 @@ void MapLayer::drawFringe(Graphics *const graphics, int startX, int startY, } else { - graphics->drawImagePattern(img, px, py, + graphics->drawPattern(img, px, py, width, img->mBounds.h); } } 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, diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp index b74ba96db..622091a39 100644 --- a/src/resources/ambientlayer.cpp +++ b/src/resources/ambientlayer.cpp @@ -119,13 +119,13 @@ void AmbientLayer::draw(Graphics *const graphics, const int x, if (imageHelper->useOpenGL() == RENDER_SOFTWARE || !mKeepRatio) { - graphics->drawImagePattern(mImage, static_cast<int>(-mPosX), - static_cast<int>(-mPosY), x + static_cast<int>(mPosX), - y + static_cast<int>(mPosY)); + graphics->drawPattern(mImage, static_cast<int>(-mPosX), + static_cast<int>(-mPosY), x + static_cast<int>(mPosX), + y + static_cast<int>(mPosY)); } else { - graphics->drawRescaledImagePattern(mImage, static_cast<int>(-mPosX), + graphics->drawRescaledPattern(mImage, static_cast<int>(-mPosX), static_cast<int>(-mPosY), x + static_cast<int>(mPosX), y + static_cast<int>(mPosY), static_cast<int>(mImage->mBounds.w) |