[Scummvm-cvs-logs] CVS: scummvm/sky logic.cpp,1.34,1.35 logic.h,1.12,1.13 skydefs.h,1.13,1.14

Oliver Kiehl olki at users.sourceforge.net
Sun May 25 07:37:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv4385

Modified Files:
	logic.cpp logic.h skydefs.h 
Log Message:
add some stuff/cleanup


Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- logic.cpp	25 May 2003 11:45:04 -0000	1.34
+++ logic.cpp	25 May 2003 14:36:33 -0000	1.35
@@ -115,7 +115,7 @@
 		uint16 *scriptNo = (uint16 *)SkyCompact::getCompactElem(_compact, C_BASE_SUB + mode);
 		uint16 *offset   = (uint16 *)SkyCompact::getCompactElem(_compact, C_BASE_SUB + mode + 2);
 
-		uint32 scr = script(_compact, *scriptNo, *offset);
+		uint32 scr = script(*scriptNo, *offset);
 		*scriptNo = (uint16)(scr & 0xffff);
 		*offset   = (uint16)(scr >> 16);
 
@@ -231,7 +231,7 @@
 				return;
 			}
 
-			script(_compact, _compact->extCompact->miniBump, 0);
+			script(_compact->extCompact->miniBump, 0);
 			return;
 		}
 	}
@@ -579,6 +579,13 @@
 	}
 }
 
+void SkyLogic::runGetOff() {
+	uint32 getOff = _scriptVariables[GET_OFF];
+	_scriptVariables[GET_OFF] = 0;
+	if (getOff)
+		script((uint16)(getOff & 0xffff), (uint16)(getOff >> 16));
+}
+
 void SkyLogic::checkModuleLoaded(uint16 moduleNo) {
 	if (!_moduleList[moduleNo])
 		_moduleList[moduleNo] = (uint16 *)_skyDisk->loadFile((uint16)moduleNo + F_MODULE_0, NULL);
@@ -880,7 +887,7 @@
 	memcpy(_scriptVariables + 505, forwardList5b, sizeof(forwardList5b));
 }
 
-uint32 SkyLogic::script(Compact *compact, uint16 scriptNo, uint16 offset) {
+uint32 SkyLogic::script(uint16 scriptNo, uint16 offset) {
 script:
 	// process a script
 	// low level interface to interpreter
@@ -1035,13 +1042,13 @@
 		case 15: // push_offset
 			// Push a compact access
 			s = READ_LE_UINT16(scriptData++);
-			tmp = (uint16 *)SkyCompact::getCompactElem(compact, s);
+			tmp = (uint16 *)SkyCompact::getCompactElem(_compact, s);
 			push(*tmp);
 			break;
 		case 16: // pop_offset
 			// pop a value into a compact
 			s = READ_LE_UINT16(scriptData++);
-			tmp = (uint16 *)SkyCompact::getCompactElem(compact, s);
+			tmp = (uint16 *)SkyCompact::getCompactElem(_compact, s);
 			*tmp = (uint16)pop();
 			break;
 		case 17: // is_equal
@@ -1252,7 +1259,11 @@
 }
 
 uint32 SkyLogic::fnNoHuman(uint32 a, uint32 b, uint32 c) {
-	warning("Stub: fnNoHuman");
+	if (!_scriptVariables[MOUSE_STOP]) {
+		_scriptVariables[MOUSE_STOP] &= 1;
+		runGetOff();
+		fnBlankMouse(a, b, c);
+	}
 	return 1;
 }
 
@@ -1270,7 +1281,7 @@
 }
 
 uint32 SkyLogic::fnSetStop(uint32 a, uint32 b, uint32 c) {
-	warning("Stub: fnSetStop");
+	_scriptVariables[MOUSE_STOP] |= 1;
 	return 1;
 }
 

Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- logic.h	16 May 2003 15:33:18 -0000	1.12
+++ logic.h	25 May 2003 14:36:33 -0000	1.13
@@ -175,10 +175,11 @@
 	void push(uint32);
 	uint32 pop();
 	void checkModuleLoaded(uint16 moduleNo);
-	uint32 script(Compact *compact, uint16 scriptNo, uint16 offset);
+	uint32 script(uint16 scriptNo, uint16 offset);
 	bool collide(Compact *cpt);
 	void initScriptVariables();
 	void mainAnim();
+	void runGetOff();
 
 	uint16 *_moduleList[16];
 	uint32 _stack[20];

Index: skydefs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/skydefs.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- skydefs.h	24 May 2003 23:17:12 -0000	1.13
+++ skydefs.h	25 May 2003 14:36:33 -0000	1.14
@@ -42,6 +42,7 @@
 #define CUR_ID 12
 #define MOUSE_STATUS 13
 #define MOUSE_STOP 14
+#define GET_OFF	18
 #define HIT_ID 37
 #define THE_CHOSEN_ONE 51
 #define TEXT1 53





More information about the Scummvm-git-logs mailing list