[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.275,2.276 verbs.cpp,1.62,1.63 script.cpp,1.119,1.120

Max Horn fingolfin at users.sourceforge.net
Sat Jul 12 14:29:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv9179

Modified Files:
	scummvm.cpp verbs.cpp script.cpp 
Log Message:
run script 5 in startScene (room transition script, it seems); don't invoke runInputScript(4) - it is not needed (runInputScript will be called by checkExecVerbs), and causes the buggy 'What is' command behavior); fixed V2 sentence line

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.275
retrieving revision 2.276
diff -u -d -r2.275 -r2.276
--- scummvm.cpp	12 Jul 2003 12:16:16 -0000	2.275
+++ scummvm.cpp	12 Jul 2003 21:28:04 -0000	2.276
@@ -1383,6 +1383,8 @@
 
 	_egoPositioned = false;
 	runEntryScript();
+	if (_version <= 2)
+		runScript(5, 0, 0, 0);
 
 	if (_version < 7) {
 		if (a && !_egoPositioned) {
@@ -2086,7 +2088,6 @@
 
 		if (_lastKeyHit) {		// Key Input
 			VAR(VAR_KEYPRESS) = _lastKeyHit;
-			runInputScript(4, 0, 0);
 		}
 	}
 

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- verbs.cpp	12 Jul 2003 12:16:17 -0000	1.62
+++ verbs.cpp	12 Jul 2003 21:28:04 -0000	1.63
@@ -273,33 +273,32 @@
 		for (i = 1; i < _maxVerbs; i++, vs++) {
 			if (vs->verbid && vs->saveid == 0 && vs->curmode == 1) {
 				if (_mouseButStat == vs->key) {
+					// Trigger verb as if the user clicked it
 					runInputScript(1, vs->verbid, 1);
 					return;
 				}
 			}
 		}
+		// Generic keyboard input
 		runInputScript(4, _mouseButStat, 1);
 	} else if (_mouseButStat & MBS_MOUSE_MASK) {
 		VirtScreen *zone = findVirtScreen(_mouse.y);
 		byte code = _mouseButStat & MBS_LEFT_CLICK ? 1 : 2;
-		if (zone->number == 0) {
-			over = checkMouseOver(_mouse.x, _mouse.y);
-			if (over != 0) {
-				runInputScript(1, _verbs[over].verbid, code);
-				return;
-			}
-			runInputScript(2, 0, code);
+		if (_version <= 2 && zone->number == 2 && _mouse.y <= zone->topline + 8) {
+			// Click into V2 sentence line
+			runInputScript(5, 0, 0);
 		} else if (_version <= 2 && zone->number == 2 && _mouse.y > zone->topline + 32) {
+			// Click into V2 inventory
 			checkV2Inventory(_mouse.x, _mouse.y);
 		} else {
 			over = checkMouseOver(_mouse.x, _mouse.y);
-
-			// FIXME For the future: Indy3 and under inv scrolling
-			/*
-			   if (over >= 31 && over <= 36) 
-			   over += _inventoryOffset;
-			 */
-			runInputScript(1, over != 0 ? _verbs[over].verbid : 0, code);
+			if (over != 0) {
+				// Verb was clicked
+				runInputScript(1, _verbs[over].verbid, code);
+			} else {
+				// Scene was clicked
+				runInputScript((zone->number == 0) ? 2 : 1, 0, code);
+			}
 		}
 	}
 }

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- script.cpp	4 Jul 2003 12:34:09 -0000	1.119
+++ script.cpp	12 Jul 2003 21:28:04 -0000	1.120
@@ -865,7 +865,7 @@
 
 void Scumm::checkAndRunSentenceScript() {
 	int i;
-	ScriptSlot *ss;
+	const ScriptSlot *ss;
 	int sentenceScript;
 	if (_version <= 2)
 		sentenceScript = 2;





More information about the Scummvm-git-logs mailing list