diff options
| author | Evgeny Grechnikov | 2018-10-18 00:38:01 +0300 |
|---|---|---|
| committer | Evgeny Grechnikov | 2018-10-18 00:38:01 +0300 |
| commit | 54562554f9b274ce527a54e7fe87b8ff354fe0f4 (patch) | |
| tree | e4389bd4af6e5fcef525bec17c92f35d12fdf443 /engines/lastexpress/entities | |
| parent | b7b5fbbad2808a0c5112bebbb59a5a1c43042e29 (diff) | |
| download | scummvm-rg350-54562554f9b274ce527a54e7fe87b8ff354fe0f4.tar.gz scummvm-rg350-54562554f9b274ce527a54e7fe87b8ff354fe0f4.tar.bz2 scummvm-rg350-54562554f9b274ce527a54e7fe87b8ff354fe0f4.zip | |
LASTEXPRESS: better names in sound code
Refactoring, no changes in behaviour.
Diffstat (limited to 'engines/lastexpress/entities')
| -rw-r--r-- | engines/lastexpress/entities/anna.cpp | 16 | ||||
| -rw-r--r-- | engines/lastexpress/entities/august.cpp | 6 | ||||
| -rw-r--r-- | engines/lastexpress/entities/chapters.cpp | 72 | ||||
| -rw-r--r-- | engines/lastexpress/entities/coudert.cpp | 2 | ||||
| -rw-r--r-- | engines/lastexpress/entities/francois.cpp | 4 | ||||
| -rw-r--r-- | engines/lastexpress/entities/kahina.cpp | 6 | ||||
| -rw-r--r-- | engines/lastexpress/entities/kronos.cpp | 2 | ||||
| -rw-r--r-- | engines/lastexpress/entities/mahmud.cpp | 2 | ||||
| -rw-r--r-- | engines/lastexpress/entities/max.cpp | 12 | ||||
| -rw-r--r-- | engines/lastexpress/entities/milos.cpp | 14 | ||||
| -rw-r--r-- | engines/lastexpress/entities/pascale.cpp | 4 | ||||
| -rw-r--r-- | engines/lastexpress/entities/salko.cpp | 2 | ||||
| -rw-r--r-- | engines/lastexpress/entities/tables.cpp | 8 | ||||
| -rw-r--r-- | engines/lastexpress/entities/tatiana.cpp | 8 | ||||
| -rw-r--r-- | engines/lastexpress/entities/train.cpp | 4 | ||||
| -rw-r--r-- | engines/lastexpress/entities/vassili.cpp | 2 | ||||
| -rw-r--r-- | engines/lastexpress/entities/verges.cpp | 6 |
17 files changed, 85 insertions, 85 deletions
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index 37c6d1065c..c2d2054fed 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -315,7 +315,7 @@ IMPLEMENT_FUNCTION(12, Anna, practiceMusic) params->param4 = 0; params->param5 = 1; } else { - getSoundQueue()->removeFromQueue(kEntityAnna); + getSoundQueue()->stop(kEntityAnna); getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorNormal, kCursorNormal); getObjects()->update(kObject53, kEntityAnna, kObjectLocation1, kCursorNormal, kCursorNormal); @@ -326,7 +326,7 @@ IMPLEMENT_FUNCTION(12, Anna, practiceMusic) break; case kActionOpenDoor: - getSoundQueue()->removeFromQueue(kEntityAnna); + getSoundQueue()->stop(kEntityAnna); setCallback(3); setup_playSound("LIB013"); break; @@ -343,7 +343,7 @@ IMPLEMENT_FUNCTION(12, Anna, practiceMusic) getEntities()->drawSequenceLeft(kEntityAnna, "418C"); if (getSoundQueue()->isBuffered(kEntityAnna)) - getSoundQueue()->processEntry(kEntityAnna); + getSoundQueue()->fade(kEntityAnna); getSound()->playSound(kEntityAnna, "ANN2135A"); break; @@ -1533,7 +1533,7 @@ IMPLEMENT_FUNCTION(35, Anna, wakeNight) case kActionKnock: case kActionOpenDoor: if (getSoundQueue()->isBuffered(kEntityAnna)) - getSoundQueue()->processEntry(kEntityAnna); + getSoundQueue()->fade(kEntityAnna); if (savepoint.action == kActionKnock) getSound()->playSound(kEntityPlayer, "LIB012"); @@ -1576,7 +1576,7 @@ IMPLEMENT_FUNCTION(35, Anna, wakeNight) case kAction226031488: if (getSoundQueue()->isBuffered(kEntityAnna)) - getSoundQueue()->processEntry(kEntityAnna); + getSoundQueue()->fade(kEntityAnna); getSavePoints()->push(kEntityAnna, kEntityMax, kAction71277948); break; @@ -3175,7 +3175,7 @@ IMPLEMENT_FUNCTION(63, Anna, deadBaggageCompartment) // Anna will get killed... case kAction272177921: if (getSoundQueue()->isBuffered("MUS012")) - getSoundQueue()->processEntry("MUS012"); + getSoundQueue()->fade("MUS012"); setCallback(1); setup_savegame(kSavegameTypeEvent, kEventAnnaKilled); @@ -3961,7 +3961,7 @@ IMPLEMENT_FUNCTION(80, Anna, finalSequence) case 1: if (getSoundQueue()->isBuffered(kEntityAnna)) - getSoundQueue()->processEntry(kEntityAnna); + getSoundQueue()->fade(kEntityAnna); getAction()->playAnimation(kEventKronosBringFirebird); getScenes()->loadSceneFromItem(kItemFirebird); @@ -3977,7 +3977,7 @@ IMPLEMENT_FUNCTION(80, Anna, finalSequence) getProgress().isEggOpen = true; if (getSoundQueue()->isBuffered(kEntityAnna)) - getSoundQueue()->processEntry(kEntityAnna); + getSoundQueue()->fade(kEntityAnna); getAction()->playAnimation(kEventKronosOpenFirebird); getScenes()->loadSceneFromPosition(kCarRestaurant, 3); diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 434d09c196..9750de71eb 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -3535,9 +3535,9 @@ IMPLEMENT_FUNCTION(69, August, unhookCars) break; case kActionDefault: - getSoundQueue()->processEntries(); + getSoundQueue()->endAmbient(); if (getSoundQueue()->isBuffered("ARRIVE")) - getSoundQueue()->removeFromQueue("ARRIVE"); + getSoundQueue()->stop("ARRIVE"); setCallback(1); setup_savegame(kSavegameTypeEvent, kEventAugustUnhookCarsBetrayal); @@ -3547,7 +3547,7 @@ IMPLEMENT_FUNCTION(69, August, unhookCars) if (getCallback() == 1) { getAction()->playAnimation(getProgress().field_C ? kEventAugustUnhookCarsBetrayal : kEventAugustUnhookCars); getEntities()->clearSequences(kEntityAugust); - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); getSound()->playSound(kEntityPlayer, "MUS050"); getScenes()->loadSceneFromPosition(kCarRestaurant, 85, 1); getSavePoints()->pushAll(kEntityAugust, kActionProceedChapter5); diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index 95d1092fd8..8346d7836d 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -173,9 +173,9 @@ IMPLEMENT_FUNCTION(6, Chapters, firstDream) case kActionOpenDoor: if (params->param1) { getEntities()->clearSequences(kEntityChapters); - getSoundQueue()->processEntry(kEntityChapters); + getSoundQueue()->fade(kEntityChapters); getSound()->playSound(kEntityPlayer, "LIB014"); - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); ENTITY_PARAM(0, 4) = 7; @@ -243,30 +243,30 @@ IMPLEMENT_FUNCTION(6, Chapters, firstDream) RESET_ENTITY_STATE(kEntityHadija, Alouan, setup_function12); if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) { - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 3) = 0; } - getSoundQueue()->processEntries(); + getSoundQueue()->endAmbient(); if (getSoundQueue()->isBuffered("CON1505")) - getSoundQueue()->processEntry("CON1505"); + getSoundQueue()->fade("CON1505"); if (getSoundQueue()->isBuffered("AUG1057")) - getSoundQueue()->processEntry("AUG1057"); + getSoundQueue()->fade("AUG1057"); if (getSoundQueue()->isBuffered("ZFX1005")) - getSoundQueue()->processEntry("ZFX1005"); + getSoundQueue()->fade("ZFX1005"); else if (getSoundQueue()->isBuffered("ZFX1006")) - getSoundQueue()->processEntry("ZFX1006"); + getSoundQueue()->fade("ZFX1006"); else if (getSoundQueue()->isBuffered("ZFX1007")) - getSoundQueue()->processEntry("ZFX1007"); + getSoundQueue()->fade("ZFX1007"); else if (getSoundQueue()->isBuffered("ZFX1007A")) - getSoundQueue()->processEntry("ZFX1007A"); + getSoundQueue()->fade("ZFX1007A"); else if (getSoundQueue()->isBuffered("ZFX1007B")) - getSoundQueue()->processEntry("ZFX1007B"); + getSoundQueue()->fade("ZFX1007B"); getSound()->playSound(kEntityPlayer, "MUS008", kVolumeFull); getInventory()->unselectItem(); @@ -317,7 +317,7 @@ IMPLEMENT_FUNCTION(7, Chapters, chapter1Init) return; getProgress().chapter = kChapter1; - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); getState()->time = kTimeStartGame; getState()->timeDelta = 0; @@ -584,7 +584,7 @@ label_chapter1_next: } if (ENTITY_PARAM(0, 3)) { - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); ENTITY_PARAM(0, 3) = 0; if (params->param4) { @@ -715,7 +715,7 @@ IMPLEMENT_FUNCTION(9, Chapters, chapter1Next) if (savepoint.action == kActionDefault) { // Reset sound cache if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) { - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 3) = 0; } @@ -814,7 +814,7 @@ IMPLEMENT_FUNCTION(11, Chapters, chapter2Init) // Reset sound cache if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) { - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 3) = 0; } @@ -899,7 +899,7 @@ IMPLEMENT_FUNCTION(14, Chapters, chapter3Init) getObjects()->update(kObject107, kEntityPlayer, kObjectLocation3, kCursorKeepValue, kCursorKeepValue); if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) { - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 3) = 0; } @@ -1023,7 +1023,7 @@ label_callback_8: } } - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4)); ENTITY_PARAM(0, 2) = 0; @@ -1034,7 +1034,7 @@ label_callback_8: } if (ENTITY_PARAM(0, 3)) { - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); ENTITY_PARAM(0, 3) = 0; } break; @@ -1091,7 +1091,7 @@ IMPLEMENT_FUNCTION(16, Chapters, viennaEvents) case kActionDefault: getEntityData(kEntityPlayer)->car = kCarLocomotive; if (getSoundQueue()->isBuffered(kEntityAbbot)) - getSoundQueue()->processEntry(kEntityAbbot); + getSoundQueue()->fade(kEntityAbbot); if (!getEvent(kEventAugustBringBriefcase)) { setCallback(1); @@ -1208,8 +1208,8 @@ IMPLEMENT_FUNCTION(18, Chapters, chapter4Init) if (savepoint.action != kActionDefault) return; - getSoundQueue()->processEntries(); - getSoundQueue()->resetState(); + getSoundQueue()->endAmbient(); + getSoundQueue()->startAmbient(); getProgress().isTrainRunning = true; @@ -1235,7 +1235,7 @@ IMPLEMENT_FUNCTION(18, Chapters, chapter4Init) getObjects()->update(kObject107, kEntityPlayer, kObjectLocation3, kCursorKeepValue, kCursorKeepValue); if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) { - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 3) = 0; } @@ -1384,7 +1384,7 @@ label_callback_4: } if (ENTITY_PARAM(0, 3)) { - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); ENTITY_PARAM(0, 3) = 0; } else if (!params->param2 && !params->param3) { getSound()->playSound(kEntityChapters, "ZFX1001"); @@ -1422,16 +1422,16 @@ label_callback_4: case 5: if (getSoundQueue()->isBuffered(kEntityChapters)) - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); getAction()->playAnimation(kEventTrainExplosionBridge); getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneNone, true); break; case 6: - getSoundQueue()->processEntries(); + getSoundQueue()->endAmbient(); getAction()->playAnimation(kEventTylerCastleDream); - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); getProgress().field_18 = 1; @@ -1530,7 +1530,7 @@ label_callback_4: params->param1 = 1; if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) { - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 3) = 0; @@ -1593,7 +1593,7 @@ label_callback_4: getState()->time = kTime2520000; if (getSoundQueue()->isBuffered(kEntityChapters)) - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); getEntities()->clearSequences(kEntityChapters); getInventory()->removeItem(kItemTelegram); @@ -1606,7 +1606,7 @@ label_callback_4: case kAction201959744: if (getSoundQueue()->isBuffered(kEntityChapters)) - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); getSound()->playSound(kEntityTrain, "ZFX4001", kVolumeFull); @@ -1714,7 +1714,7 @@ IMPLEMENT_FUNCTION(21, Chapters, chapter5Init) getObjects()->updateModel(kObjectRestaurantCar, kObjectModel2); if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) { - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 3) = 0; } @@ -1747,7 +1747,7 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler) if (!getProgress().isNightTime) { getSound()->playSound(kEntityChapters, "ARRIVE", kVolume8); - getSoundQueue()->processEntries(); + getSoundQueue()->endAmbient(); } } @@ -1756,7 +1756,7 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler) if (!getEvent(kEventLocomotiveMilosDay) && !getEvent(kEventLocomotiveMilosNight)) { getSound()->playSound(kEntityChapters, "ARRIVE", kVolume8); - getSoundQueue()->processEntries(); + getSoundQueue()->endAmbient(); } } break; @@ -1786,7 +1786,7 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler) getState()->time = kTime2916000; if (getSoundQueue()->isBuffered(kEntityChapters)) - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); break; } IMPLEMENT_FUNCTION_END @@ -1801,7 +1801,7 @@ void Chapters::enterExitStation(const SavePoint &savepoint, bool isEnteringStati return; } - getSoundQueue()->removeFromQueue(kEntityChapters); + getSoundQueue()->stop(kEntityChapters); if (!ENTITY_PARAM(0, 2)) { if (ENTITY_PARAM(0, 3)) @@ -1869,7 +1869,7 @@ void Chapters::enterExitHelper(bool isEnteringStation) { EXPOSE_PARAMS(EntityData::EntityParametersSIIS); getSound()->playSound(kEntityChapters, isEnteringStation ? "ARRIVE" : "DEPART", kVolume8); - getSoundQueue()->processEntries(); + getSoundQueue()->endAmbient(); getObjects()->update(kObjectHandleOutsideLeft, kEntityPlayer, kObjectLocation1, kCursorNormal, isEnteringStation ? kCursorNormal : kCursorHand); getObjects()->update(kObjectHandleOutsideRight, kEntityPlayer, kObjectLocation1, kCursorNormal, isEnteringStation ? kCursorNormal : kCursorHand); @@ -1888,7 +1888,7 @@ void Chapters::enterExitHelper(bool isEnteringStation) { } void Chapters::playSteam() const { - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4)); ENTITY_PARAM(0, 2) = 0; } diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index af06d610e7..89053b79cd 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -2013,7 +2013,7 @@ IMPLEMENT_FUNCTION(37, Coudert, function37) case kActionDefault: if (getSoundQueue()->isBuffered(kEntityCoudert)) - getSoundQueue()->processEntry(kEntityCoudert); + getSoundQueue()->fade(kEntityCoudert); if (ENTITY_PARAM(0, 7)) { getData()->entityPosition = kPosition_8200; diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index be95f31419..ed56971396 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -375,7 +375,7 @@ label_callback: getData()->inventoryItem = kItemNone; if (getSoundQueue()->isBuffered(kEntityFrancois)) - getSoundQueue()->processEntry(kEntityFrancois); + getSoundQueue()->fade(kEntityFrancois); setCallback(4); setup_doWalk(kCarRedSleeping, kPosition_5790); @@ -386,7 +386,7 @@ label_callback: getData()->inventoryItem = kItemNone; if (getSoundQueue()->isBuffered(kEntityFrancois)) - getSoundQueue()->processEntry(kEntityFrancois); + getSoundQueue()->fade(kEntityFrancois); setCallback(6); setup_savegame(kSavegameTypeEvent, kEventFrancoisWhistle); diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index accbe7dcdc..a10ff40e42 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -608,7 +608,7 @@ label_callback_3: if (getEvent(kEventKahinaAskSpeakFirebird)) { if (getSoundQueue()->isBuffered(kEntityKahina)) - getSoundQueue()->processEntry(kEntityKahina); + getSoundQueue()->fade(kEntityKahina); if (savepoint.action == kActionKnock) getSound()->playSound(kEntityPlayer, "LIB012"); @@ -1166,7 +1166,7 @@ IMPLEMENT_FUNCTION(24, Kahina, seekCath) if (ENTITY_PARAM(0, 2)) { getEntities()->clearSequences(kEntityKahina); if (getSoundQueue()->isBuffered(kEntityKahina)) - getSoundQueue()->processEntry(kEntityKahina); + getSoundQueue()->fade(kEntityKahina); getProgress().field_44 = 0; @@ -1201,7 +1201,7 @@ IMPLEMENT_FUNCTION(24, Kahina, seekCath) case kAction137503360: getEntities()->clearSequences(kEntityKahina); if (getSoundQueue()->isBuffered(kEntityKahina)) - getSoundQueue()->processEntry(kEntityKahina); + getSoundQueue()->fade(kEntityKahina); getProgress().field_44 = 0; diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp index 71ae6dcfa5..0651b84490 100644 --- a/engines/lastexpress/entities/kronos.cpp +++ b/engines/lastexpress/entities/kronos.cpp @@ -486,7 +486,7 @@ IMPLEMENT_FUNCTION(19, Kronos, startConcert) case 2: getAction()->playAnimation(kEventConcertStart); - getSoundQueue()->setupEntry(kSoundType7, kEntityKronos); + getSoundQueue()->assignNISLink(kEntityKronos); getScenes()->loadSceneFromPosition(kCarKronos, 83); RESET_ENTITY_STATE(kEntityRebecca, Rebecca, setup_function39); diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index 47a9e85716..b944f82dcd 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -399,7 +399,7 @@ IMPLEMENT_FUNCTION(11, Mahmud, function11) case kAction123852928: if (getSoundQueue()->isBuffered(kEntityMahmud)) - getSoundQueue()->processEntry(kEntityMahmud); + getSoundQueue()->fade(kEntityMahmud); getObjects()->update(kObjectCompartment5, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand); getObjects()->update(kObjectCompartment6, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand); diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp index 180bc1d1ca..661c59187c 100644 --- a/engines/lastexpress/entities/max.cpp +++ b/engines/lastexpress/entities/max.cpp @@ -140,7 +140,7 @@ IMPLEMENT_FUNCTION(7, Max, guardingCompartment) getObjects()->update(kObject53, kEntityMax, kObjectLocation1, kCursorNormal, kCursorNormal); if (getSoundQueue()->isBuffered(kEntityMax)) - getSoundQueue()->processEntry(kEntityMax); + getSoundQueue()->fade(kEntityMax); setCallback((savepoint.action == kActionKnock) ? 1 : 2); setup_playSound((savepoint.action == kActionKnock) ? "LIB012" : "LIB013"); @@ -232,7 +232,7 @@ IMPLEMENT_FUNCTION(8, Max, inCageFriendly) } if (getSoundQueue()->isBuffered(kEntityMax)) - getSoundQueue()->processEntry(kEntityMax); + getSoundQueue()->fade(kEntityMax); getAction()->playAnimation(kEventCathMaxLickHand); getScenes()->processScene(); @@ -259,7 +259,7 @@ IMPLEMENT_FUNCTION(8, Max, inCageFriendly) break; if (getSoundQueue()->isBuffered(kEntityMax)) - getSoundQueue()->processEntry(kEntityMax); + getSoundQueue()->fade(kEntityMax); getSound()->playSound(kEntityPlayer, "LIB026"); getAction()->playAnimation(kEventCathMaxFree); @@ -483,16 +483,16 @@ IMPLEMENT_FUNCTION(14, Max, inCageMad) case 1: if (getSoundQueue()->isBuffered(kEntityMax)) - getSoundQueue()->removeFromQueue(kEntityMax); + getSoundQueue()->stop(kEntityMax); getAction()->playAnimation(kEventCathMaxCage); - getSoundQueue()->setupEntry(kSoundType7, kEntityMax); + getSoundQueue()->assignNISLink(kEntityMax); getScenes()->processScene(); break; case 2: if (getSoundQueue()->isBuffered(kEntityMax)) - getSoundQueue()->processEntry(kEntityMax); + getSoundQueue()->fade(kEntityMax); getSound()->playSound(kEntityPlayer, "LIB026"); getAction()->playAnimation(kEventCathMaxFree); diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index fb139f96ac..a9e0d80407 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -1592,7 +1592,7 @@ IMPLEMENT_FUNCTION(29, Milos, chapter4Handler) case kAction221683008: if (getSoundQueue()->isBuffered(kEntityMilos)) - getSoundQueue()->processEntry(kEntityMilos); + getSoundQueue()->fade(kEntityMilos); params->param1 = 1; getSavePoints()->push(kEntityMilos, kEntityCoudert, kAction123199584); @@ -1735,14 +1735,14 @@ IMPLEMENT_FUNCTION(34, Milos, chapter5Handler) case 2: if (getSoundQueue()->isBuffered("MUS050")) - getSoundQueue()->processEntry("MUS050"); + getSoundQueue()->fade("MUS050"); if (getSoundQueue()->isBuffered("ARRIVE")) - getSoundQueue()->removeFromQueue("ARRIVE"); + getSoundQueue()->stop("ARRIVE"); - getSoundQueue()->processEntries(); + getSoundQueue()->endAmbient(); getAction()->playAnimation(getProgress().isNightTime ? kEventLocomotiveMilosDay : kEventLocomotiveMilosNight); - getSoundQueue()->setupEntry(kSoundType7, kEntityMilos); + getSoundQueue()->assignNISLink(kEntityMilos); getScenes()->loadSceneFromPosition(kCarCoalTender, 1); break; @@ -1754,7 +1754,7 @@ IMPLEMENT_FUNCTION(34, Milos, chapter5Handler) case 4: getAction()->playAnimation(kEventLocomotiveRestartTrain); getAction()->playAnimation(kEventLocomotiveOldBridge); - getSoundQueue()->resetState(); + getSoundQueue()->startAmbient(); getState()->time = kTime2983500; setCallback(5); @@ -1798,7 +1798,7 @@ IMPLEMENT_FUNCTION(34, Milos, chapter5Handler) break; } - getSoundQueue()->processEntry(kEntityMilos); + getSoundQueue()->fade(kEntityMilos); if (getState()->time < kTime2949300) getState()->time = kTime2949300; diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp index 0f19b8f44b..6112ceeea2 100644 --- a/engines/lastexpress/entities/pascale.cpp +++ b/engines/lastexpress/entities/pascale.cpp @@ -464,9 +464,9 @@ IMPLEMENT_FUNCTION(16, Pascale, greetTatiana) getEntities()->updatePositionEnter(kEntityPascale, kCarRestaurant, 67); if (getSoundQueue()->isBuffered("TAT1069A")) - getSoundQueue()->processEntry("TAT1069A"); + getSoundQueue()->fade("TAT1069A"); else if (getSoundQueue()->isBuffered("TAT1069B")) - getSoundQueue()->processEntry("TAT1069B"); + getSoundQueue()->fade("TAT1069B"); setCallback(2); setup_playSound("TAT1066"); diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp index f1595d6d0f..67ea2ede02 100644 --- a/engines/lastexpress/entities/salko.cpp +++ b/engines/lastexpress/entities/salko.cpp @@ -602,7 +602,7 @@ IMPLEMENT_FUNCTION(24, Salko, chapter5Handler) case 1: if (getSoundQueue()->isBuffered("MUS050")) - getSoundQueue()->processEntry("MUS050"); + getSoundQueue()->fade("MUS050"); getAction()->playAnimation(kEventCathSalkoTrainTopFight); diff --git a/engines/lastexpress/entities/tables.cpp b/engines/lastexpress/entities/tables.cpp index b84c8c66fd..a884da4375 100644 --- a/engines/lastexpress/entities/tables.cpp +++ b/engines/lastexpress/entities/tables.cpp @@ -89,7 +89,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION(5, Tables, chapter5) if (savepoint.action == kActionDefault) { if (_id == kEntityTables2 && getSoundQueue()->isBuffered(kEntityTables2)) - getSoundQueue()->processEntry(kEntityTables2); + getSoundQueue()->fade(kEntityTables2); setup_draw(); } @@ -113,21 +113,21 @@ IMPLEMENT_FUNCTION(6, Tables, draw) case kChapter1: if (getState()->time > kTime1165500 && !params->param1) { params->param1 = 1; - getSoundQueue()->processEntry(kEntityTables2); + getSoundQueue()->fade(kEntityTables2); } break; case kChapter3: if (getState()->time > kTime2052000 && !params->param2) { params->param2 = 1; - getSoundQueue()->processEntry(kEntityTables2); + getSoundQueue()->fade(kEntityTables2); } break; case kChapter4: if (getState()->time > kTime2488500 && !params->param3) { params->param3 = 1; - getSoundQueue()->processEntry(kEntityTables2); + getSoundQueue()->fade(kEntityTables2); } break; diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index 175600fef8..28799c07c1 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -1865,7 +1865,7 @@ IMPLEMENT_FUNCTION(46, Tatiana, withAlexei) parameters->param3 = 1; if (parameters->param2) { - getSoundQueue()->removeFromQueue(kEntityTatiana); + getSoundQueue()->stop(kEntityTatiana); getSavePoints()->call(kEntityTatiana, kEntityTatiana, kActionEndSound); } } else { @@ -2122,7 +2122,7 @@ IMPLEMENT_FUNCTION(50, Tatiana, alexeiDead) case kActionCallback: if (getCallback() == 1) { if (getSoundQueue()->isBuffered("MUS013")) - getSoundQueue()->processEntry("MUS013"); + getSoundQueue()->fade("MUS013"); getAction()->playAnimation(kEventVassiliDeadAlexei); getSavePoints()->push(kEntityTatiana, kEntityAbbot, kAction104060776); @@ -2233,10 +2233,10 @@ IMPLEMENT_FUNCTION(54, Tatiana, autistic) case kActionCallback: if (getCallback() == 1) { if (getSoundQueue()->isBuffered("MUS050")) - getSoundQueue()->processEntry("MUS050"); + getSoundQueue()->fade("MUS050"); if (getSoundQueue()->isBuffered(kEntityTatiana)) - getSoundQueue()->processEntry(kEntityTatiana); + getSoundQueue()->fade(kEntityTatiana); getAction()->playAnimation(isNight() ? kEventTatianaVassiliTalkNight : kEventTatianaVassiliTalk); getScenes()->processScene(); diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp index e4ff976cae..a8df68bddb 100644 --- a/engines/lastexpress/entities/train.cpp +++ b/engines/lastexpress/entities/train.cpp @@ -346,7 +346,7 @@ label_process: } else { params->param6 = 0; if (getSoundQueue()->isBuffered("ZFX1001", true)) - getSoundQueue()->removeFromQueue("ZFX1001"); + getSoundQueue()->stop("ZFX1001"); } // Draw moving background behind windows @@ -568,7 +568,7 @@ void Train::resetParam8() { && !getEntities()->isInsideCompartment(kEntityPlayer, (CarIndex)params1->param1, (EntityPosition)params1->param3)) { if (getSoundQueue()->isBuffered((const char *)¶ms1->seq)) - getSoundQueue()->processEntry((const char *)¶ms1->seq); + getSoundQueue()->fade((const char *)¶ms1->seq); params->param8 = 0; } diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp index 5696a71160..e236c65886 100644 --- a/engines/lastexpress/entities/vassili.cpp +++ b/engines/lastexpress/entities/vassili.cpp @@ -292,7 +292,7 @@ IMPLEMENT_FUNCTION(9, Vassili, function9) || getEntities()->isPlayerPosition(kCarRedSleeping, 41)) { if (savepoint.action == kActionDrawScene) - getSoundQueue()->processEntry(kEntityVassili); + getSoundQueue()->fade(kEntityVassili); setup_seizure(); } else { diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index 9f7d0828e4..936d62b15f 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -705,7 +705,7 @@ IMPLEMENT_FUNCTION(24, Verges, policeGettingOffTrain) case kActionCallback: if (getCallback() == 1) { - getSoundQueue()->processEntry(kEntityVerges); + getSoundQueue()->fade(kEntityVerges); getAction()->playAnimation(kEventGendarmesArrestation); getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverPolice1, true); } @@ -1781,10 +1781,10 @@ IMPLEMENT_FUNCTION(40, Verges, chapter5Handler) case kActionOpenDoor: if (getSoundQueue()->isBuffered(kEntityVerges)) - getSoundQueue()->processEntry(kEntityVerges); + getSoundQueue()->fade(kEntityVerges); if (getSoundQueue()->isBuffered("MUS050")) - getSoundQueue()->processEntry("MUS050"); + getSoundQueue()->fade("MUS050"); getObjects()->update(kObject65, kEntityPlayer, kObjectLocationNone, kCursorNormal, kCursorForward); |
