[Scummvm-cvs-logs] SF.net SVN: scummvm: [21014] scummvm/trunk/engines/cine
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Thu Mar 2 12:09:03 CET 2006
Revision: 21014
Author: cyx
Date: 2006-03-02 12:08:41 -0800 (Thu, 02 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=21014&view=rev
Log Message:
-----------
fixed compilation.
Modified Paths:
--------------
scummvm/trunk/engines/cine/cine.cpp
scummvm/trunk/engines/cine/main_loop.cpp
scummvm/trunk/engines/cine/various.cpp
scummvm/trunk/engines/cine/various.h
Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp 2006-03-02 18:25:56 UTC (rev 21013)
+++ scummvm/trunk/engines/cine/cine.cpp 2006-03-02 20:08:41 UTC (rev 21014)
@@ -215,7 +215,10 @@
globalVars[i] = 0;
}
- globalVars[255] = 1;
+ // bypass protection
+ if (gameType == GID_OS) {
+ globalVars[255] = 1;
+ }
for (i = 0; i < NUM_MAX_SCRIPT; i++) {
scriptTable[i].ptr = NULL;
Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp 2006-03-02 18:25:56 UTC (rev 21013)
+++ scummvm/trunk/engines/cine/main_loop.cpp 2006-03-02 20:08:41 UTC (rev 21014)
@@ -89,7 +89,7 @@
uint16 var_6;
uint16 quitFlag;
uint16 i;
- char *di;
+ uint8 di;
uint16 mouseButton;
closeEngine3();
@@ -120,7 +120,7 @@
fadeRequired = 0;
isDrawCommandEnabled = 0;
waitForPlayerClick = 0;
- var16 = 0;
+ menuCommandLen = 0;
playerCommand = -1;
strcpy(commandBuffer, "");
@@ -146,9 +146,7 @@
do {
mainLoopSub3();
-This is bad code. executePlayerInput returns an uint16, and we cast it to a char
-pointer. Yeah, right...
- di = (char *)executePlayerInput();
+ di = executePlayerInput();
if (var18 != 0) {
if (var18 >= 100 || var19) {
@@ -219,8 +217,13 @@
}
if (di) {
- if (!strcmp(di, "quit")) {
- quitFlag = 1;
+ if ("quit"[menuCommandLen] == (char)di) {
+ ++menuCommandLen;
+ if (menuCommandLen == 4) {
+ quitFlag = 1;
+ }
+ } else {
+ menuCommandLen = 0;
}
}
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2006-03-02 18:25:56 UTC (rev 21013)
+++ scummvm/trunk/engines/cine/various.cpp 2006-03-02 20:08:41 UTC (rev 21014)
@@ -94,7 +94,7 @@
uint16 fadeRequired;
uint16 isDrawCommandEnabled;
uint16 waitForPlayerClick;
-uint16 var16;
+uint16 menuCommandLen;
uint16 var17;
uint16 var18;
uint16 var19;
Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h 2006-03-02 18:25:56 UTC (rev 21013)
+++ scummvm/trunk/engines/cine/various.h 2006-03-02 20:08:41 UTC (rev 21014)
@@ -105,7 +105,7 @@
extern uint16 fadeRequired;
extern uint16 isDrawCommandEnabled;
extern uint16 waitForPlayerClick;
-extern uint16 var16;
+extern uint16 menuCommandLen;
extern uint16 var17;
extern uint16 var18;
extern uint16 var19;
More information about the Scummvm-git-logs
mailing list