[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.248,2.249

Max Horn fingolfin at users.sourceforge.net
Fri Jun 20 18:46:05 CEST 2003


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

Modified Files:
	scummvm.cpp 
Log Message:
support F-keys in V2 games

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.248
retrieving revision 2.249
diff -u -d -r2.248 -r2.249
--- scummvm.cpp	19 Jun 2003 12:29:13 -0000	2.248
+++ scummvm.cpp	21 Jun 2003 01:45:38 -0000	2.249
@@ -1809,6 +1809,10 @@
 int Scumm::checkKeyHit() {
 	int a = _keyPressed;
 	_keyPressed = 0;
+	if (_version <= 2 && 315 <= a && a < 315+12) {
+		// Convert F-Keys
+		a -= 314;
+	}
 	return a;
 }
 
@@ -1921,8 +1925,10 @@
 	int saveloadkey;
 	getKeyInput();
 
-	if ((_features & GF_OLD256) || (_gameId == GID_CMI) || (_features & GF_OLD_BUNDLE)) /* FIXME: Support ingame screen */
-		saveloadkey = 319;
+	if (_version <= 2)
+		saveloadkey = 5;	// F5
+	else if ((_features & GF_OLD256) || (_gameId == GID_CMI)) /* FIXME: Support ingame screen ? */
+		saveloadkey = 319;	// F5
 	else
 		saveloadkey = VAR(VAR_SAVELOADDIALOG_KEY);
 
@@ -2015,6 +2021,16 @@
 		VAR(VAR_CHARINC) = _defaultTalkDelay / 20;
 	} else if (_lastKeyHit == '~' || _lastKeyHit == '#') { // Debug console
 		g_debugger->attach(this, NULL);
+	} else if (_version <= 2) {
+		// Store the input type. So far we can't distinguish
+		// between 1, 3 and 5.
+		// 1) Verb	2) Scene	3) Inv.		4) Key
+		// 5) Sentence Bar
+
+		if (_lastKeyHit) {		// Key Input
+			VAR(VAR_KEYPRESS) = _lastKeyHit;
+			runInputScript(4, 0, 0);
+		}
 	}
 
 	_mouseButStat = _lastKeyHit;
@@ -2065,16 +2081,6 @@
 	} else if (_version == 7) {
 		VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0;
 		VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0;
-	} else if (_version <= 2) {
-		// Store the input type. So far we can't distinguish
-		// between 1, 3 and 5.
-		// 1) Verb	2) Scene	3) Inv.		4) Key
-		// 5) Sentence Bar
-
-		if (_lastKeyHit) {		// Key Input
-			VAR(VAR_KEYPRESS) = _lastKeyHit;
-			runInputScript(4, 0, 0);
-		}
 	}
 
 	_leftBtnPressed &= ~msClicked;





More information about the Scummvm-git-logs mailing list