diff options
author | Filippos Karapetis | 2009-05-29 10:14:58 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-29 10:14:58 +0000 |
commit | cf5e7e17df26465209a23ef84a421dae8ed89d6f (patch) | |
tree | 1a017cf4537a6ff2487825d5b76a298521d8299c /engines | |
parent | b242d05563069f70a39c863bd1f2b3ac962602cc (diff) | |
download | scummvm-rg350-cf5e7e17df26465209a23ef84a421dae8ed89d6f.tar.gz scummvm-rg350-cf5e7e17df26465209a23ef84a421dae8ed89d6f.tar.bz2 scummvm-rg350-cf5e7e17df26465209a23ef84a421dae8ed89d6f.zip |
Fixed hopefully the last regression in kSetCursor. KQ5CD should work correctly again
svn-id: r40980
Diffstat (limited to 'engines')
-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 b33b89577c..c0d967083a 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -304,12 +304,16 @@ reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) { switch (argc) { case 1 : if (s->version < SCI_VERSION_1_1) { - // Pre-SCI1.1: set cursor according to the first parameter - GFX_ASSERT(gfxop_set_pointer_cursor(s->gfx_state, SKPV(0))); + if (SKPV(0) == 0 || SKPV(0) == 1 || SKPV(0) == -1) { + // Newer (SCI1.1) semantics: show/hide cursor + g_system->showMouse(SKPV(0) != 0); + } else { + // Pre-SCI1.1: set cursor according to the first parameter + GFX_ASSERT(gfxop_set_pointer_cursor(s->gfx_state, SKPV(0))); + } } else { - // SCI1.1: Hide cursor - if (SKPV(0) == 0) - GFX_ASSERT(gfxop_set_pointer_cursor(s->gfx_state, GFXOP_NO_POINTER)); + // SCI1.1: Show/hide cursor + g_system->showMouse(SKPV(0) != 0); } break; case 2 : @@ -325,10 +329,9 @@ reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) { // this would open the menu on top. LSL5 is an exception, as the game can open // the menu when the player presses a button during the intro, but the cursor is // not placed on (x, 0) or (x, 1) - int param2 = SKPV(1); - if (param2 == 0 || param2 == 1 || param2 == -1) { + if (SKPV(1) == 0 || SKPV(1) == 1 || SKPV(1) == -1) { GFX_ASSERT(gfxop_set_pointer_cursor(s->gfx_state, - param2 == 0 ? GFXOP_NO_POINTER : SKPV(0))); + SKPV(1) == 0 ? GFXOP_NO_POINTER : SKPV(0))); } else { // newer (SCI1.1) semantics: set pointer position GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state, Common::Point(UKPV(0), UKPV(1)))); |