aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/sound/sound.cpp
diff options
context:
space:
mode:
authorEvgeny Grechnikov2018-10-20 16:35:23 +0300
committerEvgeny Grechnikov2018-10-20 16:35:23 +0300
commitaf580eaa853b2434c0d237cff49f7f273444a06d (patch)
tree295dd4dfb9fadb348bd46bdc8512e16b19555c58 /engines/lastexpress/sound/sound.cpp
parent9f7ae73a7b7318311e5cc52d36e451cacfba8a02 (diff)
downloadscummvm-rg350-af580eaa853b2434c0d237cff49f7f273444a06d.tar.gz
scummvm-rg350-af580eaa853b2434c0d237cff49f7f273444a06d.tar.bz2
scummvm-rg350-af580eaa853b2434c0d237cff49f7f273444a06d.zip
LASTEXPRESS: save/load sound state
Warning: breaks compatibility with previous savefiles. They were mostly broken anyway, locking any NPC who waited for kActionEndSound when savefile was created.
Diffstat (limited to 'engines/lastexpress/sound/sound.cpp')
-rw-r--r--engines/lastexpress/sound/sound.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp
index 597edd3b11..013a166ea8 100644
--- a/engines/lastexpress/sound/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -137,7 +137,7 @@ void SoundManager::playSound(EntityIndex entity, Common::String filename, SoundF
if (_queue->isBuffered(entity) && entity && entity < kEntityTrain)
_queue->stop(entity);
- SoundFlag currentFlag = (flag == kSoundVolumeEntityDefault) ? getSoundFlag(entity) : (SoundFlag)(flag | 0x80000);
+ SoundFlag currentFlag = (flag == kSoundVolumeEntityDefault) ? getSoundFlag(entity) : (SoundFlag)(flag | kSoundFlagFixedVolume);
// Add .SND at the end of the filename if needed
if (!filename.contains('.'))
@@ -164,12 +164,6 @@ bool SoundManager::playSoundWithSubtitles(Common::String filename, uint32 flag,
if (activateDelay) {
entry->initDelayedActivate(activateDelay);
} else {
- // Get subtitles name
- uint32 size = filename.size();
- while (filename.size() > size - 4)
- filename.deleteLastChar();
-
- entry->showSubtitle(filename);
entry->play();
}
@@ -323,7 +317,7 @@ void SoundManager::playSteam(CityIndex index) {
// Get the new sound entry and show subtitles
SoundEntry *entry = _queue->getEntry(kSoundTagAmbient);
if (entry)
- entry->showSubtitle(cities[index]);
+ entry->setSubtitles(cities[index]);
}
void SoundManager::playFightSound(byte action, byte a4) {