diff options
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/game.cpp | 3 | ||||
-rw-r--r-- | engines/sci/engine/kevent.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 9 |
3 files changed, 6 insertions, 8 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 00230f0f3c..caf828b586 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -31,6 +31,7 @@ #include "sci/engine/state.h" #include "sci/engine/kernel.h" #include "sci/engine/kernel_types.h" +#include "sci/gui/gui.h" #include "sci/gfx/gfx_widgets.h" #include "sci/gfx/gfx_state_internal.h" // required for GfxPort, GfxVisual #include "sci/gfx/menubar.h" @@ -210,7 +211,7 @@ int _reset_graphics_input(EngineState *s) { gfxop_fill_box(s->gfx_state, gfx_rect(0, 0, 320, 200), s->ega_colors[0]); // Fill screen black gfxop_update(s->gfx_state); - gfxop_set_pointer_position(s->gfx_state, Common::Point(160, 150)); + s->gui->moveCursor(160, 150); s->pic_is_new = 0; s->pic_visible_map = GFX_MASK_NONE; // Other values only make sense for debugging diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index 475e3200ca..b8af6f0ab0 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -65,7 +65,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { PUT_SEL32V(obj, x, s->gfx_state->pointer_pos.x); PUT_SEL32V(obj, y, s->gfx_state->pointer_pos.y); - //gfxop_set_pointer_position(s->gfx_state, Common::Point(s->gfx_state->pointer_pos.x, s->gfx_state->pointer_pos.y)); + //s->gui->moveCursor(s->gfx_state->pointer_pos.x, s->gfx_state->pointer_pos.y); switch (e.type) { case SCI_EVT_QUIT: diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 410818363b..06dcd73c95 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -276,10 +276,8 @@ static reg_t kSetCursorSci0(EngineState *s, int argc, reg_t *argv) { gfxop_set_pointer_cursor(s->gfx_state, cursor); // Set pointer position, if requested - if (argc >= 4) { - Common::Point newPos = Common::Point(argv[2].toSint16() + s->port->_bounds.x, argv[3].toSint16() + s->port->_bounds.y); - gfxop_set_pointer_position(s->gfx_state, newPos); - } + if (argc >= 4) + s->gui->moveCursor(argv[2].toSint16() + s->port->_bounds.x, argv[3].toSint16() + s->port->_bounds.y); return s->r_acc; } @@ -292,8 +290,7 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) { CursorMan.showMouse(argv[0].toSint16() != 0); break; case 2: - gfxop_set_pointer_position(s->gfx_state, - Common::Point(argv[0].toUint16() + s->port->_bounds.x, argv[1].toUint16() + s->port->_bounds.y)); + s->gui->moveCursor(argv[0].toUint16() + s->port->_bounds.x, argv[1].toUint16() + s->port->_bounds.y); break; case 4: { int16 top = argv[0].toSint16(); |