diff options
author | Littleboy | 2011-06-28 22:10:29 -0400 |
---|---|---|
committer | Littleboy | 2011-06-28 22:13:40 -0400 |
commit | 6eace0ca759bc62b6b0b6cf69a4341b4d1bb43e4 (patch) | |
tree | 662f45a755c6ac8bf866276781746867395a74b5 /engines/lastexpress/entities/mertens.cpp | |
parent | d1341387e3c396aa6b48b39379afc9e201448048 (diff) | |
download | scummvm-rg350-6eace0ca759bc62b6b0b6cf69a4341b4d1bb43e4.tar.gz scummvm-rg350-6eace0ca759bc62b6b0b6cf69a4341b4d1bb43e4.tar.bz2 scummvm-rg350-6eace0ca759bc62b6b0b6cf69a4341b4d1bb43e4.zip |
LASTEXPRESS: Move sound queue related functions to a separate class
- Implement missing queue reset function
- Cleanup SoundManager::playLoopingSound()
Diffstat (limited to 'engines/lastexpress/entities/mertens.cpp')
-rw-r--r-- | engines/lastexpress/entities/mertens.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index b99e344b20..464cc343bb 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -32,6 +32,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/game/sound.h" +#include "lastexpress/sound/queue.h" + #include "lastexpress/lastexpress.h" #include "lastexpress/helpers.h" @@ -503,7 +505,7 @@ IMPLEMENT_FUNCTION_I(12, Mertens, bonsoir, EntityIndex) if (savepoint.action == kActionDefault) return; - if (getSound()->isBuffered(kEntityMertens)) { + if (getSoundQueue()->isBuffered(kEntityMertens)) { CALLBACK_ACTION(); return; } @@ -589,7 +591,7 @@ IMPLEMENT_FUNCTION_II(13, Mertens, function13, bool, bool) if (params->param2) params->param3 = 1; - if (!getSound()->isBuffered(kEntityMertens)) { + if (!getSoundQueue()->isBuffered(kEntityMertens)) { } @@ -1188,7 +1190,7 @@ IMPLEMENT_FUNCTION(22, Mertens, function22) break; case 5: - if (!getSound()->isBuffered(kEntityMertens)) + if (!getSoundQueue()->isBuffered(kEntityMertens)) getSound()->playSound(kEntityMertens, "MAH1170I"); setCallback(6); @@ -1198,7 +1200,7 @@ IMPLEMENT_FUNCTION(22, Mertens, function22) case 6: getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityMertens); - if (!getSound()->isBuffered(kEntityMertens)) + if (!getSoundQueue()->isBuffered(kEntityMertens)) getSound()->playSound(kEntityMertens, "MAH1172", kFlagInvalid, 225); setCallback(7); @@ -2300,7 +2302,7 @@ IMPLEMENT_FUNCTION_I(31, Mertens, function31, MertensActionType) break; case 1: - if (getSound()->isBuffered(kEntityMertens)) { + if (getSoundQueue()->isBuffered(kEntityMertens)) { getEntities()->drawSequenceLeft(kEntityMertens, "601J"); } else { setCallback(2); @@ -3017,7 +3019,7 @@ IMPLEMENT_FUNCTION(42, Mertens, function42) if (getState()->time <= kTime1188000) { if ((!getEntities()->isPlayerInCar(kCarGreenSleeping) && !getEntities()->isPlayerInCar(kCarRedSleeping)) - || getSound()->isBuffered("REB1205") + || getSoundQueue()->isBuffered("REB1205") || !getEntities()->isInsideCompartment(kEntityMmeBoutarel, kCarRedSleeping, kPosition_5790) || !params->param4) { params->param4 = (uint)getState()->time; @@ -3138,7 +3140,7 @@ label_callback_18: } label_callback_19: - if (ENTITY_PARAM(0, 1) && !getSound()->isBuffered(kEntityMertens)) { + if (ENTITY_PARAM(0, 1) && !getSoundQueue()->isBuffered(kEntityMertens)) { if (getProgress().field_18 != 4) getSound()->playSound(kEntityMertens, "CON1505"); } |