diff options
author | Torbjörn Andersson | 2013-02-02 12:41:44 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2013-02-02 12:41:44 +0100 |
commit | ea4639c65facbfef049d3581dc1e0f96d5f19dc9 (patch) | |
tree | 24110b25b473de51c8d56c32565ba4c209956d75 /engines/hopkins | |
parent | 9772426c586c0ac25fd21e9865ac5f2d85217db1 (diff) | |
download | scummvm-rg350-ea4639c65facbfef049d3581dc1e0f96d5f19dc9.tar.gz scummvm-rg350-ea4639c65facbfef049d3581dc1e0f96d5f19dc9.tar.bz2 scummvm-rg350-ea4639c65facbfef049d3581dc1e0f96d5f19dc9.zip |
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.
Diffstat (limited to 'engines/hopkins')
-rw-r--r-- | engines/hopkins/graphics.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; |