LASTEXPRESS: Replace sprintf() usage with Common::String::format()

This commit is contained in:
Littleboy 2011-06-02 18:26:37 -04:00
parent be7064c25e
commit b384bb4a86

View File

@ -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) {