diff options
author | Max Horn | 2008-09-01 20:18:17 +0000 |
---|---|---|
committer | Max Horn | 2008-09-01 20:18:17 +0000 |
commit | 10a8cdee390698cdc38b1ca28077e39b29ef53f2 (patch) | |
tree | 00b2a4516e37ae5ed33939b6e99fe0d04b712c94 /engines/lure/fights.cpp | |
parent | c26c9ec3a7045c3a13d8389a91a46701f6833f97 (diff) | |
parent | 852bc9dbb750b9995d31e70f4158c97d3758c46f (diff) | |
download | scummvm-rg350-10a8cdee390698cdc38b1ca28077e39b29ef53f2.tar.gz scummvm-rg350-10a8cdee390698cdc38b1ca28077e39b29ef53f2.tar.bz2 scummvm-rg350-10a8cdee390698cdc38b1ca28077e39b29ef53f2.zip |
Merging more of the GSoC 2008 RTL branch: LURE
svn-id: r34251
Diffstat (limited to 'engines/lure/fights.cpp')
-rw-r--r-- | engines/lure/fights.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/lure/fights.cpp b/engines/lure/fights.cpp index dcf09ba50d..51fce850e6 100644 --- a/engines/lure/fights.cpp +++ b/engines/lure/fights.cpp @@ -22,6 +22,7 @@ #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" @@ -108,15 +109,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 (!events.quitFlag && (playerFight.fwhits != GENERAL_MAGIC_ID)) { + while (!engine.quit() && (playerFight.fwhits != GENERAL_MAGIC_ID)) { checkEvents(); if (g_system->getMillis() > timerVal + GAME_FRAME_DELAY) { @@ -184,6 +185,7 @@ 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(); @@ -196,7 +198,7 @@ void FightsManager::checkEvents() { if (events.type() == Common::EVENT_KEYDOWN) { switch (events.event().kbd.keycode) { case Common::KEYCODE_ESCAPE: - events.quitFlag = true; + engine.quitGame(); return; case Common::KEYCODE_d: |