[Scummvm-git-logs] scummvm master -> fffdc507ea3a1076b01fd71e97d89ef128a33838

AndywinXp noreply at scummvm.org
Sun Jan 16 21:44:19 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fffdc507ea SCUMM: DiMUSE: Remove unused variables


Commit: fffdc507ea3a1076b01fd71e97d89ef128a33838
    https://github.com/scummvm/scummvm/commit/fffdc507ea3a1076b01fd71e97d89ef128a33838
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2022-01-16T22:44:16+01:00

Commit Message:
SCUMM: DiMUSE: Remove unused variables

Also made the return code prettier

Changed paths:
    engines/scumm/imuse_digi/dimuse_dispatch.cpp


diff --git a/engines/scumm/imuse_digi/dimuse_dispatch.cpp b/engines/scumm/imuse_digi/dimuse_dispatch.cpp
index 5c72c8bc344..c614af829ee 100644
--- a/engines/scumm/imuse_digi/dimuse_dispatch.cpp
+++ b/engines/scumm/imuse_digi/dimuse_dispatch.cpp
@@ -178,8 +178,6 @@ int IMuseDigital::dispatchRestoreStreamZones() {
 
 int IMuseDigital::dispatchAllocateSound(IMuseDigiTrack *trackPtr, int groupId) {
 	IMuseDigiDispatch *trackDispatch;
-	IMuseDigiDispatch *dispatchToDeallocate;
-	IMuseDigiStreamZone *streamZoneList;
 	int navigateMapResult;
 	int32 sizeToFeed = _isEarlyDiMUSE ? 0x800 : 0x4000;
 
@@ -215,13 +213,14 @@ int IMuseDigital::dispatchAllocateSound(IMuseDigiTrack *trackPtr, int groupId) {
 	}
 
 	navigateMapResult = dispatchNavigateMap(trackDispatch);
-	if (!navigateMapResult || navigateMapResult == -3)
-		return 0;
+	if (navigateMapResult && navigateMapResult != -3) {
+		// At this point, something went wrong, so let's release the dispatch
+		debug(5, "IMuseDigital::dispatchAllocateSound(): problem starting sound (%d) in dispatch", trackPtr->soundId);
+		dispatchRelease(trackPtr);
+		return -1;
+	}
 
-	// At this point, something went wrong, so let's release the dispatch
-	debug(5, "IMuseDigital::dispatchAllocateSound(): problem starting sound (%d) in dispatch", trackPtr->soundId);
-	dispatchRelease(trackPtr);
-	return -1;
+	return 0;
 }
 
 int IMuseDigital::dispatchRelease(IMuseDigiTrack *trackPtr) {




More information about the Scummvm-git-logs mailing list