[Scummvm-cvs-logs] SF.net SVN: scummvm:[47512] scummvm/trunk/engines/cine/various.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Sun Jan 24 19:58:58 CET 2010


Revision: 47512
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47512&view=rev
Author:   buddha_
Date:     2010-01-24 18:58:57 +0000 (Sun, 24 Jan 2010)

Log Message:
-----------
Cine: executePlayerInput: Implement 'A player command is given, left mouse button is down, right mouse button is up'-case for Operation Stealth.

 - Also changed a do-while -loop into a
   while-loop as it should be for both
   FW and OS according to disassembly.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/various.cpp

Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp	2010-01-24 18:57:23 UTC (rev 47511)
+++ scummvm/trunk/engines/cine/various.cpp	2010-01-24 18:58:57 UTC (rev 47512)
@@ -885,13 +885,12 @@
 				if (!(mouseButton & kRightMouseButton)) { // Right mouse button is up
 					// A player command is given, left mouse button is down, right mouse button is up
 					int16 si;
-					do {
+					while (mouseButton && !g_cine->shouldQuit()) {
 						manageEvents();
 						getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16);
-					} while (mouseButton && !g_cine->shouldQuit());
+					}
 
-					si = getObjectUnderCursor(mouseX,
-					    mouseY);
+					si = getObjectUnderCursor(mouseX, mouseY);
 
 					if (si != -1) {
 						commandVar3[commandVar1] = si;
@@ -900,7 +899,6 @@
 						commandBuffer += " ";
 						commandBuffer += objectTable[si].name;
 
-
 						isDrawCommandEnabled = 1;
 
 						if (choiceResultTable[playerCommand] == commandVar1) {
@@ -922,11 +920,27 @@
 
 							commandVar1 = 0;
 							commandBuffer = "";
-							renderer->setCommand(commandBuffer);
+						} else if (g_cine->getGameType() == Cine::GType_OS) {
+							isDrawCommandEnabled = 1;
+							commandBuffer += commandPrepositionTable[playerCommand];
 						}
+
+						renderer->setCommand(commandBuffer);
 					} else {
 						globalVars[VAR_MOUSE_X_POS] = mouseX;
+						if (!mouseX) {
+							globalVars[VAR_MOUSE_X_POS]++;
+						}
+
 						globalVars[VAR_MOUSE_Y_POS] = mouseY;
+
+						if (g_cine->getGameType() == Cine::GType_OS) {
+							if (!mouseY) {
+								globalVars[VAR_MOUSE_Y_POS]++;
+							}
+							globalVars[VAR_MOUSE_X_POS_2ND] = globalVars[VAR_MOUSE_X_POS];
+							globalVars[VAR_MOUSE_Y_POS_2ND] = globalVars[VAR_MOUSE_X_POS];
+						}
 					}
 				}
 			} else if (!(mouseButton & kRightMouseButton)) { // Right mouse button is up


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