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/fight | |
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/fight')
-rw-r--r-- | engines/lastexpress/fight/fighter_anna.cpp | 2 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_ivo.cpp | 2 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_milos.cpp | 4 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_salko.cpp | 2 | ||||
-rw-r--r-- | engines/lastexpress/fight/fighter_vesna.cpp | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/engines/lastexpress/fight/fighter_anna.cpp b/engines/lastexpress/fight/fighter_anna.cpp index 723bd38cf0..4fdb71a6e4 100644 --- a/engines/lastexpress/fight/fighter_anna.cpp +++ b/engines/lastexpress/fight/fighter_anna.cpp @@ -125,7 +125,7 @@ FighterOpponentAnna::FighterOpponentAnna(LastExpressEngine *engine) : Opponent(e _sequences.push_back(loadSequence("2002okml.seq")); _sequences.push_back(loadSequence("2002okm.seq")); - getSound()->playSound(kEntityTables0, "MUS030", kFlagDefault); + getSound()->playSound(kEntityTables0, "MUS030", kVolumeFull); _field_38 = 30; } diff --git a/engines/lastexpress/fight/fighter_ivo.cpp b/engines/lastexpress/fight/fighter_ivo.cpp index 7bd9968da2..d5289ab0b7 100644 --- a/engines/lastexpress/fight/fighter_ivo.cpp +++ b/engines/lastexpress/fight/fighter_ivo.cpp @@ -145,7 +145,7 @@ FighterOpponentIvo::FighterOpponentIvo(LastExpressEngine *engine) : Opponent(eng _sequences.push_back(loadSequence("csdr.seq")); _sequences.push_back(loadSequence("2003l.seq")); - getSound()->playSound(kEntityTables0, "MUS032", kFlagDefault); + getSound()->playSound(kEntityTables0, "MUS032", kVolumeFull); _countdown = 5; _field_38 = 15; diff --git a/engines/lastexpress/fight/fighter_milos.cpp b/engines/lastexpress/fight/fighter_milos.cpp index 5b98b87304..5493d26ca5 100644 --- a/engines/lastexpress/fight/fighter_milos.cpp +++ b/engines/lastexpress/fight/fighter_milos.cpp @@ -109,7 +109,7 @@ void FighterPlayerMilos::update() { _opponent->setSequenceAndDraw(6, kFightSequenceType1); getSoundQueue()->removeFromQueue(kEntityTables0); - getSound()->playSound(kEntityTrain, "MUS029", kFlagDefault); + getSound()->playSound(kEntityTrain, "MUS029", kVolumeFull); handleAction(kFightActionWin); } @@ -149,7 +149,7 @@ FighterOpponentMilos::FighterOpponentMilos(LastExpressEngine *engine) : Opponent _sequences.push_back(loadSequence("2001dbk.seq")); _sequences.push_back(loadSequence("2001wbk.seq")); - getSound()->playSound(kEntityTables0, "MUS027", kFlagDefault); + getSound()->playSound(kEntityTables0, "MUS027", kVolumeFull); _field_38 = 35; } diff --git a/engines/lastexpress/fight/fighter_salko.cpp b/engines/lastexpress/fight/fighter_salko.cpp index c0d15ec183..a11bf292d5 100644 --- a/engines/lastexpress/fight/fighter_salko.cpp +++ b/engines/lastexpress/fight/fighter_salko.cpp @@ -133,7 +133,7 @@ FighterOpponentSalko::FighterOpponentSalko(LastExpressEngine *engine) : Opponent _sequences.push_back(loadSequence("2004ohm.seq")); _sequences.push_back(loadSequence("blank.seq")); - getSound()->playSound(kEntityTables0, "MUS035", kFlagDefault); + getSound()->playSound(kEntityTables0, "MUS035", kVolumeFull); _countdown = 3; _field_38 = 30; diff --git a/engines/lastexpress/fight/fighter_vesna.cpp b/engines/lastexpress/fight/fighter_vesna.cpp index eeb00b821b..eba30faf25 100644 --- a/engines/lastexpress/fight/fighter_vesna.cpp +++ b/engines/lastexpress/fight/fighter_vesna.cpp @@ -151,7 +151,7 @@ FighterOpponentVesna::FighterOpponentVesna(LastExpressEngine *engine) : Opponent _sequences.push_back(loadSequence("2005csbm.seq")); _sequences.push_back(loadSequence("2005oam4.seq")); - getSound()->playSound(kEntityTables0, "MUS038", kFlagDefault); + getSound()->playSound(kEntityTables0, "MUS038", kVolumeFull); _countdown = 4; _field_38 = 30; |