aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/game/inventory.cpp
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/game/inventory.cpp
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/game/inventory.cpp')
-rw-r--r--engines/lastexpress/game/inventory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index 622d547542..756ecda73f 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -159,7 +159,7 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
_portraitHighlighted = false;
_isOpened = false;
- getSound()->playSoundWithSubtitles("LIB039.SND", kFlagMenuClock, kEntityPlayer);
+ getSound()->playSoundWithSubtitles("LIB039.SND", kSoundTypeMenu | kSoundFlagFixedVolume | kVolumeFull, kEntityPlayer);
getMenu()->show(true, kSavegameTypeIndex, 0);
@@ -638,7 +638,7 @@ void Inventory::drawBlinkingEgg(uint ticks) {
if (globalTimer < 90) {
if ((globalTimer + ticks) >= 90)
- getSound()->playSoundWithSubtitles("TIMER", (SoundFlag)(kFlagType13|kFlagDefault), kEntityPlayer);
+ getSound()->playSoundWithSubtitles("TIMER", kSoundTypeMenu | kVolumeFull, kEntityPlayer);
if (!getSoundQueue()->isBuffered("TIMER"))
setGlobalTimer(0);