summaryrefslogtreecommitdiff
path: root/src/render/sdl2softwaregraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-24 14:01:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-24 21:18:57 +0300
commit0a8b5d325f2d2c326b6da27399711b198417a499 (patch)
tree9e89aa7610f3f74ef9df53f6afce6655fc95ab07 /src/render/sdl2softwaregraphics.cpp
parent779b65f15d3350b2d95a095e24a90526c64dcecb (diff)
downloadmv-0a8b5d325f2d2c326b6da27399711b198417a499.tar.gz
mv-0a8b5d325f2d2c326b6da27399711b198417a499.tar.bz2
mv-0a8b5d325f2d2c326b6da27399711b198417a499.tar.xz
mv-0a8b5d325f2d2c326b6da27399711b198417a499.zip
Rename Rectangle into Rect.
Rename ClipRectangle into ClipRect.
Diffstat (limited to 'src/render/sdl2softwaregraphics.cpp')
-rw-r--r--src/render/sdl2softwaregraphics.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index 016a9557e..8fe83188f 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -82,7 +82,7 @@ bool SDL2SoftwareGraphics::drawRescaledImage(const Image *const image,
if (!tmpImage->mSDLSurface)
return false;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const SDL_Rect &bounds = image->mBounds;
SDL_Rect srcRect =
@@ -123,7 +123,7 @@ bool SDL2SoftwareGraphics::drawImageInline(const Image *const image,
if (!mSurface || !image || !image->mSDLSurface)
return false;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const SDL_Rect &bounds = image->mBounds;
SDL_Surface *const src = image->mSDLSurface;
@@ -211,7 +211,7 @@ void SDL2SoftwareGraphics::drawImageCached(const Image *const image,
if (!mSurface || !image || !image->mSDLSurface)
return;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const SDL_Rect &bounds = image->mBounds;
SDL_Surface *const src = image->mSDLSurface;
@@ -307,7 +307,7 @@ void SDL2SoftwareGraphics::drawPatternCached(const Image *const image,
if (iw == 0 || ih == 0)
return;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const int xOffset = top.xOffset + x;
const int yOffset = top.yOffset + y;
const int srcX = bounds.x;
@@ -428,7 +428,7 @@ void SDL2SoftwareGraphics::drawPatternInline(const Image *const image,
if (iw == 0 || ih == 0)
return;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const int xOffset = top.xOffset + x;
const int yOffset = top.yOffset + y;
const int srcX = bounds.x;
@@ -547,7 +547,7 @@ void SDL2SoftwareGraphics::drawRescaledPattern(const Image *const image,
if (iw == 0 || ih == 0)
return;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const int xOffset = top.xOffset + x;
const int yOffset = top.yOffset + y;
const int srcX = bounds.x;
@@ -610,7 +610,7 @@ void SDL2SoftwareGraphics::calcPatternInline(ImageVertexes* const vert,
if (iw == 0 || ih == 0)
return;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const int xOffset = top.xOffset + x;
const int yOffset = top.yOffset + y;
const int srcX = bounds.x;
@@ -695,7 +695,7 @@ void SDL2SoftwareGraphics::calcTileSDL(ImageVertexes *const vert,
return;
const Image *const image = vert->image;
- const ClipRectangle &top = mClipStack.top();
+ const ClipRect &top = mClipStack.top();
const SDL_Rect &bounds = image->mBounds;
DoubleRect *rect = new DoubleRect();
@@ -917,15 +917,15 @@ int SDL2SoftwareGraphics::SDL_FakeUpperBlit(const SDL_Surface *const src,
return 0;
}
-void SDL2SoftwareGraphics::fillRectangle(const Rectangle &rectangle)
+void SDL2SoftwareGraphics::fillRectangle(const Rect &rectangle)
{
FUNC_BLOCK("Graphics::fillRectangle", 1)
if (mClipStack.empty())
return;
- const ClipRectangle& top = mClipStack.top();
+ const ClipRect& top = mClipStack.top();
- Rectangle area = rectangle;
+ Rect area = rectangle;
area.x += top.xOffset;
area.y += top.yOffset;
@@ -1117,7 +1117,7 @@ void SDL2SoftwareGraphics::fillRectangle(const Rectangle &rectangle)
void SDL2SoftwareGraphics::_beginDraw()
{
- pushClipArea(Rectangle(0, 0, mRect.w, mRect.h));
+ pushClipArea(Rect(0, 0, mRect.w, mRect.h));
}
void SDL2SoftwareGraphics::_endDraw()
@@ -1125,11 +1125,11 @@ void SDL2SoftwareGraphics::_endDraw()
popClipArea();
}
-bool SDL2SoftwareGraphics::pushClipArea(Rectangle area)
+bool SDL2SoftwareGraphics::pushClipArea(Rect area)
{
const bool result = Graphics::pushClipArea(area);
- const ClipRectangle &carea = mClipStack.top();
+ const ClipRect &carea = mClipStack.top();
const SDL_Rect rect =
{
static_cast<int32_t>(carea.x),
@@ -1148,7 +1148,7 @@ void SDL2SoftwareGraphics::popClipArea()
if (mClipStack.empty())
return;
- const ClipRectangle &carea = mClipStack.top();
+ const ClipRect &carea = mClipStack.top();
const SDL_Rect rect =
{
static_cast<int32_t>(carea.x),
@@ -1165,7 +1165,7 @@ void SDL2SoftwareGraphics::drawPoint(int x, int y)
if (mClipStack.empty())
return;
- const ClipRectangle& top = mClipStack.top();
+ const ClipRect& top = mClipStack.top();
x += top.xOffset;
y += top.yOffset;
@@ -1184,7 +1184,7 @@ void SDL2SoftwareGraphics::drawHLine(int x1, int y, int x2)
if (mClipStack.empty())
return;
- const ClipRectangle& top = mClipStack.top();
+ const ClipRect& top = mClipStack.top();
const int xOffset = top.xOffset;
x1 += xOffset;
@@ -1310,7 +1310,7 @@ void SDL2SoftwareGraphics::drawVLine(int x, int y1, int y2)
if (mClipStack.empty())
return;
- const ClipRectangle& top = mClipStack.top();
+ const ClipRect& top = mClipStack.top();
const int yOffset = top.yOffset;
x += top.xOffset;
@@ -1440,7 +1440,7 @@ void SDL2SoftwareGraphics::drawVLine(int x, int y1, int y2)
SDL_UnlockSurface(mSurface);
}
-void SDL2SoftwareGraphics::drawRectangle(const Rectangle &rectangle)
+void SDL2SoftwareGraphics::drawRectangle(const Rect &rectangle)
{
const int x1 = rectangle.x;
const int x2 = x1 + rectangle.width - 1;