[Scummvm-git-logs] scummvm master -> 3f3a0a688638fabfdc0d1a540d6d4c208b4493d2

sev- sev at scummvm.org
Mon May 24 22:20:35 UTC 2021


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:
3f3a0a6886 DIRECTOR: Improved support for Mac sounds


Commit: 3f3a0a688638fabfdc0d1a540d6d4c208b4493d2
    https://github.com/scummvm/scummvm/commit/3f3a0a688638fabfdc0d1a540d6d4c208b4493d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-05-25T00:20:01+02:00

Commit Message:
DIRECTOR: Improved support for Mac sounds

Changed paths:
    engines/director/cast.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 5fd4edaef6..86dac2bd1f 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -628,19 +628,14 @@ void Cast::loadSoundCasts() {
 
 		Common::SeekableReadStreamEndian *sndData = NULL;
 
-		switch (tag) {
-		case MKTAG('S', 'N', 'D', ' '):
-			if (_castArchive->hasResource(MKTAG('S', 'N', 'D', ' '), sndId)) {
-				debugC(2, kDebugLoading, "****** Loading 'SND ' id: %d", sndId);
-				sndData = _castArchive->getResource(MKTAG('S', 'N', 'D', ' '), sndId);
-			}
-			break;
-		case MKTAG('s', 'n', 'd', ' '):
-			if (_castArchive->hasResource(MKTAG('s', 'n', 'd', ' '), sndId)) {
-				debugC(2, kDebugLoading, "****** Loading 'snd ' id: %d", sndId);
-				sndData = _castArchive->getResource(MKTAG('s', 'n', 'd', ' '), sndId);
-			}
-			break;
+		if (!_castArchive->hasResource(tag, sndId)) {
+			if (_castArchive->hasResource(MKTAG('s', 'n', 'd', ' '), sndId))
+				tag = MKTAG('s', 'n', 'd', ' ');
+		}
+
+		if (_castArchive->hasResource(tag, sndId)) {
+			debugC(2, kDebugLoading, "****** Loading '%s' id: %d", tag2str(tag), sndId);
+			sndData = _castArchive->getResource(tag, sndId);
 		}
 
 		if (sndData != NULL) {




More information about the Scummvm-git-logs mailing list