aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMartin Kiewitz2010-07-22 22:13:25 +0000
committerMartin Kiewitz2010-07-22 22:13:25 +0000
commit53893341fb150378f332e9150dc3c5a678e6d6f7 (patch)
treecbdb56fd5ad268517fb9cf9b5a3f80b67450bca9 /engines/sci/engine
parenta9414ebb08feea0353ab32b97f5e1234f232f302 (diff)
downloadscummvm-rg350-53893341fb150378f332e9150dc3c5a678e6d6f7.tar.gz
scummvm-rg350-53893341fb150378f332e9150dc3c5a678e6d6f7.tar.bz2
scummvm-rg350-53893341fb150378f332e9150dc3c5a678e6d6f7.zip
SCI: kSetCursor works the same in sci16
(coordinates are not a regular Rect, but bottom/right is the last allowed coordinate) svn-id: r51177
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kgraphics.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index bea91d7bf3..55d0de8261 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -150,14 +150,17 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) {
if (getSciVersion() >= SCI_VERSION_2) {
top = argv[1].toSint16();
left = argv[0].toSint16();
- bottom = argv[3].toSint16() + 1; // bottom/right needs to get included in our movezone
- right = argv[2].toSint16() + 1;
+ bottom = argv[3].toSint16();
+ right = argv[2].toSint16();
} else {
top = argv[0].toSint16();
left = argv[1].toSint16();
- bottom = argv[2].toSint16(); // TODO: check if sci16 behaved the same as sci32
+ bottom = argv[2].toSint16();
right = argv[3].toSint16();
}
+ // bottom/right needs to be included into our movezone, because we compare it like any regular Common::Rect
+ bottom++;
+ right++;
if ((right >= left) && (bottom >= top)) {
Common::Rect rect = Common::Rect(left, top, right, bottom);