diff options
Diffstat (limited to 'engines/lastexpress/entities/mahmud.cpp')
-rw-r--r-- | engines/lastexpress/entities/mahmud.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index f9ae741d0e..cb782854af 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -34,6 +34,8 @@ #include "lastexpress/game/sound.h" #include "lastexpress/game/state.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/lastexpress.h" #include "lastexpress/helpers.h" @@ -157,7 +159,7 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool) case kActionEndSound: case kActionDrawScene: - if (!getSound()->isBuffered(kEntityMahmud)) { + if (!getSoundQueue()->isBuffered(kEntityMahmud)) { EntityPosition position = getEntityData(kEntityPlayer)->entityPosition; if (position < kPosition_1500 || position >= kPosition_5790 || (position > kPosition_4455 && params->param5 != 5)) { getObjects()->update(kObjectCompartment5, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand); @@ -173,12 +175,12 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool) case kActionKnock: case kActionOpenDoor: - if (!getSound()->isBuffered((savepoint.action == kActionKnock) ? "LIB012" : "LIB013", true)) + if (!getSoundQueue()->isBuffered((savepoint.action == kActionKnock) ? "LIB012" : "LIB013", true)) getSound()->playSound(kEntityPlayer, (savepoint.action == kActionKnock) ? "LIB012" : "LIB013"); params->param5 = savepoint.param.intValue; - if (!getSound()->isBuffered(kEntityMahmud)) { + if (!getSoundQueue()->isBuffered(kEntityMahmud)) { params->param3++; switch(params->param3) { @@ -282,7 +284,7 @@ IMPLEMENT_FUNCTION(11, Mahmud, function11) case kActionOpenDoor: { getSound()->playSound(kEntityPlayer, (savepoint.action == kActionKnock ? "LIB012" : "LIB013")); - if (!getSound()->isBuffered(kEntityMahmud)) { + if (!getSoundQueue()->isBuffered(kEntityMahmud)) { params->param1++; getSound()->playSound(kEntityMahmud, (params->param1 == 1 ? "MAH1170E" : (params->param1 == 2 ? "MAH1173B" : "MAH1174"))); @@ -396,8 +398,8 @@ IMPLEMENT_FUNCTION(11, Mahmud, function11) break; case kAction123852928: - if (getSound()->isBuffered(kEntityMahmud)) - getSound()->processEntry(kEntityMahmud); + if (getSoundQueue()->isBuffered(kEntityMahmud)) + getSoundQueue()->processEntry(kEntityMahmud); getObjects()->update(kObjectCompartment5, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand); getObjects()->update(kObjectCompartment6, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand); @@ -560,7 +562,7 @@ IMPLEMENT_FUNCTION(14, Mahmud, chaptersHandler) TIME_CHECK_CALLBACK(kTime1098000, params->param6, 1, setup_function13); - if (!getSound()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) { + if (!getSoundQueue()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) { params->param7 = 1; setCallback(2); @@ -636,7 +638,7 @@ IMPLEMENT_FUNCTION(14, Mahmud, chaptersHandler) params->param4 = 0; params->param5 = 0; - if (!getSound()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) { + if (!getSoundQueue()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) { params->param7 = 1; setCallback(2); setup_function12(); |