aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kgraphics.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index e3293dad9c..dde4cfe536 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -268,6 +268,8 @@ PaletteEntry get_pic_color(EngineState *s, int color) {
}
static reg_t kSetCursorSci0(EngineState *s, int argc, reg_t *argv) {
+
+
int16 cursor = argv[0].toSint16();
if ((argc >= 2) && (argv[1].toSint16() == 0))
@@ -299,7 +301,7 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) {
int16 right = argv[3].toSint16();
if ((right >= left) && (bottom >= top)) {
- Common::Rect rect = Common::Rect(left, top, right + 1, bottom + 1);
+ Common::Rect rect = Common::Rect(left, top, right, bottom);
gfxop_set_pointer_zone(s->gfx_state, rect);
} else {
warning("kSetCursor: Ignoring invalid mouse zone (%i, %i)-(%i, %i)", left, top, right, bottom);
@@ -877,8 +879,8 @@ reg_t kOnControl(EngineState *s, int argc, reg_t *argv) {
rect.left = argv[argBase].toSint16();
rect.top = argv[argBase + 1].toSint16();
if (argc > 3) {
- rect.right = argv[argBase + 2].toSint16() + 1;
- rect.bottom = argv[argBase + 3].toSint16() + 1;
+ rect.right = argv[argBase + 2].toSint16();
+ rect.bottom = argv[argBase + 3].toSint16();
} else {
rect.right = rect.left + 1;
rect.bottom = rect.top + 1;
@@ -1403,7 +1405,7 @@ static void _k_draw_control(EngineState *s, reg_t obj, bool hilite) {
rect_t area = gfx_rect(x, y, xl, yl);
Common::Rect rect;
- rect = Common::Rect (x, y, (int16)GET_SEL32V(obj, nsRight) + 1, (int16)GET_SEL32V(obj, nsBottom) + 1);
+ rect = Common::Rect (x, y, (int16)GET_SEL32V(obj, nsRight), (int16)GET_SEL32V(obj, nsBottom));
int font_nr = GET_SEL32V(obj, font);
reg_t text_pos = GET_SEL32(obj, text);
@@ -1587,8 +1589,8 @@ reg_t kSetPort(EngineState *s, int argc, reg_t *argv) {
case 6:
picRect.top = argv[0].toSint16();
picRect.left = argv[1].toSint16();
- picRect.bottom = argv[2].toSint16() + 1;
- picRect.right = argv[3].toSint16() + 1;
+ picRect.bottom = argv[2].toSint16();
+ picRect.right = argv[3].toSint16();
picTop = argv[4].toSint16();
picLeft = argv[5].toSint16();
s->gui->setPortPic(picRect, picTop, picLeft);
@@ -1624,7 +1626,7 @@ reg_t kDisposeWindow(EngineState *s, int argc, reg_t *argv) {
}
reg_t kNewWindow(EngineState *s, int argc, reg_t *argv) {
- Common::Rect rect1 (argv[1].toSint16(), argv[0].toSint16(), argv[3].toSint16() + 1, argv[2].toSint16() + 1);
+ Common::Rect rect1 (argv[1].toSint16(), argv[0].toSint16(), argv[3].toSint16(), argv[2].toSint16());
Common::Rect rect2;
int argextra = argc == 13 ? 4 : 0; // Triggers in PQ3 and SCI1.1 games
int style = argv[5 + argextra].toSint16();
@@ -1634,7 +1636,7 @@ reg_t kNewWindow(EngineState *s, int argc, reg_t *argv) {
// const char *title = argv[4 + argextra].segment ? kernel_dereference_char_pointer(s, argv[4 + argextra], 0) : NULL;
if (argc==13) {
- rect2 = Common::Rect (argv[5].toSint16(), argv[4].toSint16(), argv[7].toSint16() + 1, argv[6].toSint16() + 1);
+ rect2 = Common::Rect (argv[5].toSint16(), argv[4].toSint16(), argv[7].toSint16(), argv[6].toSint16());
}
Common::String title;