diff options
author | Martin Kiewitz | 2009-10-07 14:53:15 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-07 14:53:15 +0000 |
commit | 1dfe7578cba4894630bd6fa093cfa1607fbdad6e (patch) | |
tree | f8b14f9eea63060f11f27fd38320ec3c32d53128 /engines/sci/engine | |
parent | ece4f55db970c27a82d99aac76bc621790478b61 (diff) | |
download | scummvm-rg350-1dfe7578cba4894630bd6fa093cfa1607fbdad6e.tar.gz scummvm-rg350-1dfe7578cba4894630bd6fa093cfa1607fbdad6e.tar.bz2 scummvm-rg350-1dfe7578cba4894630bd6fa093cfa1607fbdad6e.zip |
SCI/newgui: kSetCursor (show, hide, pos, shape) implemented
svn-id: r44734
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 57b884ee09..0a0b9e51d7 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -269,13 +269,7 @@ PaletteEntry get_pic_color(EngineState *s, int color) { static reg_t kSetCursorSci0(EngineState *s, int argc, reg_t *argv) { Common::Point pos; - - int16 cursor = argv[0].toSint16(); - - if ((argc >= 2) && (argv[1].toSint16() == 0)) - cursor = GFXOP_NO_POINTER; - - gfxop_set_pointer_cursor(s->gfx_state, cursor); + GuiResourceId cursorId = argv[0].toSint16(); // Set pointer position, if requested if (argc >= 4) { @@ -283,6 +277,12 @@ static reg_t kSetCursorSci0(EngineState *s, int argc, reg_t *argv) { pos.x = argv[2].toSint16(); s->gui->setCursorPos(pos); } + + if ((argc >= 2) && (argv[1].toSint16() == 0)) { + cursorId = -1; + } + + s->gui->setCursorShape(cursorId); return s->r_acc; } @@ -292,7 +292,10 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) { switch (argc) { case 1: - CursorMan.showMouse(argv[0].toSint16() != 0); + if (argv[0].isNull()) + s->gui->setCursorHide(); + else + s->gui->setCursorShow(); break; case 2: pos.y = argv[1].toSint16(); |