Skip to content

Commit

Permalink
KYRA: (MR) - fix animation glitch (bug #11312)
Browse files Browse the repository at this point in the history
  • Loading branch information
athrxx committed Jan 14, 2020
1 parent ee03597 commit f96c06f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions engines/kyra/graphics/screen_mr.cpp
Expand Up @@ -37,13 +37,17 @@ int Screen_MR::getLayer(int x, int y) {
x = 0; x = 0;
else if (x >= 320) else if (x >= 320)
x = 319; x = 319;
if (y < 0)
if (y < 0) {
y = 0; y = 0;
else if (y >= 188) } else if (y >= 188) {
y = 187; y = 187;

// The original actually limits the _maskMin/MaxY check to cases where y has already been clipped to 187.
if (y < _maskMinY || y > _maskMaxY) // Whether this was intentional or not: Scenes actually require that we do it that way or animations may
return 15; // be drawn on the wrong layer (bug #11312).
if (y < _maskMinY || y > _maskMaxY)
return 15;
}


uint8 pixel = *(getCPagePtr(5) + y * 320 + x); uint8 pixel = *(getCPagePtr(5) + y * 320 + x);
pixel &= 0x7F; pixel &= 0x7F;
Expand Down

0 comments on commit f96c06f

Please sign in to comment.