[Scummvm-cvs-logs] SF.net SVN: scummvm: [31410] scummvm/trunk/engines/saga/sndres.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Apr 5 16:28:24 CEST 2008


Revision: 31410
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31410&view=rev
Author:   thebluegr
Date:     2008-04-05 07:28:24 -0700 (Sat, 05 Apr 2008)

Log Message:
-----------
Fixed regression from previous commit

Modified Paths:
--------------
    scummvm/trunk/engines/saga/sndres.cpp

Modified: scummvm/trunk/engines/saga/sndres.cpp
===================================================================
--- scummvm/trunk/engines/saga/sndres.cpp	2008-04-05 14:18:32 UTC (rev 31409)
+++ scummvm/trunk/engines/saga/sndres.cpp	2008-04-05 14:28:24 UTC (rev 31410)
@@ -186,20 +186,16 @@
 	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();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list