[Scummvm-git-logs] scummvm master -> 15d6b77c84a6f4db17ef05ecae03043a8b3470df

Strangerke noreply at scummvm.org
Thu Feb 13 00:22:25 UTC 2025


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:
15d6b77c84 M4: RIDDLE: Modify the music parser to match the definition of the doc on moddingwiki


Commit: 15d6b77c84a6f4db17ef05ecae03043a8b3470df
    https://github.com/scummvm/scummvm/commit/15d6b77c84a6f4db17ef05ecae03043a8b3470df
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-02-13T01:21:56+01:00

Commit Message:
M4: RIDDLE: Modify the music parser to match the definition of the doc on moddingwiki

Changed paths:
    engines/got/sound.cpp


diff --git a/engines/got/sound.cpp b/engines/got/sound.cpp
index 33ae9cc8aa5..7168218d790 100644
--- a/engines/got/sound.cpp
+++ b/engines/got/sound.cpp
@@ -195,23 +195,23 @@ void Sound::musicPlay(const char *name, bool override) {
         MU_playNote     endp
         */
 
-		const int hdrCount = file.readUint16LE();
-		file.skip((hdrCount - 1) * 2);
+		const int startLoop = file.readUint16LE();
 
 		while (!file.eos()) {
-			int pause = file.readByte();
-			if (pause & 0x80)
-				pause = ((pause & 0x7f) << 8) | file.readByte();
+			int delayAfter = file.readByte();
+			if (delayAfter & 0x80)
+				delayAfter = ((delayAfter & 0x7f) << 8) | file.readByte();
 
-			const int freq = file.readByte();
-			const int duration = file.readByte();
-			if (freq == 0 && duration == 0) {
+			const int reg = file.readByte();
+			const int value = file.readByte();
+			if (reg == 0 && value == 0) {
 				debug(1, "End of song");
 				break;
 			}
 
-			debug(1, "Pause %d, freq %d, duration %d", pause, freq, duration);
+			debug(1, "DelayAfter %d, OPL reg 0x%X, value %d", delayAfter, reg, value);
 		}
+		debug(1, "looping at pos %d", startLoop);
 #endif
 	}
 }




More information about the Scummvm-git-logs mailing list