diff options
Diffstat (limited to 'engines/agi/preagi_troll.cpp')
-rw-r--r-- | engines/agi/preagi_troll.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp index beff721fda..7502c63c6c 100644 --- a/engines/agi/preagi_troll.cpp +++ b/engines/agi/preagi_troll.cpp @@ -30,6 +30,8 @@ #include "graphics/cursorman.h" +#include "common/events.h" + namespace Agi { Troll::Troll(PreAgiEngine* vm) : _vm(vm) { @@ -56,12 +58,11 @@ bool Troll::getMenuSel(const char *szMenu, int *iSel, int nSel) { drawMenu(szMenu, *iSel); - while (!_vm->quit()) { + for (;;) { while (_vm->_system->getEventManager()->pollEvent(event)) { switch(event.type) { - case Common::EVENT_RTL: case Common::EVENT_QUIT: - return 0; + _vm->_system->quit(); case Common::EVENT_MOUSEMOVE: y = event.mouse.y / 8; @@ -204,8 +205,8 @@ void Troll::waitAnyKeyIntro() { for (;;) { while (_vm->_system->getEventManager()->pollEvent(event)) { switch(event.type) { - case Common::EVENT_RTL: case Common::EVENT_QUIT: + _vm->_system->quit(); case Common::EVENT_LBUTTONUP: case Common::EVENT_KEYDOWN: return; @@ -268,7 +269,7 @@ void Troll::tutorial() { int iSel = 0; //char szTreasure[16] = {0}; - while (!_vm->quit()) { + for (;;) { _vm->clearScreen(0xFF); _vm->printStr(IDS_TRO_TUTORIAL_0); |