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

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Apr 22 18:17:14 CEST 2007


Revision: 26568
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26568&view=rev
Author:   sev
Date:     2007-04-22 09:17:14 -0700 (Sun, 22 Apr 2007)

Log Message:
-----------
Patch from bugreport #1678230: "AGI: Entering text while screen is shaking"

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

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2007-04-22 16:06:00 UTC (rev 26567)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2007-04-22 16:17:14 UTC (rev 26568)
@@ -1233,9 +1233,15 @@
 	if ((g_agi->getFeatures() & GF_AGIPAL) && p0 >= 101 && p0 < 110) {
 		g_gfx->setAGIPal(p0);
 		return;
-	} else
-		g_gfx->shakeStart();
+	} 
 
+	// Disables input while shaking to prevent bug
+	// #1678230: AGI: Entering text while screen is shaking
+	int originalValue = game.inputEnabled;
+	game.inputEnabled = 0;
+
+	g_gfx->shakeStart();
+
 	g_sprites->commitBoth();		/* Fixes SQ1 demo */
 	for (i = 4 * p0; i; i--) {
 		g_gfx->shakeScreen(i & 1);
@@ -1243,6 +1249,9 @@
 		g_agi->mainCycle();
 	}
 	g_gfx->shakeEnd();
+
+	//Sets input back to what it was
+	game.inputEnabled = originalValue;
 }
 
 static void (*agiCommand[183])(uint8 *) = {


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