SCUMM: DiMUSE: Remove unused variables

Also made the return code prettier
This commit is contained in:
Andrea Boscarino 2022-01-16 22:44:16 +01:00 committed by GitHub
parent b1fb0bce6d
commit fffdc507ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {