[Scummvm-cvs-logs] SF.net SVN: scummvm:[40980] scummvm/trunk/engines/sci/engine/kgraphics.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri May 29 12:14:58 CEST 2009
Revision: 40980
http://scummvm.svn.sourceforge.net/scummvm/?rev=40980&view=rev
Author: thebluegr
Date: 2009-05-29 10:14:58 +0000 (Fri, 29 May 2009)
Log Message:
-----------
Fixed hopefully the last regression in kSetCursor. KQ5CD should work correctly again
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-29 09:42:11 UTC (rev 40979)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-29 10:14:58 UTC (rev 40980)
@@ -304,12 +304,16 @@
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 @@
// 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))));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list