diff options
author | Filippos Karapetis | 2011-06-13 16:43:04 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-06-13 16:43:04 +0300 |
commit | bfa26ffc44f80e4eb3d8590f5f865cda6a5188b7 (patch) | |
tree | dbd8e85bc5a1d6718efa847d4b0aec9cf2f7bc34 | |
parent | 3e6f031fc56b982331e940a1eb7c5496d030ac1d (diff) | |
download | scummvm-rg350-bfa26ffc44f80e4eb3d8590f5f865cda6a5188b7.tar.gz scummvm-rg350-bfa26ffc44f80e4eb3d8590f5f865cda6a5188b7.tar.bz2 scummvm-rg350-bfa26ffc44f80e4eb3d8590f5f865cda6a5188b7.zip |
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
-rw-r--r-- | engines/sci/graphics/compare.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp index 1dbe279f8a..3183ffa2b9 100644 --- a/engines/sci/graphics/compare.cpp +++ b/engines/sci/graphics/compare.cpp @@ -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; } } |