summaryrefslogtreecommitdiff
path: root/src/graphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-21 04:08:09 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-21 13:19:22 +0300
commit459c2c3a6decbd5576760040f566f1544645c3ac (patch)
tree16917971820b11a99acc4f875f977811e4474670 /src/graphics.cpp
parent08d0c6de4aa164c690d94622e4a6a6ea57a9efaf (diff)
downloadplus-459c2c3a6decbd5576760040f566f1544645c3ac.tar.gz
plus-459c2c3a6decbd5576760040f566f1544645c3ac.tar.bz2
plus-459c2c3a6decbd5576760040f566f1544645c3ac.tar.xz
plus-459c2c3a6decbd5576760040f566f1544645c3ac.zip
Add some consts to draw backend.
Diffstat (limited to 'src/graphics.cpp')
-rw-r--r--src/graphics.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index a0a9a9c12..16a1de4a2 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -369,7 +369,7 @@ bool Graphics::drawImage(const Image *image, int x, int y)
}
}
-bool Graphics::drawRescaledImage(Image *const image, int srcX, int srcY,
+bool Graphics::drawRescaledImage(const Image *const image, int srcX, int srcY,
int dstX, int dstY,
const int width, const int height,
const int desiredWidth,
@@ -659,12 +659,12 @@ void Graphics::drawImageRect2(GraphicsVertexes *const vert,
}
}
-void Graphics::drawImagePattern2(GraphicsVertexes *const vert,
+void Graphics::drawImagePattern2(const GraphicsVertexes *const vert,
const Image *const img)
{
// here not checking input parameters
- std::vector<DoubleRect*> *const arr = vert->getRectsSDL();
+ const std::vector<DoubleRect*> *const arr = vert->getRectsSDLconst();
for (std::vector<DoubleRect*>::const_iterator it = arr->begin(),
it_end = arr->end(); it != it_end; ++it)
@@ -742,7 +742,7 @@ bool Graphics::calcImageRect(GraphicsVertexes *const vert,
void Graphics::calcImagePattern(GraphicsVertexes* const vert,
const Image *const image,
const int x, const int y,
- const int w, const int h)
+ const int w, const int h) const
{
// Check that preconditions for blitting are met.
if (!vert || !mTarget || !image || !image->mSDLSurface || !vert->sdl)
@@ -794,11 +794,11 @@ void Graphics::calcImagePattern(GraphicsVertexes* const vert,
void Graphics::calcTile(ImageVertexes *const vert A_UNUSED,
const Image *const image A_UNUSED,
- int x A_UNUSED, int y A_UNUSED)
+ int x A_UNUSED, int y A_UNUSED) const
{
}
-void Graphics::calcTile(ImageVertexes *const vert, int x, int y)
+void Graphics::calcTile(ImageVertexes *const vert, int x, int y) const
{
// Check that preconditions for blitting are met.
if (!vert || !vert->image || !vert->image->mSDLSurface)
@@ -828,7 +828,7 @@ void Graphics::calcTile(ImageVertexes *const vert, int x, int y)
}
}
-void Graphics::drawTile(ImageVertexes *const vert)
+void Graphics::drawTile(const ImageVertexes *const vert)
{
// vert and img must be != 0
const Image *const img = vert->image;