diff options
author | Evgeny Grechnikov | 2018-10-14 20:05:54 +0300 |
---|---|---|
committer | Evgeny Grechnikov | 2018-10-14 20:08:32 +0300 |
commit | 53cd6616c958e4a50644254688aea222177f2ae2 (patch) | |
tree | b0373918c84cf577268056ef0fe65a97f19f7e58 /engines/lastexpress/entities/gendarmes.cpp | |
parent | 46fe0aafd6996841ee9969da7a8988497baf51b6 (diff) | |
download | scummvm-rg350-53cd6616c958e4a50644254688aea222177f2ae2.tar.gz scummvm-rg350-53cd6616c958e4a50644254688aea222177f2ae2.tar.bz2 scummvm-rg350-53cd6616c958e4a50644254688aea222177f2ae2.zip |
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.
Diffstat (limited to 'engines/lastexpress/entities/gendarmes.cpp')
-rw-r--r-- | engines/lastexpress/entities/gendarmes.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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; |