diff options
| author | Littleboy | 2011-06-02 18:26:37 -0400 | 
|---|---|---|
| committer | Littleboy | 2011-06-02 18:26:37 -0400 | 
| commit | b384bb4a861b08dbbb42b14019f5b991a52a1b0f (patch) | |
| tree | 4dc03860b14ded99df1a5629ab2a9ec6e98b1cb2 | |
| parent | be7064c25ed2702457ea8c3e84a1a8a7f397c5c5 (diff) | |
| download | scummvm-rg350-b384bb4a861b08dbbb42b14019f5b991a52a1b0f.tar.gz scummvm-rg350-b384bb4a861b08dbbb42b14019f5b991a52a1b0f.tar.bz2 scummvm-rg350-b384bb4a861b08dbbb42b14019f5b991a52a1b0f.zip  | |
LASTEXPRESS: Replace sprintf() usage with Common::String::format()
| -rw-r--r-- | engines/lastexpress/game/sound.cpp | 14 | 
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) {  | 
