From e808cdf7a08d641389ecc81063b3b1016c7bc8cf Mon Sep 17 00:00:00 2001 From: Christopher Page Date: Wed, 9 Jul 2008 02:27:05 +0000 Subject: Reimplemented pushEvent() and artificialEventQueue to work with Events instead of EventTypes. Reimplemented Queue as a List instead of Array. Updated AGOS, AGI, CINE, GOB, and KYRA to work with the current implementation of the GMM svn-id: r32971 --- engines/agos/script.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/agos/script.cpp') diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index da47d61891..69a1944605 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -411,7 +411,7 @@ void AGOSEngine::o_msg() { void AGOSEngine::o_end() { // 68: exit interpreter - _eventMan->pushEvent(Common::EVENT_QUIT); + quitGame(); } void AGOSEngine::o_done() { @@ -966,7 +966,7 @@ void AGOSEngine::writeVariable(uint16 variable, uint16 contents) { int AGOSEngine::runScript() { bool flag; - if (_eventMan->shouldQuit()) + if (quit()) return 1; do { @@ -1011,7 +1011,7 @@ int AGOSEngine::runScript() { error("Invalid opcode '%d' encountered", _opcode); executeOpcode(_opcode); - } while (getScriptCondition() != flag && !getScriptReturn() && !_eventMan->shouldQuit()); + } while (getScriptCondition() != flag && !getScriptReturn() && !quit()); return getScriptReturn(); } @@ -1067,7 +1067,7 @@ void AGOSEngine::waitForSync(uint a) { _exitCutscene = false; _rightButtonDown = false; - while (_vgaWaitFor != 0 && !_eventMan->shouldQuit()) { + while (_vgaWaitFor != 0 && !quit()) { if (_rightButtonDown) { if (_vgaWaitFor == 200 && (getGameType() == GType_FF || !getBitFlag(14))) { skipSpeech(); -- cgit v1.2.3