diff options
author | Martin Kiewitz | 2010-01-22 23:02:33 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-22 23:02:33 +0000 |
commit | 81e85b31862aac70d4998962afff5c0bd6e8ad6f (patch) | |
tree | f7a5881795e58d04b17582c54f8229b16dfc0c5b | |
parent | fa80444a12cf5b0d1c4bbda81c4d7e969d905fee (diff) | |
download | scummvm-rg350-81e85b31862aac70d4998962afff5c0bd6e8ad6f.tar.gz scummvm-rg350-81e85b31862aac70d4998962afff5c0bd6e8ad6f.tar.bz2 scummvm-rg350-81e85b31862aac70d4998962afff5c0bd6e8ad6f.zip |
SCI: dont swap coordinates on rects when both are "wrong", will fix button placement and gfx corruption when challenging jones (caused by duplicate buttons having lower right 0, 0) - function needs some more work
svn-id: r47446
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 0752a9fc33..2951e7030c 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -185,6 +185,14 @@ reg_t kPicNotValid(EngineState *s, int argc, reg_t *argv) { } Common::Rect kGraphCreateRect(int16 x, int16 y, int16 x1, int16 y1) { + // TODO: find out what to do when just one coordinate is wrong - if we should fix it the same way as in jones + // needs some serious work + if ((x > x1) && (y > y1)) { + // We get this in jones when challenging jones -> upper left is right, lower right is 0, 0 + // If we "fix this" we will draw a box that isnt supposed to be there and also draw the button to the wrong + // space + return Common::Rect(x, y, x, y); + } if (x > x1) SWAP(x, x1); if (y > y1) SWAP(y, y1); return Common::Rect(x, y, x1, y1); |