[Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse.cpp,1.62,1.63 dimuse_sndmgr.cpp,1.31,1.32 dimuse_sndmgr.h,1.22,1.23

Pawel Kolodziejski aquadran at users.sourceforge.net
Fri Apr 9 14:59:01 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm/imuse_digi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24594

Modified Files:
	dimuse.cpp dimuse_sndmgr.cpp dimuse_sndmgr.h 
Log Message:
fixed 'region' code

Index: dimuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi/dimuse.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- dimuse.cpp	9 Apr 2004 03:57:18 -0000	1.62
+++ dimuse.cpp	9 Apr 2004 21:44:29 -0000	1.63
@@ -222,7 +222,9 @@
 		return;
 	}
 
-	int jumpId = _sound->getJumpIdByRegion(_track[track].soundHandle, _track[track].curRegion);
+	int jumpId = _sound->getJumpIdByRegionAndHookId(_track[track].soundHandle, _track[track].curRegion, _track[track].curHookId);
+	if (jumpId == -1)
+		jumpId = _sound->getJumpIdByRegionAndHookId(_track[track].soundHandle, _track[track].curRegion, 0);
 	if (jumpId != -1) {
 		int region = _sound->getRegionIdByJumpId(_track[track].soundHandle, jumpId);
 		assert(region != -1);

Index: dimuse_sndmgr.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi/dimuse_sndmgr.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- dimuse_sndmgr.cpp	9 Apr 2004 06:17:20 -0000	1.31
+++ dimuse_sndmgr.cpp	9 Apr 2004 21:44:29 -0000	1.32
@@ -404,12 +404,13 @@
 	return soundHandle->region[region].offset;
 }
 
-int ImuseDigiSndMgr::getJumpIdByRegion(soundStruct *soundHandle, int region) {
+int ImuseDigiSndMgr::getJumpIdByRegionAndHookId(soundStruct *soundHandle, int region, int hookId) {
 	assert(soundHandle && checkForProperHandle(soundHandle));
 	assert(region >= 0 && region < soundHandle->numRegions);
 	for (int l = 0; l < soundHandle->numJumps; l++) {
 		if (soundHandle->jump[l].offset == soundHandle->region[region].offset) {
-			return l;
+			if (soundHandle->jump[l].hookId == hookId)
+				return l;
 		}
 	}
 	

Index: dimuse_sndmgr.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi/dimuse_sndmgr.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- dimuse_sndmgr.h	8 Apr 2004 21:13:25 -0000	1.22
+++ dimuse_sndmgr.h	9 Apr 2004 21:44:29 -0000	1.23
@@ -115,7 +115,7 @@
 	int getNumRegions(soundStruct *soundHandle);
 	int getNumJumps(soundStruct *soundHandle);
 	int getRegionOffset(soundStruct *soundHandle, int region);
-	int getJumpIdByRegion(soundStruct *soundHandle, int region);
+	int getJumpIdByRegionAndHookId(soundStruct *soundHandle, int region, int hookId);
 	int getRegionIdByJumpId(soundStruct *soundHandle, int jumpId);
 	int getJumpHookId(soundStruct *soundHandle, int number);
 	int getJumpFade(soundStruct *soundHandle, int number);





More information about the Scummvm-git-logs mailing list