mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user