[Scummvm-cvs-logs] SF.net SVN: scummvm:[35761] scummvm/trunk/engines/agi
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Jan 7 00:29:58 CET 2009
Revision: 35761
http://scummvm.svn.sourceforge.net/scummvm/?rev=35761&view=rev
Author: eriktorbjorn
Date: 2009-01-06 23:29:58 +0000 (Tue, 06 Jan 2009)
Log Message:
-----------
Added a few more shouldQuit() checks. It's now possible to quit while, for
instance, Leisure Suit Larry is waiting for you to enter your age.
Modified Paths:
--------------
scummvm/trunk/engines/agi/keyboard.cpp
scummvm/trunk/engines/agi/op_cmd.cpp
Modified: scummvm/trunk/engines/agi/keyboard.cpp
===================================================================
--- scummvm/trunk/engines/agi/keyboard.cpp 2009-01-06 17:49:41 UTC (rev 35760)
+++ scummvm/trunk/engines/agi/keyboard.cpp 2009-01-06 23:29:58 UTC (rev 35761)
@@ -365,7 +365,7 @@
}
int AgiEngine::waitKey() {
- int key;
+ int key = 0;
/* clear key queue */
while (_gfx->keypress()) {
@@ -373,7 +373,7 @@
}
debugC(3, kDebugLevelInput, "waiting...");
- for (;;) {
+ while (!shouldQuit()) {
_gfx->pollTimer(); /* msdos driver -> does nothing */
key = doPollKeyboard();
if (key == KEY_ENTER || key == KEY_ESCAPE || key == BUTTON_LEFT)
@@ -388,7 +388,7 @@
}
int AgiEngine::waitAnyKey() {
- int key;
+ int key = 0;
/* clear key queue */
while (_gfx->keypress()) {
@@ -396,7 +396,7 @@
}
debugC(3, kDebugLevelInput, "waiting...");
- for (;;) {
+ while (!shouldQuit()) {
_gfx->pollTimer(); /* msdos driver -> does nothing */
key = doPollKeyboard();
if (key)
Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp 2009-01-06 17:49:41 UTC (rev 35760)
+++ scummvm/trunk/engines/agi/op_cmd.cpp 2009-01-06 23:29:58 UTC (rev 35761)
@@ -1331,7 +1331,7 @@
do {
g_agi->mainCycle();
- } while (game.inputMode == INPUT_GETSTRING);
+ } while (game.inputMode == INPUT_GETSTRING && !g_agi->shouldQuit());
}
cmd(get_num) {
@@ -1349,7 +1349,7 @@
do {
g_agi->mainCycle();
- } while (game.inputMode == INPUT_GETSTRING);
+ } while (game.inputMode == INPUT_GETSTRING && !g_agi->shouldQuit());
_v[p1] = atoi(game.strings[MAX_STRINGS]);
debugC(4, kDebugLevelScripts, "[%s] -> %d", game.strings[MAX_STRINGS], _v[p1]);
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