[Scummvm-cvs-logs] SF.net SVN: scummvm: [25655] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Feb 17 16:57:50 CET 2007
Revision: 25655
http://scummvm.svn.sourceforge.net/scummvm/?rev=25655&view=rev
Author: peres001
Date: 2007-02-17 07:57:49 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
more conventional termination handling. Event loops are going to get merged soon, so there are FIXME remainders around there.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/dialogue.cpp
scummvm/trunk/engines/parallaction/parallaction.cpp
Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp 2007-02-17 15:37:49 UTC (rev 25654)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp 2007-02-17 15:57:49 UTC (rev 25655)
@@ -457,8 +457,10 @@
while (e.kbd.ascii != 0xD && passwordLen < MAX_PASSWORD_LENGTH) {
+ // FIXME: see comment for updateInput()
if (!g_system->pollEvent(e)) continue;
if (e.type != OSystem::EVENT_KEYDOWN) continue;
+ if (e.type != OSystem::EVENT_QUIT) g_system->quit();
if (!isdigit(e.kbd.ascii)) continue;
password[passwordLen] = e.kbd.ascii;
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2007-02-17 15:37:49 UTC (rev 25654)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2007-02-17 15:57:49 UTC (rev 25655)
@@ -316,9 +316,11 @@
initTable("global.tab", _globalTable);
}
+// FIXME: the engine has 3 event loops. The following routine hosts the main one,
+// and it's called from 8 different places in the code. There exist 2 more specialised
+// loops which could possibly be merged into this one with some effort in changing
+// caller code, i.e. adding condition checks.
//
-// broken input management
-//
uint16 Parallaction::updateInput() {
OSystem::Event e;
@@ -330,7 +332,6 @@
switch (e.type) {
case OSystem::EVENT_KEYDOWN:
- if (e.kbd.ascii == ' ') KeyDown = kEvQuitGame;
if (e.kbd.ascii == 'l') KeyDown = kEvLoadGame;
if (e.kbd.ascii == 's') KeyDown = kEvSaveGame;
break;
@@ -357,7 +358,7 @@
break;
case OSystem::EVENT_QUIT:
- _engineFlags |= kEngineQuit;
+ _system->quit();
break;
default:
@@ -371,21 +372,23 @@
}
-
+// FIXME: see comment for updateInput()
void waitUntilLeftClick() {
OSystem::Event e;
for (;;) {
g_system->pollEvent(e);
+
+ if (e.type == OSystem::EVENT_LBUTTONUP)
+ break;
+
+ if (e.type == OSystem::EVENT_QUIT) {
+ g_system->quit();
+ break;
+ }
+
g_system->delayMillis(10);
- if (e.type == OSystem::EVENT_LBUTTONUP)
- break;
-
- if (e.type == OSystem::EVENT_QUIT) {
- _engineFlags |= kEngineQuit;
- break;
- }
}
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