diff options
Diffstat (limited to 'engines/lure/fights.cpp')
-rw-r--r-- | engines/lure/fights.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/lure/fights.cpp b/engines/lure/fights.cpp index 51fce850e6..dcf09ba50d 100644 --- a/engines/lure/fights.cpp +++ b/engines/lure/fights.cpp @@ -22,7 +22,6 @@ #include "lure/fights.h" #include "lure/luredefs.h" #include "lure/game.h" -#include "lure/lure.h" #include "lure/res.h" #include "lure/room.h" #include "lure/sound.h" @@ -109,15 +108,15 @@ bool FightsManager::isFighting() { } void FightsManager::fightLoop() { - LureEngine &engine = LureEngine::getReference(); Resources &res = Resources::getReference(); Game &game = Game::getReference(); Room &room = Room::getReference(); + Events &events = Events::getReference(); FighterRecord &playerFight = getDetails(PLAYER_ID); uint32 timerVal = g_system->getMillis(); // Loop for the duration of the battle - while (!engine.quit() && (playerFight.fwhits != GENERAL_MAGIC_ID)) { + while (!events.quitFlag && (playerFight.fwhits != GENERAL_MAGIC_ID)) { checkEvents(); if (g_system->getMillis() > timerVal + GAME_FRAME_DELAY) { @@ -185,7 +184,6 @@ const KeyMapping keyList[] = { {Common::KEYCODE_INVALID, 0}}; void FightsManager::checkEvents() { - LureEngine &engine = LureEngine::getReference(); Game &game = Game::getReference(); Events &events = Events::getReference(); Mouse &mouse = Mouse::getReference(); @@ -198,7 +196,7 @@ void FightsManager::checkEvents() { if (events.type() == Common::EVENT_KEYDOWN) { switch (events.event().kbd.keycode) { case Common::KEYCODE_ESCAPE: - engine.quitGame(); + events.quitFlag = true; return; case Common::KEYCODE_d: |