[Scummvm-cvs-logs] SF.net SVN: scummvm: [31462] scummvm/trunk/engines/agi

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Apr 10 10:27:11 CEST 2008


Revision: 31462
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31462&view=rev
Author:   thebluegr
Date:     2008-04-10 01:27:09 -0700 (Thu, 10 Apr 2008)

Log Message:
-----------
Allow the predictive dialog to be shown when ego cannot be moved (i.e. when _game.playerControl is 0), since in those cases it is possible to enter text in the input area. Should fix bugs #1935844 - "PQ1: Predictive Text does not load" and #1936374 - "LSL1: No predictive input at age verification page"

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.cpp
    scummvm/trunk/engines/agi/keyboard.cpp

Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2008-04-09 23:38:11 UTC (rev 31461)
+++ scummvm/trunk/engines/agi/agi.cpp	2008-04-10 08:27:09 UTC (rev 31462)
@@ -69,7 +69,7 @@
 		case Common::EVENT_PREDICTIVE_DIALOG:
 			if (_predictiveDialogRunning)
 				break;
-			if (_game.playerControl && predictiveDialog()) {
+			if (predictiveDialog()) {
 				if (_game.inputMode == INPUT_NORMAL) {
 					strcpy((char *)_game.inputBuffer, _predictiveResult);
 					handleKeys(KEY_ENTER);

Modified: scummvm/trunk/engines/agi/keyboard.cpp
===================================================================
--- scummvm/trunk/engines/agi/keyboard.cpp	2008-04-09 23:38:11 UTC (rev 31461)
+++ scummvm/trunk/engines/agi/keyboard.cpp	2008-04-10 08:27:09 UTC (rev 31462)
@@ -135,6 +135,17 @@
 		}
 	}
 
+	// Show predictive dialog if the user clicks on input area
+	if (key == BUTTON_LEFT &&
+			(int)g_mouse.y >= _game.lineUserInput * CHAR_LINES &&
+			(int)g_mouse.y <= (_game.lineUserInput + 1) * CHAR_LINES) {
+		if (predictiveDialog()) {
+			strcpy((char *)_game.inputBuffer, _predictiveResult);
+			handleKeys(KEY_ENTER);
+		}
+		return true;
+	}
+
 	if (_game.playerControl) {
 		int d = 0;
 
@@ -167,16 +178,6 @@
 			}
 		}
 
-		if (key == BUTTON_LEFT &&
-				(int)g_mouse.y >= _game.lineUserInput * CHAR_LINES &&
-				(int)g_mouse.y <= (_game.lineUserInput + 1) * CHAR_LINES) {
-			if (predictiveDialog()) {
-				strcpy((char *)_game.inputBuffer, _predictiveResult);
-				handleKeys(KEY_ENTER);
-			}
-			return true;
-		}
-
 		if (!(getFeatures() & GF_AGIMOUSE)) {
 			/* Handle mouse button events */
 			if (key == BUTTON_LEFT) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list