From ea4639c65facbfef049d3581dc1e0f96d5f19dc9 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 2 Feb 2013 12:41:44 +0100 Subject: HOPKINS: Fix Sprite_Vesa() height clipping This fixes some Valgrind warnings on the city overhead map, and also seem to get rid of the bird "droppings" previously left behind in the area beneath the picture. There are things I don't understand about this function, but I hope I didn't break anything. --- engines/hopkins/graphics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index bdc2d50cd4..5e31f02d48 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -952,6 +952,7 @@ void GraphicsManager::Sprite_Vesa(byte *surface, const byte *spriteData, int xp, } // Clip Y + clip_y1 = height; if (yp <= 0) return; if (yp < _minY + 300) { @@ -999,7 +1000,7 @@ void GraphicsManager::Sprite_Vesa(byte *surface, const byte *spriteData, int xp, // Handling for clipped versus non-clipped if (_clipFl) { // Clipped version - for (int yc = 0; yc < height; ++yc, destP += _lineNbr2) { + for (int yc = 0; yc < clip_y1; ++yc, destP += _lineNbr2) { byte *tempDestP = destP; byte byteVal; int xc = 0; -- cgit v1.2.3