aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/menu
diff options
context:
space:
mode:
authorEvgeny Grechnikov2018-10-14 20:05:54 +0300
committerEvgeny Grechnikov2018-10-14 20:08:32 +0300
commit53cd6616c958e4a50644254688aea222177f2ae2 (patch)
treeb0373918c84cf577268056ef0fe65a97f19f7e58 /engines/lastexpress/menu
parent46fe0aafd6996841ee9969da7a8988497baf51b6 (diff)
downloadscummvm-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/menu')
-rw-r--r--engines/lastexpress/menu/menu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp
index 3a17cec6df..65680b3964 100644
--- a/engines/lastexpress/menu/menu.cpp
+++ b/engines/lastexpress/menu/menu.cpp
@@ -315,7 +315,7 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
getFlags()->mouseRightClick = false;
// Play intro music
- getSound()->playSoundWithSubtitles("MUS001.SND", kFlagMusic, kEntityPlayer);
+ getSound()->playSoundWithSubtitles("MUS001.SND", kSoundTypeIntro | kVolumeFull, kEntityPlayer);
// Show The Smoking Car logo
if (animation.load(getArchive("1931.nis")))
@@ -326,7 +326,7 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
} else {
// Only show the quick intro
if (!_hasShownStartScreen) {
- getSound()->playSoundWithSubtitles("MUS018.SND", kFlagMusic, kEntityPlayer);
+ getSound()->playSoundWithSubtitles("MUS018.SND", kSoundTypeIntro | kVolumeFull, kEntityPlayer);
getScenes()->loadScene(kSceneStartScreen);
// Original game waits 60 frames and loops Sound::unknownFunction1 unless the right button is pressed
@@ -1121,7 +1121,7 @@ void Menu::updateTime(uint32 time) {
if (getSoundQueue()->isBuffered(kEntityChapters))
getSoundQueue()->removeFromQueue(kEntityChapters);
- getSound()->playSoundWithSubtitles((_currentTime >= _time) ? "LIB042" : "LIB041", kFlagMenuClock, kEntityChapters);
+ getSound()->playSoundWithSubtitles((_currentTime >= _time) ? "LIB042" : "LIB041", kSoundTypeMenu | kSoundFlagFixedVolume | kVolumeFull, kEntityChapters);
adjustIndex(_currentTime, _time, false);
}
}