From 53cd6616c958e4a50644254688aea222177f2ae2 Mon Sep 17 00:00:00 2001 From: Evgeny Grechnikov Date: Sun, 14 Oct 2018 20:05:54 +0300 Subject: LASTEXPRESS: refactor sound flags Merge SoundFlag and SoundStatus into a single enum; SoundEntry::setupStatus just casts one to another. Keep only definitions of bits in SoundFlag; drop compound flags like kFlagSteam = kSoundTypeAmbient | kSoundFlagLooped | kVolume7, use ORed simple flags in calls; change the signature of SoundManager::playSoundWithSubtitles to use uint32 instead of SoundFlag to avoid excess casting. Add meaningful names to flags; add some comments. Get rid of endian-unsafe SoundStatusUnion. Fixes an issue with big-endian hosts. No changes in behaviour on little-endian hosts. --- engines/lastexpress/entities/abbot.cpp | 2 +- engines/lastexpress/entities/anna.cpp | 14 +++++++------- engines/lastexpress/entities/august.cpp | 8 ++++---- engines/lastexpress/entities/boutarel.cpp | 2 +- engines/lastexpress/entities/chapters.cpp | 22 +++++++++++----------- engines/lastexpress/entities/coudert.cpp | 2 +- engines/lastexpress/entities/entity.h | 2 +- engines/lastexpress/entities/gendarmes.cpp | 16 ++++++++-------- engines/lastexpress/entities/gendarmes.h | 2 +- engines/lastexpress/entities/kahina.cpp | 2 +- engines/lastexpress/entities/mahmud.cpp | 4 ++-- engines/lastexpress/entities/mertens.cpp | 8 ++++---- engines/lastexpress/entities/milos.cpp | 2 +- engines/lastexpress/entities/pascale.cpp | 8 ++++---- engines/lastexpress/entities/rebecca.cpp | 4 ++-- engines/lastexpress/entities/tables.cpp | 8 ++++---- engines/lastexpress/entities/tatiana.cpp | 2 +- engines/lastexpress/entities/train.cpp | 30 +++++++++++++++--------------- engines/lastexpress/entities/vassili.cpp | 4 ++-- engines/lastexpress/entities/verges.cpp | 4 ++-- engines/lastexpress/entities/vesna.cpp | 4 ++-- 21 files changed, 75 insertions(+), 75 deletions(-) (limited to 'engines/lastexpress/entities') diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index 99b9ee3bc2..48fb36a20f 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -1119,7 +1119,7 @@ IMPLEMENT_FUNCTION(35, Abbot, inSalon3) case 2: getData()->location = kLocationOutsideCompartment; - getSound()->playSound(kEntityAbbot, "Abb3040", kFlagInvalid, 45); + getSound()->playSound(kEntityAbbot, "Abb3040", kSoundVolumeEntityDefault, 45); getEntities()->updatePositionEnter(kEntityAbbot, kCarRestaurant, 57); setCallback(3); diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index 80ad1a2ae4..37c6d1065c 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -2075,7 +2075,7 @@ IMPLEMENT_FUNCTION(47, Anna, goLunch) break; case 4: - getSound()->playSound(kEntityAnna, getEvent(kEventAugustLunch) ? "Ann3136" : "Ann3136A", kFlagInvalid, 30); + getSound()->playSound(kEntityAnna, getEvent(kEventAugustLunch) ? "Ann3136" : "Ann3136A", kSoundVolumeEntityDefault, 30); getSavePoints()->push(kEntityAnna, kEntityAugust, kAction122358304); setCallback(5); @@ -2270,7 +2270,7 @@ IMPLEMENT_FUNCTION(51, Anna, afterLunch) break; case kActionDefault: - getSound()->playSound(kEntityAnna, "Ann3142", kFlagInvalid, 30); + getSound()->playSound(kEntityAnna, "Ann3142", kSoundVolumeEntityDefault, 30); getEntities()->updatePositionEnter(kEntityAnna, kCarRestaurant, 57); getEntities()->drawSequenceRight(kEntityAnna, "112A"); if (getEntities()->isInRestaurant(kEntityPlayer)) @@ -3865,7 +3865,7 @@ IMPLEMENT_FUNCTION(78, Anna, kidnapped) case 2: getAction()->playAnimation(kEventKronosHostageAnna); getScenes()->loadSceneFromPosition(kCarRestaurant, 61, 1); - getSound()->playSound(kEntityAnna, "Mus024", kFlagDefault); + getSound()->playSound(kEntityAnna, "Mus024", kVolumeFull); setup_waiting(); break; } @@ -3936,11 +3936,11 @@ IMPLEMENT_FUNCTION(80, Anna, finalSequence) if (!Entity::updateParameter(params->param1, getState()->timeTicks, 450)) break; - getSound()->playSound(kEntityPlayer, "Kro5001", kFlagDefault); + getSound()->playSound(kEntityPlayer, "Kro5001", kVolumeFull); break; case kActionEndSound: - getSound()->playSound(kEntityPlayer, "Kro5002", kFlagDefault); + getSound()->playSound(kEntityPlayer, "Kro5002", kVolumeFull); getState()->time = kTime4929300; setCallback(2); @@ -3965,7 +3965,7 @@ IMPLEMENT_FUNCTION(80, Anna, finalSequence) getAction()->playAnimation(kEventKronosBringFirebird); getScenes()->loadSceneFromItem(kItemFirebird); - getSound()->playSound(kEntityAnna, "Mus025", kFlagDefault); + getSound()->playSound(kEntityAnna, "Mus025", kVolumeFull); break; case 2: @@ -4006,7 +4006,7 @@ IMPLEMENT_FUNCTION(81, Anna, openFirebird) if (!Entity::updateParameter(params->param1, getState()->timeTicks, 180)) break; - getSound()->playSound(kEntityTrain, "LIB069", kFlagDefault); + getSound()->playSound(kEntityTrain, "LIB069", kVolumeFull); getLogic()->gameOver(kSavegameTypeIndex, 0, kSceneNone, true); break; diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 20f54ed50d..434d09c196 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -199,7 +199,7 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION_S(13, August, playSound16) - Entity::playSound(savepoint, false, kFlagDefault); + Entity::playSound(savepoint, false, kVolumeFull); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -338,7 +338,7 @@ IMPLEMENT_FUNCTION_II(19, August, function19, bool, bool) case kAction1: getData()->inventoryItem = kItemNone; getSound()->playSound(kEntityPlayer, "CAT1002"); - getSound()->playSound(kEntityAugust, "AUG3101", kFlagInvalid, 15); + getSound()->playSound(kEntityAugust, "AUG3101", kSoundVolumeEntityDefault, 15); break; case kActionDefault: @@ -2208,7 +2208,7 @@ IMPLEMENT_FUNCTION_III(42, August, function42, CarIndex, EntityPosition, bool) getData()->inventoryItem = kItemNone; getSound()->playSound(kEntityPlayer, "CAT1002"); - getSound()->playSound(kEntityAugust, getEvent(kEventAugustBringBriefcase) ? "AUG3103" : "AUG3100", kFlagInvalid, 15); + getSound()->playSound(kEntityAugust, getEvent(kEventAugustBringBriefcase) ? "AUG3103" : "AUG3100", kSoundVolumeEntityDefault, 15); break; case kActionExcuseMe: @@ -2415,7 +2415,7 @@ IMPLEMENT_FUNCTION(45, August, function45) case kAction1: getData()->inventoryItem = kItemNone; getSound()->playSound(kEntityPlayer, "CAT1002"); - getSound()->playSound(kEntityAugust, "AUG3102", kFlagInvalid, 15); + getSound()->playSound(kEntityAugust, "AUG3102", kSoundVolumeEntityDefault, 15); break; case kActionDefault: diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index 3a0fbbdb24..f95dfe944b 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -214,7 +214,7 @@ IMPLEMENT_FUNCTION_I(11, Boutarel, function11, bool) break; case kChapter1: - getSound()->playSound(kEntityBoutarel, "MRB1075", kFlagInvalid, 60); + getSound()->playSound(kEntityBoutarel, "MRB1075", kSoundVolumeEntityDefault, 60); break; case kChapter3: diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index 2b7aa92e9f..95d1092fd8 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -162,7 +162,7 @@ IMPLEMENT_FUNCTION(6, Chapters, firstDream) break; case kActionEndSound: - getSound()->playSound(kEntityChapters, "MUS009", kFlagDefault); + getSound()->playSound(kEntityChapters, "MUS009", kVolumeFull); break; case kActionKnock: @@ -194,10 +194,10 @@ IMPLEMENT_FUNCTION(6, Chapters, firstDream) callbackAction(); } else { getSound()->playSound(kEntityPlayer, "LIB014"); - getSound()->playSound(kEntityPlayer, "LIB015", kFlagDefault, 15); + getSound()->playSound(kEntityPlayer, "LIB015", kVolumeFull, 15); if (!getSoundQueue()->isBuffered(kEntityChapters)) - getSound()->playSound(kEntityChapters, "MUS009", kFlagDefault); + getSound()->playSound(kEntityChapters, "MUS009", kVolumeFull); getScenes()->loadSceneFromPosition(kCarLocomotive, 38); @@ -268,7 +268,7 @@ IMPLEMENT_FUNCTION(6, Chapters, firstDream) else if (getSoundQueue()->isBuffered("ZFX1007B")) getSoundQueue()->processEntry("ZFX1007B"); - getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault); + getSound()->playSound(kEntityPlayer, "MUS008", kVolumeFull); getInventory()->unselectItem(); // TODO: fade to black screen @@ -720,7 +720,7 @@ IMPLEMENT_FUNCTION(9, Chapters, chapter1Next) ENTITY_PARAM(0, 3) = 0; } - getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault); + getSound()->playSound(kEntityPlayer, "MUS008", kVolumeFull); getInventory()->unselectItem(); // TODO: fade to black screen @@ -1483,7 +1483,7 @@ label_callback_4: case 11: getScenes()->loadSceneFromPosition(kCarRedSleeping, 74); - getSound()->playSound(kEntityTrain, "ZFX4001", kFlagDefault); + getSound()->playSound(kEntityTrain, "ZFX4001", kVolumeFull); getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneNone, true); break; } @@ -1539,7 +1539,7 @@ label_callback_4: // BUG: the original game fades to black screen twice, before MUS008 starts playing // (the second call just makes a delay) - getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault); + getSound()->playSound(kEntityPlayer, "MUS008", kVolumeFull); getInventory()->unselectItem(); // TODO: fade to black screen @@ -1608,7 +1608,7 @@ label_callback_4: if (getSoundQueue()->isBuffered(kEntityChapters)) getSoundQueue()->removeFromQueue(kEntityChapters); - getSound()->playSound(kEntityTrain, "ZFX4001", kFlagDefault); + getSound()->playSound(kEntityTrain, "ZFX4001", kVolumeFull); getLogic()->gameOver(kSavegameTypeIndex, 0, kSceneNone, true); break; @@ -1746,7 +1746,7 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler) params->param2 = 1; if (!getProgress().isNightTime) { - getSound()->playSound(kEntityChapters, "ARRIVE", kFlag8); + getSound()->playSound(kEntityChapters, "ARRIVE", kVolume8); getSoundQueue()->processEntries(); } } @@ -1755,7 +1755,7 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler) params->param3 = 1; if (!getEvent(kEventLocomotiveMilosDay) && !getEvent(kEventLocomotiveMilosNight)) { - getSound()->playSound(kEntityChapters, "ARRIVE", kFlag8); + getSound()->playSound(kEntityChapters, "ARRIVE", kVolume8); getSoundQueue()->processEntries(); } } @@ -1868,7 +1868,7 @@ void Chapters::enterExitStation(const SavePoint &savepoint, bool isEnteringStati void Chapters::enterExitHelper(bool isEnteringStation) { EXPOSE_PARAMS(EntityData::EntityParametersSIIS); - getSound()->playSound(kEntityChapters, isEnteringStation ? "ARRIVE" : "DEPART", kFlag8); + getSound()->playSound(kEntityChapters, isEnteringStation ? "ARRIVE" : "DEPART", kVolume8); getSoundQueue()->processEntries(); getObjects()->update(kObjectHandleOutsideLeft, kEntityPlayer, kObjectLocation1, kCursorNormal, isEnteringStation ? kCursorNormal : kCursorHand); diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index 4a714e2852..af06d610e7 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -249,7 +249,7 @@ IMPLEMENT_FUNCTION_NOSETUP(7, Coudert, playSound16) break; case kActionDefault: - getSound()->playSound(kEntityCoudert, (char *)¶ms->seq1, kFlagDefault); + getSound()->playSound(kEntityCoudert, (char *)¶ms->seq1, kVolumeFull); break; case kActionCallback: diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 22bfe6773e..627ab834ab 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -972,7 +972,7 @@ protected: * @param resetItem true to reset item. * @param flag sound flag */ - void playSound(const SavePoint &savepoint, bool resetItem = false, SoundFlag flag = kFlagInvalid); + void playSound(const SavePoint &savepoint, bool resetItem = false, SoundFlag flag = kSoundVolumeEntityDefault); /** * Draws the entity diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index 981ad461d6..108f3c1186 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -87,12 +87,12 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION_S(5, Gendarmes, doDialogFullVolume) - handleAction(savepoint, true, kFlagDefault); + handleAction(savepoint, true, kVolumeFull); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION_I(6, Gendarmes, doWait, uint32) - handleAction(savepoint, true, kFlagInvalid, true); + handleAction(savepoint, true, kSoundVolumeEntityDefault, true); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -102,7 +102,7 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION_II(8, Gendarmes, doWalk, CarIndex, EntityPosition) - handleAction(savepoint, true, kFlagInvalid, false, true); + handleAction(savepoint, true, kSoundVolumeEntityDefault, false, true); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -223,7 +223,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, doCompartment, CarIndex, EntityPosition) strcpy(arrestSound, "POL1043"); strcat(arrestSound, (char *)¶ms->seq2); - getSound()->playSound(kEntityGendarmes, arrestSound, kFlagInvalid, 30); + getSound()->playSound(kEntityGendarmes, arrestSound, kSoundVolumeEntityDefault, 30); } getData()->location = kLocationInsideCompartment; @@ -266,7 +266,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, trappedCath, CarIndex, EntityPosition, Obj if (params->param6 == 0 || getState()->timeTicks > (uint32)params->param6) { params->param6 = kTimeInvalid; - getSound()->playSound(kEntityGendarmes, "POL1046A", kFlagDefault); + getSound()->playSound(kEntityGendarmes, "POL1046A", kVolumeFull); } if (!Entity::updateParameter(params->param7, getState()->timeTicks, 300)) @@ -279,7 +279,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, trappedCath, CarIndex, EntityPosition, Obj if (getEntities()->isOutsideAlexeiWindow()) getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49); - getSound()->playSound(kEntityGendarmes, "LIB017", kFlagDefault); + getSound()->playSound(kEntityGendarmes, "LIB017", kVolumeFull); setCallback(getProgress().jacket == kJacketBlood ? 3 : 4); setup_savegame(kSavegameTypeEvent, getProgress().jacket == kJacketBlood ? kEventMertensBloodJacket : kEventGendarmesArrestation); @@ -315,7 +315,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, trappedCath, CarIndex, EntityPosition, Obj break; case 2: - getSound()->playSound(kEntityGendarmes, "LIB014", kFlagDefault); + getSound()->playSound(kEntityGendarmes, "LIB014", kVolumeFull); getAction()->playAnimation(kEventGendarmesArrestation); getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverPolice1, true); break; @@ -342,7 +342,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, trappedCath, CarIndex, EntityPosition, Obj break; case 6: - getSound()->playSound(kEntityGendarmes, "LIB014", kFlagDefault); + getSound()->playSound(kEntityGendarmes, "LIB014", kVolumeFull); getAction()->playAnimation(kEventGendarmesArrestation); getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverPolice1, true); break; diff --git a/engines/lastexpress/entities/gendarmes.h b/engines/lastexpress/entities/gendarmes.h index 1cde626a22..c849597edf 100644 --- a/engines/lastexpress/entities/gendarmes.h +++ b/engines/lastexpress/entities/gendarmes.h @@ -87,7 +87,7 @@ public: DECLARE_FUNCTION(chapter5) private: - void handleAction(const SavePoint &savepoint, bool playSound = false, SoundFlag flag = kFlagInvalid, bool checkCallback = false, bool shouldUpdateEntity = false); + void handleAction(const SavePoint &savepoint, bool playSound = false, SoundFlag flag = kSoundVolumeEntityDefault, bool checkCallback = false, bool shouldUpdateEntity = false); }; } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 4ff534eec0..accbe7dcdc 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -1188,7 +1188,7 @@ IMPLEMENT_FUNCTION(24, Kahina, seekCath) getEntities()->updateEntity(kEntityKahina, kCarKronos, kPosition_9270); getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition + 750)); getSavePoints()->push(kEntityKahina, kEntityKronos, kAction235599361); - getSound()->playSound(kEntityKahina, "MUS016", kFlagDefault); + getSound()->playSound(kEntityKahina, "MUS016", kVolumeFull); getProgress().field_44 = 1; params->param1 = true; diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index 1468bce5a7..47a9e85716 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -206,7 +206,7 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool) if (getState()->time >= kTimeCityGalanta) { params->param3 = 0; } else { - getSound()->playSound(kEntityTrain, "LIB050", kFlagDefault); + getSound()->playSound(kEntityTrain, "LIB050", kVolumeFull); getLogic()->gameOver(kSavegameTypeIndex, 0, (getProgress().chapter == kChapter1) ? kSceneGameOverPolice1 : kSceneGameOverPolice2, true); } break; @@ -237,7 +237,7 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool) break; case kActionDefault: - getSound()->playSound(kEntityMahmud, params->param2 ? "MAH1170A" : "MAH1173", kFlagInvalid, 45); + getSound()->playSound(kEntityMahmud, params->param2 ? "MAH1170A" : "MAH1173", kSoundVolumeEntityDefault, 45); getProgress().field_C4 = 1; setCallback(1); diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index 1140bfabe2..db900091c7 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -281,7 +281,7 @@ IMPLEMENT_FUNCTION_S(8, Mertens, playSound16) break; case kActionDefault: - getSound()->playSound(kEntityMertens, (char *)¶ms->seq1, kFlagDefault); + getSound()->playSound(kEntityMertens, (char *)¶ms->seq1, kVolumeFull); break; case kActionCallback: @@ -918,7 +918,7 @@ IMPLEMENT_FUNCTION(17, Mertens, function17) } else { // Got the passenger list, Mertens is looking for it before sitting ENTITY_PARAM(0, 2) = 1; - getSound()->playSound(kEntityMertens, "CON1058", kFlagInvalid, 75); + getSound()->playSound(kEntityMertens, "CON1058", kSoundVolumeEntityDefault, 75); getEntities()->drawSequenceRight(kEntityMertens, "601D"); } @@ -1006,7 +1006,7 @@ IMPLEMENT_FUNCTION(18, Mertens, function18) getEntities()->drawSequenceRight(kEntityMertens, "601A"); } else { ENTITY_PARAM(0, 2) = 1; - getSound()->playSound(kEntityMertens, "CON1058", kFlagInvalid, 75); + getSound()->playSound(kEntityMertens, "CON1058", kSoundVolumeEntityDefault, 75); getEntities()->drawSequenceRight(kEntityMertens, "601D"); } @@ -1222,7 +1222,7 @@ IMPLEMENT_FUNCTION(22, Mertens, function22) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityMertens); if (!getSoundQueue()->isBuffered(kEntityMertens)) - getSound()->playSound(kEntityMertens, "MAH1172", kFlagInvalid, 225); + getSound()->playSound(kEntityMertens, "MAH1172", kSoundVolumeEntityDefault, 225); setCallback(7); setup_function21(kObjectCompartment4, kObject20); diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index d982b5585a..fb139f96ac 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -111,7 +111,7 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION_S(7, Milos, playSound16) - Entity::playSound(savepoint, false, kFlagDefault); + Entity::playSound(savepoint, false, kVolumeFull); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp index f5fa1aab30..0f19b8f44b 100644 --- a/engines/lastexpress/entities/pascale.cpp +++ b/engines/lastexpress/entities/pascale.cpp @@ -142,15 +142,15 @@ IMPLEMENT_FUNCTION(8, Pascale, welcomeSophieAndRebecca) break; case kChapter1: - getSound()->playSound(kEntityPascale, "REB1198", kFlagInvalid, 30); + getSound()->playSound(kEntityPascale, "REB1198", kSoundVolumeEntityDefault, 30); break; case kChapter3: - getSound()->playSound(kEntityPascale, "REB3001", kFlagInvalid, 30); + getSound()->playSound(kEntityPascale, "REB3001", kSoundVolumeEntityDefault, 30); break; case kChapter4: - getSound()->playSound(kEntityPascale, "REB4001", kFlagInvalid, 30); + getSound()->playSound(kEntityPascale, "REB4001", kSoundVolumeEntityDefault, 30); break; } @@ -755,7 +755,7 @@ IMPLEMENT_FUNCTION(24, Pascale, welcomeAbbot) break; case kActionDefault: - getSound()->playSound(kEntityPascale, "ABB3015", kFlagInvalid, 105); + getSound()->playSound(kEntityPascale, "ABB3015", kSoundVolumeEntityDefault, 105); getEntities()->drawSequenceRight(kEntityPascale, "029A1"); getEntities()->drawSequenceRight(kEntityAbbot, "029A2"); break; diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index fec0891ce9..8ef84fdab0 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -322,7 +322,7 @@ IMPLEMENT_FUNCTION_I(17, Rebecca, function17, bool) getData()->location = kLocationOutsideCompartment; if (getProgress().chapter == kChapter3) - getSound()->playSound(kEntityRebecca, "Reb3005", kFlagInvalid, 75); + getSound()->playSound(kEntityRebecca, "Reb3005", kSoundVolumeEntityDefault, 75); if (params->param1) { setCallback(5); @@ -1407,7 +1407,7 @@ label_callback_3: params->param5 = kTimeInvalid; getData()->inventoryItem = kItemNone; - getSound()->playSound(kEntityRebecca, "Reb3008", kFlagInvalid, 60); + getSound()->playSound(kEntityRebecca, "Reb3008", kSoundVolumeEntityDefault, 60); getEntities()->updatePositionEnter(kEntityRebecca, kCarRestaurant, 52); setCallback(3); diff --git a/engines/lastexpress/entities/tables.cpp b/engines/lastexpress/entities/tables.cpp index 8701c012e4..b84c8c66fd 100644 --- a/engines/lastexpress/entities/tables.cpp +++ b/engines/lastexpress/entities/tables.cpp @@ -49,7 +49,7 @@ Tables::Tables(LastExpressEngine *engine, EntityIndex id) : Entity(engine, id) { IMPLEMENT_FUNCTION(1, Tables, chapter1) if (savepoint.action == kActionDefault) { if (_id == kEntityTables2) - getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2); + getSound()->playSoundWithSubtitles("LOOP8A.SND", kSoundTypeWalla | kSoundFlagLooped | kVolume8, kEntityTables2); setup_draw(); } @@ -59,7 +59,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION(2, Tables, chapter2) if (savepoint.action == kActionDefault) { if (_id == kEntityTables2) - getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2); + getSound()->playSoundWithSubtitles("LOOP8A.SND", kSoundTypeWalla | kSoundFlagLooped | kVolume8, kEntityTables2); setup_draw(); } @@ -69,7 +69,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION(3, Tables, chapter3) if (savepoint.action == kActionDefault) { if (_id == kEntityTables2) - getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2); + getSound()->playSoundWithSubtitles("LOOP8A.SND", kSoundTypeWalla | kSoundFlagLooped | kVolume8, kEntityTables2); setup_draw(); } @@ -79,7 +79,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION(4, Tables, chapter4) if (savepoint.action == kActionDefault) { if (_id == kEntityTables2) - getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2); + getSound()->playSoundWithSubtitles("LOOP8A.SND", kSoundTypeWalla | kSoundFlagLooped | kVolume8, kEntityTables2); setup_draw(); } diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index 31de491983..175600fef8 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -1960,7 +1960,7 @@ IMPLEMENT_FUNCTION(48, Tatiana, seekCath) if (!Entity::updateParameter(params->param2, getState()->timeTicks, 5 * (3 * rnd(5) + 30))) goto label_end; - getSound()->playSound(kEntityTatiana, "LIB012", kFlagDefault); + getSound()->playSound(kEntityTatiana, "LIB012", kVolumeFull); params->param2 = 0; label_end: diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp index c8cfe8cca8..e4ff976cae 100644 --- a/engines/lastexpress/entities/train.cpp +++ b/engines/lastexpress/entities/train.cpp @@ -118,7 +118,7 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32) getObjects()->update((ObjectIndex)params->param1, kEntityTrain, kObjectLocation3, kCursorNormal, kCursorNormal); // Knock / closed door sound - getSound()->playSound(kEntityTables5, (params->param2 == 8) ? "LIB012" : "LIB013", kFlagDefault); + getSound()->playSound(kEntityTables5, (params->param2 == 8) ? "LIB012" : "LIB013", kVolumeFull); if (params->param4 && params->param5) { @@ -130,17 +130,17 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32) break; case 1: - getSound()->playSound(kEntityTables5, "Har1014", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1014", kVolumeFull, 15); break; case 2: - getSound()->playSound(kEntityTables5, "Har1013", kFlagDefault, 15); - getSound()->playSound(kEntityTables5, "Har1016", kFlagDefault, 150); + getSound()->playSound(kEntityTables5, "Har1013", kVolumeFull, 15); + getSound()->playSound(kEntityTables5, "Har1016", kVolumeFull, 150); break; case 3: - getSound()->playSound(kEntityTables5, "Har1015A", kFlagDefault, 15); - getSound()->playSound(kEntityTables5, "Har1015", kFlagDefault, 150); + getSound()->playSound(kEntityTables5, "Har1015A", kVolumeFull, 15); + getSound()->playSound(kEntityTables5, "Har1015", kVolumeFull, 150); break; } @@ -164,15 +164,15 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32) break; case 1: - getSound()->playSound(kEntityTables5, "Har1014", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1014", kVolumeFull, 15); break; case 2: - getSound()->playSound(kEntityTables5, "Har1013", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1013", kVolumeFull, 15); break; case 3: - getSound()->playSound(kEntityTables5, "Har1013A", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1013A", kVolumeFull, 15); break; } @@ -191,11 +191,11 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32) break; case 1: - getSound()->playSound(kEntityTables5, "Har1012", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1012", kVolumeFull, 15); break; case 2: - getSound()->playSound(kEntityTables5, "Har1012A", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1012A", kVolumeFull, 15); break; } @@ -207,7 +207,7 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32) ENTITY_PARAM(0, 1)++; if (ENTITY_PARAM(0, 1) <= 1) - getSound()->playSound(kEntityTables5, "Har1014", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1014", kVolumeFull, 15); else params->param8 = 1; @@ -221,7 +221,7 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32) ENTITY_PARAM(0, 4)++; if (ENTITY_PARAM(0, 4) <= 1) { - getSound()->playSound(kEntityTables5, "Har1011", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1011", kVolumeFull, 15); handleCompartmentAction(); return; } @@ -241,11 +241,11 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32) break; case 1: - getSound()->playSound(kEntityTables5, "Har1013", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1013", kVolumeFull, 15); break; case 2: - getSound()->playSound(kEntityTables5, "Har1013A", kFlagDefault, 15); + getSound()->playSound(kEntityTables5, "Har1013A", kVolumeFull, 15); break; } diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp index 11a84f517b..5696a71160 100644 --- a/engines/lastexpress/entities/vassili.cpp +++ b/engines/lastexpress/entities/vassili.cpp @@ -265,7 +265,7 @@ IMPLEMENT_FUNCTION(8, Vassili, function8) getSavePoints()->push(kEntityVassili, kEntityAnna, kAction226031488); getSavePoints()->push(kEntityVassili, kEntityVerges, kAction226031488); getSavePoints()->push(kEntityVassili, kEntityCoudert, kAction226031488); - getSound()->playSound(kEntityVassili, "VAS1027", kFlagDefault); + getSound()->playSound(kEntityVassili, "VAS1027", kVolumeFull); break; } IMPLEMENT_FUNCTION_END @@ -297,7 +297,7 @@ IMPLEMENT_FUNCTION(9, Vassili, function9) setup_seizure(); } else { if (savepoint.action == kActionDefault) - getSound()->playSound(kEntityVassili, "VAS1028", kFlagDefault); + getSound()->playSound(kEntityVassili, "VAS1028", kVolumeFull); } break; } diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index 7811aa880f..9f7d0828e4 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -123,7 +123,7 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION_NOSETUP(5, Verges, playSound16) - Entity::playSound(savepoint, false, kFlagDefault); + Entity::playSound(savepoint, false, kVolumeFull); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -700,7 +700,7 @@ IMPLEMENT_FUNCTION(24, Verges, policeGettingOffTrain) break; case kActionDefault: - getSound()->playSound(kEntityVerges, "POL1101", kFlagDefault); + getSound()->playSound(kEntityVerges, "POL1101", kVolumeFull); break; case kActionCallback: diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp index af7adfa327..31955b72da 100644 --- a/engines/lastexpress/entities/vesna.cpp +++ b/engines/lastexpress/entities/vesna.cpp @@ -1079,7 +1079,7 @@ IMPLEMENT_FUNCTION(30, Vesna, climbing) case kActionNone: if (!params->param1) { if (Entity::updateParameter(params->param3, getState()->timeTicks, 120)) { - getSound()->playSound(kEntityVesna, "Ves5001", kFlagDefault); + getSound()->playSound(kEntityVesna, "Ves5001", kVolumeFull); params->param1 = 1; } } @@ -1144,7 +1144,7 @@ IMPLEMENT_FUNCTION(30, Vesna, climbing) setCallback(2); setup_savegame(kSavegameTypeEvent, kEventCathVesnaTrainTopKilled); } else { - getSound()->playSound(kEntityVesna, "Ves5001", kFlagDefault); + getSound()->playSound(kEntityVesna, "Ves5001", kVolumeFull); params->param1 = 1; } break; -- cgit v1.2.3