aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/game/sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lastexpress/game/sound.cpp')
-rw-r--r--engines/lastexpress/game/sound.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/engines/lastexpress/game/sound.cpp b/engines/lastexpress/game/sound.cpp
index 81ed97481c..63efd182a8 100644
--- a/engines/lastexpress/game/sound.cpp
+++ b/engines/lastexpress/game/sound.cpp
@@ -821,12 +821,8 @@ void SoundManager::playSoundEvent(EntityIndex entity, byte action, byte a3) {
break;
}
- if (_action) {
- sprintf((char *)&filename, "LIB%03d.SND", _action);
-
- if (flag)
- playSoundWithSubtitles((char*)&filename, flag, kEntityPlayer, a3);
- }
+ if (_action && flag)
+ playSoundWithSubtitles(Common::String::format("LIB%03d.SND", _action), flag, kEntityPlayer, a3);
}
void SoundManager::playSteam(CityIndex index) {
@@ -885,10 +881,8 @@ void SoundManager::playFightSound(byte action, byte a4) {
break;
}
- if (_action) {
- sprintf((char *)&filename, "LIB%03d.SND", _action);
- playSound(kEntityTrain, (char*)&filename, kFlagDefault, a4);
- }
+ if (_action)
+ playSound(kEntityTrain, Common::String::format("LIB%03d.SND", _action), kFlagDefault, a4);
}
void SoundManager::playDialog(EntityIndex entity, EntityIndex entityDialog, FlagType flag, byte a4) {