aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-09-21 14:25:54 +0200
committeruruk2013-09-21 14:25:54 +0200
commit3b57efaf992b3dccbf60b0f94004c587b93fec32 (patch)
tree6c50b4b8ebd81f0f72f3b2802bf6d50cb9462f04
parent2dcdca571192faebdc1799461fe907fad7087ef3 (diff)
downloadscummvm-rg350-3b57efaf992b3dccbf60b0f94004c587b93fec32.tar.gz
scummvm-rg350-3b57efaf992b3dccbf60b0f94004c587b93fec32.tar.bz2
scummvm-rg350-3b57efaf992b3dccbf60b0f94004c587b93fec32.zip
AVALANCHE: Revise Graphics::drawPicture().
-rw-r--r--engines/avalanche/graphics.cpp4
-rw-r--r--engines/avalanche/graphics.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index aa363bb0a2..643025fec7 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -290,11 +290,11 @@ void Graphics::drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16
}
}
-void Graphics::drawPicture(::Graphics::Surface &target, ::Graphics::Surface &picture, uint16 destX, uint16 destY) {
+void Graphics::drawPicture(::Graphics::Surface &target, const ::Graphics::Surface &picture, uint16 destX, uint16 destY) {
// Copy the picture to the given place on the screen.
for (uint16 y = 0; y < picture.h; y++) {
for (uint16 x = 0; x < picture.w; x++)
- *(byte *)target.getBasePtr(x + destX, y + destY) = *(byte *)picture.getBasePtr(x, y);
+ *(byte *)target.getBasePtr(x + destX, y + destY) = *(const byte *)picture.getBasePtr(x, y);
}
}
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index de08a9a2c5..4cf338bb3f 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -86,7 +86,7 @@ public:
::Graphics::Surface loadPictureRow(Common::File &file, uint16 width, uint16 height); // Reads Row-planar EGA data.
void drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y);
- void drawPicture(::Graphics::Surface &target, ::Graphics::Surface &picture, uint16 destX, uint16 destY); // Can't call .free() here. See Lucerna::showscore() for example.
+ void drawPicture(::Graphics::Surface &target, const ::Graphics::Surface &picture, uint16 destX, uint16 destY); // Can't call .free() here. See Lucerna::showscore() for example.
void refreshScreen();
void refreshBackground();