[Scummvm-git-logs] scummvm master -> 6fdab6d7f7288c833949d7a4cf46c60fba6d65bb

AndywinXp noreply at scummvm.org
Sat Apr 9 17:41:54 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:
6fdab6d7f7 SCUMM: SMUSH: Replace DiMUSE magic numbers with constants


Commit: 6fdab6d7f7288c833949d7a4cf46c60fba6d65bb
    https://github.com/scummvm/scummvm/commit/6fdab6d7f7288c833949d7a4cf46c60fba6d65bb
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2022-04-09T19:41:50+02:00

Commit Message:
SCUMM: SMUSH: Replace DiMUSE magic numbers with constants

Changed paths:
    engines/scumm/smush/smush_player.cpp


diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 06fa7653e40..9f1e10462c6 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -526,7 +526,7 @@ void SmushPlayer::handleIACT(int32 subSize, Common::SeekableReadStream &b) {
 		_iactTable[bufId] = index;
 
 		if (index) {
-			if (_imuseDigital->diMUSEGetParam(bufId + DIMUSE_SMUSH_SOUNDID, 0x100)) {
+			if (_imuseDigital->diMUSEGetParam(bufId + DIMUSE_SMUSH_SOUNDID, DIMUSE_P_SND_TRACK_NUM)) {
 				_imuseDigital->diMUSEFeedStream(bufId + DIMUSE_SMUSH_SOUNDID, dataBuffer, subSize - 18, paused);
 				free(dataBuffer);
 				return;
@@ -544,7 +544,7 @@ void SmushPlayer::handleIACT(int32 subSize, Common::SeekableReadStream &b) {
 				curSoundId = _imuseDigital->diMUSEGetNextSound(curSoundId);
 				if (!curSoundId)
 					break;
-			} while (_imuseDigital->diMUSEGetParam(curSoundId, 0x1800) != 1 || _imuseDigital->diMUSEGetParam(curSoundId, 0x1900) != bufId);
+			} while (_imuseDigital->diMUSEGetParam(curSoundId, DIMUSE_P_SND_HAS_STREAM) != 1 || _imuseDigital->diMUSEGetParam(curSoundId, DIMUSE_P_STREAM_BUFID) != bufId);
 
 			if (!curSoundId) {
 				// There isn't any previous sound running: start a new stream
@@ -557,14 +557,14 @@ void SmushPlayer::handleIACT(int32 subSize, Common::SeekableReadStream &b) {
 				_imuseDigital->diMUSESwitchStream(curSoundId, bufId + DIMUSE_SMUSH_SOUNDID, bufId == 2 ? 1000 : 150, 0, 0);
 			}
 
-			_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, 0x600, volume);
+			_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, DIMUSE_P_VOLUME, volume);
 
 			if (bufId == DIMUSE_BUFFER_SPEECH) {
-				_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, 0x400, DIMUSE_GROUP_SPEECH);
+				_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, DIMUSE_P_GROUP, DIMUSE_GROUP_SPEECH);
 			} else if (bufId == DIMUSE_BUFFER_MUSIC) {
-				_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, 0x400, DIMUSE_GROUP_MUSIC);
+				_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, DIMUSE_P_GROUP, DIMUSE_GROUP_MUSIC);
 			} else {
-				_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, 0x400, DIMUSE_GROUP_SFX);
+				_imuseDigital->diMUSESetParam(bufId + DIMUSE_SMUSH_SOUNDID, DIMUSE_P_GROUP, DIMUSE_GROUP_SFX);
 			}
 
 			_imuseDigital->diMUSEFeedStream(bufId + DIMUSE_SMUSH_SOUNDID, dataBuffer, subSize - 18, paused);




More information about the Scummvm-git-logs mailing list