mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 10:26:40 +00:00
SCI: Reverted commit db7dea3
The original check was correct, and the associated MG bug (#3049515) has actually been fixed with another commit. Fixes bug (regression) #3315639 - "Character Glitches in KQ4 SCI". Many thanks to waltervn and wjp for their help on this
This commit is contained in:
parent
3e6f031fc5
commit
bfa26ffc44
@ -84,7 +84,14 @@ reg_t GfxCompare::canBeHereCheckRectList(reg_t checkObject, const Common::Rect &
|
||||
curRect.right = readSelectorValue(_segMan, curObject, SELECTOR(brRight));
|
||||
curRect.bottom = readSelectorValue(_segMan, curObject, SELECTOR(brBottom));
|
||||
// Check if curRect is within checkRect
|
||||
if (checkRect.contains(curRect))
|
||||
// This behavior is slightly odd, but it's how the original SCI
|
||||
// engine did it: a rect cannot be contained within itself
|
||||
// (there is no equality). Do NOT change this to contains(), as
|
||||
// it breaks KQ4 early (bug #3315639).
|
||||
if (curRect.right > checkRect.left &&
|
||||
curRect.left < checkRect.right &&
|
||||
curRect.bottom > checkRect.top &&
|
||||
curRect.top < checkRect.bottom)
|
||||
return curObject;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user