diff options
author | Christopher Page | 2008-07-07 23:24:12 +0000 |
---|---|---|
committer | Christopher Page | 2008-07-07 23:24:12 +0000 |
commit | 61d25a912ed1a8ca864e7c4dc564624947f3b2fe (patch) | |
tree | edbbb3197f5f6ac67ee7d43c2246dd77e7cff671 /engines/agi/op_cmd.cpp | |
parent | a4f56de13ac2a7daaf5654c75f07ad6331f375e6 (diff) | |
download | scummvm-rg350-61d25a912ed1a8ca864e7c4dc564624947f3b2fe.tar.gz scummvm-rg350-61d25a912ed1a8ca864e7c4dc564624947f3b2fe.tar.bz2 scummvm-rg350-61d25a912ed1a8ca864e7c4dc564624947f3b2fe.zip |
Agi works with the new GMM implementation
svn-id: r32953
Diffstat (limited to 'engines/agi/op_cmd.cpp')
-rw-r--r-- | engines/agi/op_cmd.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index e3629699ca..0cd633b078 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -26,6 +26,8 @@ #include "base/version.h" +#include "common/events.h" + #include "agi/agi.h" #include "agi/sprite.h" #include "agi/graphics.h" @@ -1213,11 +1215,11 @@ cmd(quit) { g_sound->stopSound(); if (p0) { - g_agi->_quit = true; + g_system->getEventManager()->pushEvent(Common::EVENT_QUIT); } else { if (g_agi->selectionBox (" Quit the game, or continue? \n\n\n", buttons) == 0) { - g_agi->_quit = true; + g_system->getEventManager()->pushEvent(Common::EVENT_QUIT); } } } @@ -1231,7 +1233,7 @@ cmd(restart_game) { g_agi->selectionBox(" Restart game, or continue? \n\n\n", buttons); if (sel == 0) { - g_agi->_quit = 0xff; + g_system->getEventManager()->pushEvent(Common::EVENT_QUIT); g_agi->setflag(fRestartGame, true); g_agi->_menu->enableAll(); } @@ -1739,7 +1741,7 @@ int AgiEngine::runLogic(int n) { curLogic->cIP = curLogic->sIP; timerHack = 0; - while (ip < _game.logics[n].size && !g_agi->_quit) { + while (ip < _game.logics[n].size && !_eventMan->shouldQuit()) { if (_debug.enabled) { if (_debug.steps > 0) { if (_debug.logic0 || n) { |