[Scummvm-cvs-logs] CVS: scummvm/simon debug.cpp,1.49,1.50 debug.h,1.24,1.25 intern.h,1.50,1.51 items.cpp,1.140,1.141 simon.cpp,1.548,1.549 simon.h,1.169,1.170

kirben kirben at users.sourceforge.net
Fri Nov 18 14:35:03 CET 2005


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11994/simon

Modified Files:
	debug.cpp debug.h intern.h items.cpp simon.cpp simon.h 
Log Message:

Cleanup.


Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/debug.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- debug.cpp	12 Nov 2005 06:01:24 -0000	1.49
+++ debug.cpp	18 Nov 2005 22:34:41 -0000	1.50
@@ -141,7 +141,7 @@
 
 	p = (byte *)sl + SUBROUTINE_LINE_SMALL_SIZE;
 	if (sub->id == 0) {
-		fprintf(_dumpFile, "; cond_a=%d, cond_b=%d, cond_c=%d\n", sl->cond_a, sl->cond_b, sl->cond_c);
+		fprintf(_dumpFile, "; verb=%d, noun1=%d, noun2=%d\n", sl->verb, sl->noun1, sl->noun2);
 		p = (byte *)sl + SUBROUTINE_LINE_BIG_SIZE;
 	}
 

Index: debug.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/debug.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- debug.h	13 Nov 2005 07:04:56 -0000	1.24
+++ debug.h	18 Nov 2005 22:34:41 -0000	1.25
@@ -186,7 +186,7 @@
 	/* 128 */
 	"W|GET_DUMMY_WORD",
 	"W|GET_WORD_COND_TRUE",
-	"Bww|UNK_130",
+	"Bww|SET_ADJ_NOUN",
 	NULL,
 	/* 132 */
 	"|SAVE_GAME",
@@ -249,8 +249,8 @@
 	"WWBB|PATHFIND",
 	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	"|LOAD_BEARD",
 	"|UNLOAD_BEARD",
 	/* 184 */
@@ -424,7 +424,7 @@
 	/* 128 */
 	"W|GET_DUMMY_WORD",
 	"W|GET_WORD_COND_TRUE",
-	"Bww|UNK_130",
+	"Bww|SET_ADJ_NOUN",
 	NULL,
 	/* 132 */
 	"|SAVE_GAME",
@@ -487,8 +487,8 @@
 	"WWBB|PATHFIND",
 	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	"|LOAD_BEARD",
 	"|UNLOAD_BEARD",
 	/* 184 */
@@ -662,7 +662,7 @@
 	/* 128 */
 	"W|GET_DUMMY_WORD",
 	"W|GET_WORD_COND_TRUE",
-	"Bww|UNK_130",
+	"Bww|SET_ADJ_NOUN",
 	NULL,
 	/* 132 */
 	"|SAVE_GAME",
@@ -725,8 +725,8 @@
 	"WWBB|PATHFIND",
 	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	NULL,
 	NULL,
 	/* 184 */
@@ -904,7 +904,7 @@
 	/* 128 */
 	"W|GET_DUMMY_WORD",
 	"W|GET_WORD_COND_TRUE",
-	"Bww|UNK_130",
+	"Bww|SET_ADJ_NOUN",
 	NULL,
 	/* 132 */
 	"|SAVE_GAME",
@@ -967,8 +967,8 @@
 	"WWBB|PATHFIND",
 	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	NULL,
 	NULL,
 	/* 184 */
@@ -1146,7 +1146,7 @@
 	/* 128 */
 	"W|GET_DUMMY_WORD",
 	"W|GET_WORD_COND_TRUE",
-	"Bww|UNK_130",
+	"Bww|SET_ADJ_NOUN",
 	NULL,
 	/* 132 */
 	"|SAVE_GAME",
@@ -1209,8 +1209,8 @@
 	"WWBB|PATHFIND",
 	"BBB|ROOM_DESCRIPTION",
 	/* 180 */
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	"T|LOAD_VIDEO",
 	"|PLAY_VIDEO",
 	/* 184 */
@@ -1278,8 +1278,8 @@
 	"d|SET_PALETTE_MODE",
 	/* 32 */
 	"vv|COPY_VAR",
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	"dd|VC35",
 	/* 36 */
 	"dd|SAVELOAD_THING",
@@ -1361,8 +1361,8 @@
 	"d|SET_PALETTE_MODE",
 	/* 32 */
 	"vv|COPY_VAR",
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	"dd|VC35",
 	/* 36 */
 	"dd|SAVELOAD_THING",
@@ -1458,8 +1458,8 @@
 	"d|SET_PALETTE_MODE",
 	/* 32 */
 	"vv|COPY_VAR",
-	"|FORCE_UNLOCK",
-	"|FORCE_LOCK",
+	"|MOUSE_ON",
+	"|MOUSE_OFF",
 	"dd|VC35",
 	/* 36 */
 	"dd|SAVELOAD_THING",
@@ -1514,12 +1514,12 @@
 	/* 76 */
 	"ddd|SETSCALEXOFFS",
 	"ddd|SETSCALEYOFFS",
-	"|PATHUNK1",
-	"|PATHUNK1",
+	"|COMPUTEXY",
+	"|COMPUTEPOSNUM",
 	/* 80 */
 	"ddd|SETOVERLAYIMAGE",
 	"dd|SETRANDOM",
-	"d|PATHUNK3",
+	"d|GETPATHVALUE",
 	"ddd|PLAYSOUNDLOOP",
 	"|STOPSOUNDLOOP",
 };

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/intern.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- intern.h	18 Nov 2005 00:59:47 -0000	1.50
+++ intern.h	18 Nov 2005 22:34:41 -0000	1.51
@@ -106,9 +106,9 @@
 
 struct SubroutineLine {
 	uint16 next;
-	int16 cond_a;
-	int16 cond_b;
-	int16 cond_c;
+	int16 verb;
+	int16 noun1;
+	int16 noun2;
 };
 
 struct TimeEvent {

Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- items.cpp	18 Nov 2005 14:15:03 -0000	1.140
+++ items.cpp	18 Nov 2005 22:34:41 -0000	1.141
@@ -722,13 +722,15 @@
 			}
 			break;
 
-		case 130:{									/* set script cond */
+		case 130:{									/* set adj noun */
 				uint var = getVarOrByte();
-				getNextWord();
-				if (var == 1)
-					_scriptCondB = getNextWord();
-				else
-					_scriptCondC = getNextWord();
+				if (var == 1) {
+					_scriptAdj1 = getNextWord();
+					_scriptNoun1 = getNextWord();
+				} else {
+					_scriptAdj2 = getNextWord();
+					_scriptNoun2 = getNextWord();
+				}
 			}
 			break;
 
@@ -997,12 +999,12 @@
 			break;
 
 		case 180:{									/* force unlock */
-				o_force_unlock();
+				o_mouseOn();
 			}
 			break;
 
 		case 181:{									/* force lock */
-				o_force_lock();
+				o_mouseOff();
 				if (getGameType() == GType_SIMON2) {
 					changeWindow(1);
 					showMessageFormat("\xC");
@@ -1232,16 +1234,16 @@
 	if (sub->id)
 		return true;
 
-	if (sl->cond_a != -1 && sl->cond_a != _scriptCondA &&
-			(sl->cond_a != -2 || _scriptCondA != -1))
+	if (sl->verb != -1 && sl->verb != _scriptVerb &&
+			(sl->verb != -2 || _scriptVerb != -1))
 		return false;
 
-	if (sl->cond_b != -1 && sl->cond_b != _scriptCondB &&
-			(sl->cond_b != -2 || _scriptCondB != -1))
+	if (sl->noun1 != -1 && sl->noun1 != _scriptNoun1 &&
+			(sl->noun1 != -2 || _scriptNoun1 != -1))
 		return false;
 
-	if (sl->cond_c != -1 && sl->cond_c != _scriptCondC &&
-			(sl->cond_c != -2 || _scriptCondC != -1))
+	if (sl->noun2 != -1 && sl->noun2 != _scriptNoun2 &&
+			(sl->noun2 != -2 || _scriptNoun2 != -1))
 		return false;
 
 	return true;

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.548
retrieving revision 1.549
diff -u -d -r1.548 -r1.549
--- simon.cpp	18 Nov 2005 14:15:03 -0000	1.548
+++ simon.cpp	18 Nov 2005 22:34:41 -0000	1.549
@@ -352,9 +352,11 @@
 	_scrollImage = 0;
 	_vgaVar8 = 0;
 
-	_scriptCondA = 0;
-	_scriptCondB = 0;
-	_scriptCondC = 0;
+	_scriptVerb = 0;
+	_scriptNoun1 = 0;
+	_scriptNoun2 = 0;
+	_scriptAdj1 = 0;
+	_scriptAdj2 = 0;
 
 	_curWindow = 0;
 	_textWindow = 0;
@@ -880,9 +882,9 @@
 	int size;
 
 	if (sub->id == 0) {
-		sl->cond_a = in->readUint16BE();
-		sl->cond_b = in->readUint16BE();
-		sl->cond_c = in->readUint16BE();
+		sl->verb = in->readUint16BE();
+		sl->noun1 = in->readUint16BE();
+		sl->noun2 = in->readUint16BE();
 	}
 
 	while ((*q = in->readByte()) != 0xFF) {
@@ -1557,7 +1559,7 @@
 void SimonEngine::invokeTimeEvent(TimeEvent *te) {
 	Subroutine *sub;
 
-	_scriptCondA = 0;
+	_scriptVerb = 0;
 	if (_runScriptReturn1)
 		return;
 	sub = getSubroutineByID(te->subroutine_id);
@@ -1579,9 +1581,11 @@
 		_objectItem = derefItem(getItem1Ptr()->parent);
 
 	if (_objectItem != NULL) {
-		_scriptCondC = _objectItem->noun;
+		_scriptNoun2 = _objectItem->noun;
+		_scriptAdj2 = _objectItem->adjective;
 	} else {
-		_scriptCondC = -1;
+		_scriptNoun2 = -1;
+		_scriptAdj2 = -1;
 	}
 }
 
@@ -2194,18 +2198,22 @@
 	}
 
 	if (_subjectItem) {
-		_scriptCondB = _subjectItem->noun;
+		_scriptNoun1 = _subjectItem->noun;
+		_scriptAdj1 = _subjectItem->adjective;
 	} else {
-		_scriptCondB = -1;
+		_scriptNoun1 = -1;
+		_scriptAdj1 = -1;
 	}
 
 	if (_objectItem) {
-		_scriptCondC = _objectItem->noun;
+		_scriptNoun2 = _objectItem->noun;
+		_scriptAdj2 = _objectItem->adjective;
 	} else {
-		_scriptCondC = -1;
+		_scriptNoun2 = -1;
+		_scriptAdj2 = -1;
 	}
 
-	_scriptCondA = _verbHitArea;
+	_scriptVerb = _verbHitArea;
 
 	sub = getSubroutineByID(0);
 	if (sub == NULL)
@@ -2221,7 +2229,7 @@
 	if (sub)
 		startSubroutine(sub);
 
-	if (getGameType() == GType_SIMON2)
+	if (getGameType() == GType_SIMON2 || getGameType() == GType_FF)
 		_runScriptReturn1 = false;
 
 	startUp_helper_2();
@@ -2661,13 +2669,13 @@
 	_lockWord &= ~1;
 }
 
-void SimonEngine::o_force_unlock() {
+void SimonEngine::o_mouseOn() {
 	if (getGameType() == GType_SIMON2 && _bitArray[4] & 0x8000)
 		_mouseCursor = 0;
 	_lockCounter = 0;
 }
 
-void SimonEngine::o_force_lock() {
+void SimonEngine::o_mouseOff() {
 	_lockWord |= 0x8000;
 	vc34_setMouseOff();
 	_lockWord &= ~0x8000;

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -d -r1.169 -r1.170
--- simon.h	18 Nov 2005 14:16:28 -0000	1.169
+++ simon.h	18 Nov 2005 22:34:41 -0000	1.170
@@ -264,7 +264,8 @@
 	const byte *_scrollImage;
 	byte _vgaVar8;
 
-	int16 _scriptCondA, _scriptCondB, _scriptCondC;
+	int16 _scriptVerb, _scriptNoun1, _scriptNoun2;
+	int16 _scriptAdj1, _scriptAdj2;
 
 	uint16 _curWindow;
 	FillOrCopyStruct *_textWindow;
@@ -566,8 +567,8 @@
 	void o_lockZone();
 	void o_unlockZone();
 	void o_pathfind(int x, int y, uint var_1, uint var_2);
-	void o_force_unlock();
-	void o_force_lock();
+	void o_mouseOn();
+	void o_mouseOff();
 	void o_loadBeard();
 	void o_unloadBeard();
 	void o_clear_vgapointer_entry(uint a);





More information about the Scummvm-git-logs mailing list