From 44ba7f97a96a7c20e71c5003357f4f6e02894831 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 5 Apr 2008 14:28:24 +0000 Subject: Fixed regression from previous commit svn-id: r31410 --- engines/saga/sndres.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index 2a5c319140..fd1d09038e 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -186,20 +186,16 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff if (_vm->getGameType() == GType_IHNM && _vm->isMacResources()) { Common::File soundFile; char soundFileName[40]; - int dirIndex = 0; + int dirIndex = floor((float)(resourceId / 64)); if ((context->fileType & GAME_VOICEFILE) != 0) { - dirIndex = floor((float)(resourceId / 64)); - if (_voiceSerial == 0) { sprintf(soundFileName, "Voices/VoicesS/Voices%d/VoicesS%03x", dirIndex, resourceId); } else { sprintf(soundFileName, "Voices/Voices%d/Voices%d/Voices%d%03x", _voiceSerial, dirIndex, _voiceSerial, resourceId); } } else { - dirIndex = floor((float)(resourceId / 64)); - - sprintf(soundFileName, "SFX/SFX%d/SFX%02x", dirIndex, resourceId); + sprintf(soundFileName, "SFX/SFX%d/SFX%03x", dirIndex, resourceId); } soundFile.open(soundFileName); soundResourceLength = soundFile.size(); -- cgit v1.2.3