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

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Jun 6 19:40:09 CEST 2009


Revision: 41241
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41241&view=rev
Author:   sev
Date:     2009-06-06 17:40:09 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
Fix implementation of prevent.input. This fixes SQ2 intro

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

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2009-06-06 17:39:42 UTC (rev 41240)
+++ scummvm/trunk/engines/agi/agi.h	2009-06-06 17:40:09 UTC (rev 41241)
@@ -979,6 +979,7 @@
 	char *agiSprintf(const char *);
 	void writeStatus(void);
 	void writePrompt(void);
+	void clearPrompt(void);
 	void clearLines(int, int, int);
 	void flushLines(int, int);
 	bool predictiveDialog(void);

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2009-06-06 17:39:42 UTC (rev 41240)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2009-06-06 17:40:09 UTC (rev 41241)
@@ -1312,6 +1312,8 @@
 
 	g_agi->newInputMode(INPUT_NONE);
 	game.inputEnabled = false;
+
+	g_agi->clearPrompt();
 }
 
 cmd(get_string) {

Modified: scummvm/trunk/engines/agi/text.cpp
===================================================================
--- scummvm/trunk/engines/agi/text.cpp	2009-06-06 17:39:42 UTC (rev 41240)
+++ scummvm/trunk/engines/agi/text.cpp	2009-06-06 17:40:09 UTC (rev 41241)
@@ -656,8 +656,11 @@
 	int l, fg, bg, pos;
 	int promptLength = strlen(agiSprintf(_game.strings[0]));
 
-	if (!_game.inputEnabled || _game.inputMode != INPUT_NORMAL)
+	if (!_game.inputEnabled || _game.inputMode != INPUT_NORMAL) {
+		clearPrompt();
+
 		return;
+	}
 
 	l = _game.lineUserInput;
 	fg = _game.colorFg;
@@ -676,6 +679,16 @@
 	_gfx->doUpdate();
 }
 
+void AgiEngine::clearPrompt() {
+	int l;
+
+	l = _game.lineUserInput;
+	clearLines(l, l, _game.colorBg);
+	flushLines(l, l);
+
+	_gfx->doUpdate();
+}
+
 /**
  * Clear text lines in the screen.
  * @param l1  start line


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