From 3b57efaf992b3dccbf60b0f94004c587b93fec32 Mon Sep 17 00:00:00 2001 From: uruk Date: Sat, 21 Sep 2013 14:25:54 +0200 Subject: AVALANCHE: Revise Graphics::drawPicture(). --- engines/avalanche/graphics.cpp | 4 ++-- engines/avalanche/graphics.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/avalanche') 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(); -- cgit v1.2.3