[Scummvm-cvs-logs] SF.net SVN: scummvm: [29288] scummvm/trunk/engines/cruise
yazoo at users.sourceforge.net
yazoo at users.sourceforge.net
Sun Oct 28 14:37:07 CET 2007
Revision: 29288
http://scummvm.svn.sourceforge.net/scummvm/?rev=29288&view=rev
Author: yazoo
Date: 2007-10-28 06:37:06 -0700 (Sun, 28 Oct 2007)
Log Message:
-----------
Implement cursor by object
Fix walk cursor
Modified Paths:
--------------
scummvm/trunk/engines/cruise/cruise_main.cpp
scummvm/trunk/engines/cruise/mouse.cpp
Modified: scummvm/trunk/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise_main.cpp 2007-10-28 13:34:57 UTC (rev 29287)
+++ scummvm/trunk/engines/cruise/cruise_main.cpp 2007-10-28 13:37:06 UTC (rev 29288)
@@ -1350,9 +1350,6 @@
//int32 q=0; /* Dummy */
int enableUser = 0;
- //int16 mouseX;
- //int16 mouseY;
- //int16 mouseButton;
scriptNameBuffer[0] = 0;
systemStrings.bootScriptName[0] = 0;
@@ -1410,7 +1407,8 @@
initVar4 = 0; */
}
- if (affichePasMenuJoueur) {
+ if (affichePasMenuJoueur)
+ {
if (main5)
fadeVar = 0;
@@ -1422,39 +1420,52 @@
mainDraw(0);
flipScreen();
- /* if (userEnabled && !main7 && !main15 && currentActiveMenu == -1)
- * {
- * getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
- *
- * if (mouseX != oldMouseX && mouseY != oldMouseY)
- * {
- * int cursorType;
- * int newCursor1;
- * int newCursor2;
- *
- * oldMouseX = mouseX;
- * oldMouseY = mouseY;
- *
- * cursorType = getCursorFromObject(mouseX, mouseY, &newCursor1, &newCursor2);
- *
- * if (cursorType == 9)
- * {
- * changeCursor(5);
- * }
- * else
- * if (cursorType == -1)
- * {
- * changeCursor(6);
- * }
- * else
- * {
- * changeCursor(4);
- * }
- *
- * }
- * }
- * else */
+ if (userEnabled && !main7 && !main15)
{
+ if(currentActiveMenu == -1)
+ {
+ int16 mouseX;
+ int16 mouseY;
+ int16 mouseButton;
+
+ static int16 oldMouseX = -1;
+ static int16 oldMouseY = -1;
+
+ getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
+
+ if (mouseX != oldMouseX && mouseY != oldMouseY)
+ {
+ int cursorType;
+ int newCursor1;
+ int newCursor2;
+
+ oldMouseX = mouseX;
+ oldMouseY = mouseY;
+
+ cursorType = getCursorFromObject(mouseX, mouseY, &newCursor1, &newCursor2);
+
+ if (cursorType == 9)
+ {
+ changeCursor(CURSOR_EXIT);
+ }
+ else
+ if (cursorType != -1)
+ {
+ changeCursor(CURSOR_MAGNIFYING_GLASS);
+ }
+ else
+ {
+ changeCursor(CURSOR_WALK);
+ }
+ }
+ }
+ else
+ {
+ changeCursor(CURSOR_NORMAL);
+ }
+ }
+ else
+ {
changeCursor(CURSOR_NORMAL);
}
Modified: scummvm/trunk/engines/cruise/mouse.cpp
===================================================================
--- scummvm/trunk/engines/cruise/mouse.cpp 2007-10-28 13:34:57 UTC (rev 29287)
+++ scummvm/trunk/engines/cruise/mouse.cpp 2007-10-28 13:37:06 UTC (rev 29288)
@@ -80,7 +80,7 @@
static const byte mouseCursorWalk[] = {
0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x01, 0xE0,
- 0x3F, 0xF0, 0x03, 0x38, 0x1B, 0xDC, 0x1B, 0xCC,
+ 0x03, 0xF0, 0x03, 0x38, 0x1B, 0xDC, 0x1B, 0xCC,
0x03, 0xCC, 0x03, 0x80, 0x07, 0x00, 0x0E, 0xC0,
0x1C, 0xE0, 0x18, 0x70, 0x18, 0x38, 0x18, 0x18,
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