diff options
Diffstat (limited to 'engines/lastexpress/fight')
-rw-r--r-- | engines/lastexpress/fight/fight.cpp | 12 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_anna.cpp | 6 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_ivo.cpp | 6 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_milos.cpp | 6 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_salko.cpp | 6 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_vesna.cpp | 6 |
6 files changed, 27 insertions, 15 deletions
diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp index 685b3b09d1..38a93cfd94 100644 --- a/engines/lastexpress/fight/fight.cpp +++ b/engines/lastexpress/fight/fight.cpp @@ -37,6 +37,8 @@ #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/graphics.h" #include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" @@ -86,7 +88,7 @@ void Fight::eventMouse(const Common::Event &ev) { // Handle right button click if (ev.type == Common::EVENT_RBUTTONUP) { - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); setStopped(); getGlobalTimer() ? _state = 0 : ++_state; @@ -133,15 +135,15 @@ void Fight::eventMouse(const Common::Event &ev) { // Stop fight if clicked if (ev.type == Common::EVENT_LBUTTONUP) { _handleTimer = false; - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); bailout(kFightEndExit); } // Reset timer on right click if (ev.type == Common::EVENT_RBUTTONUP) { if (getGlobalTimer()) { - if (getSound()->isBuffered("TIMER")) - getSound()->removeFromQueue("TIMER"); + if (getSoundQueue()->isBuffered("TIMER")) + getSoundQueue()->removeFromQueue("TIMER"); setGlobalTimer(900); } @@ -277,7 +279,7 @@ Fight::FightEndType Fight::setup(FightType type) { if (_engine->handleEvents()) continue; - getSound()->updateQueue(); + getSoundQueue()->updateQueue(); } // Cleanup after fight is over diff --git a/engines/lastexpress/fight/fighter_anna.cpp b/engines/lastexpress/fight/fighter_anna.cpp index 3c0132eef6..feb35515a0 100644 --- a/engines/lastexpress/fight/fighter_anna.cpp +++ b/engines/lastexpress/fight/fighter_anna.cpp @@ -26,6 +26,8 @@ #include "lastexpress/game/sound.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" @@ -107,7 +109,7 @@ void FighterPlayerAnna::handleAction(FightAction action) { } if (_field_34 > 4) { - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); _fight->bailout(Fight::kFightEndWin); } } @@ -175,7 +177,7 @@ void FighterOpponentAnna::update() { _opponent->handleAction((FightAction)_sequenceIndex); if (_opponent->getCountdown() <= 0) { - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); handleAction(kFightActionLost); } } diff --git a/engines/lastexpress/fight/fighter_ivo.cpp b/engines/lastexpress/fight/fighter_ivo.cpp index 60d6c1a874..9988fca790 100644 --- a/engines/lastexpress/fight/fighter_ivo.cpp +++ b/engines/lastexpress/fight/fighter_ivo.cpp @@ -26,6 +26,8 @@ #include "lastexpress/game/sound.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" @@ -110,7 +112,7 @@ void FighterPlayerIvo::update() { if (_opponent->getCountdown() <= 0) { setSequenceAndDraw(9, kFightSequenceType1); _opponent->setSequenceAndDraw(8, kFightSequenceType1); - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); handleAction(kFightActionWin); return; @@ -227,7 +229,7 @@ void FighterOpponentIvo::update() { if (_opponent->getCountdown() <= 0) { setSequenceAndDraw(7, kFightSequenceType1); _opponent->setSequenceAndDraw(8, kFightSequenceType1); - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); _opponent->handleAction(kFightActionWin); diff --git a/engines/lastexpress/fight/fighter_milos.cpp b/engines/lastexpress/fight/fighter_milos.cpp index 972c44882b..82c965caf3 100644 --- a/engines/lastexpress/fight/fighter_milos.cpp +++ b/engines/lastexpress/fight/fighter_milos.cpp @@ -27,6 +27,8 @@ #include "lastexpress/game/sound.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" @@ -107,7 +109,7 @@ void FighterPlayerMilos::update() { setSequenceAndDraw(5, kFightSequenceType1); _opponent->setSequenceAndDraw(6, kFightSequenceType1); - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); getSound()->playSound(kEntityTrain, "MUS029", kFlagDefault); handleAction(kFightActionWin); @@ -210,7 +212,7 @@ void FighterOpponentMilos::update() { _opponent->handleAction((FightAction)_sequenceIndex); if (_opponent->getCountdown() <= 0) { - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); handleAction(kFightActionLost); } } diff --git a/engines/lastexpress/fight/fighter_salko.cpp b/engines/lastexpress/fight/fighter_salko.cpp index 6f71a6dda8..166f7c3899 100644 --- a/engines/lastexpress/fight/fighter_salko.cpp +++ b/engines/lastexpress/fight/fighter_salko.cpp @@ -27,6 +27,8 @@ #include "lastexpress/game/sound.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" @@ -95,7 +97,7 @@ void FighterPlayerSalko::update() { if (_frame && checkFrame(2)) { if (_opponent->getCountdown() <= 0) { - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); _fight->bailout(Fight::kFightEndWin); return; @@ -184,7 +186,7 @@ void FighterOpponentSalko::update() { if (_frame && checkFrame(2)) { if (_opponent->getCountdown() <= 0) { - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); _fight->bailout(Fight::kFightEndLost); // Stop processing diff --git a/engines/lastexpress/fight/fighter_vesna.cpp b/engines/lastexpress/fight/fighter_vesna.cpp index c92d041c7e..075f158bda 100644 --- a/engines/lastexpress/fight/fighter_vesna.cpp +++ b/engines/lastexpress/fight/fighter_vesna.cpp @@ -27,6 +27,8 @@ #include "lastexpress/game/sound.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" @@ -103,7 +105,7 @@ void FighterPlayerVesna::update() { _opponent->handleAction(kFightAction3); if (_opponent->getCountdown() <= 0) { - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); _fight->bailout(Fight::kFightEndWin); return; } @@ -251,7 +253,7 @@ void FighterOpponentVesna::update() { _opponent->update(); Fighter::update(); - getSound()->removeFromQueue(kEntityTables0); + getSoundQueue()->removeFromQueue(kEntityTables0); // Stop processing return; |