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

mduggan mgithub at guarana.org
Sun May 3 13:53:18 UTC 2020


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:
a98617a843 AUDIO: Correct small errors in AMF loader


Commit: a98617a8432d1eb7d49ad49678ba1224cc896a73
    https://github.com/scummvm/scummvm/commit/a98617a8432d1eb7d49ad49678ba1224cc896a73
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-05-03T22:52:45+09:00

Commit Message:
AUDIO: Correct small errors in AMF loader

Crusader menu music now plays correctly, woo.

Changed paths:
    audio/mods/module_mod_xm_s3m.cpp


diff --git a/audio/mods/module_mod_xm_s3m.cpp b/audio/mods/module_mod_xm_s3m.cpp
index 8dba1f1afc..b7a6a89813 100644
--- a/audio/mods/module_mod_xm_s3m.cpp
+++ b/audio/mods/module_mod_xm_s3m.cpp
@@ -854,7 +854,7 @@ bool ModuleModXmS3m::loadAmf(Common::SeekableReadStream &st) {
 		st.read((byte *)sample.name, 22);
 		sample.name[22] = '\0';
 
-		sample.finetune = static_cast<int8>(st.readByte() << 4);
+		sample.finetune = st.readSByte();
 		sample.volume = st.readByte();
 		sample.relNote = st.readSByte(); // aka "transpose"
 		sample.length = st.readUint32LE();
@@ -862,7 +862,7 @@ bool ModuleModXmS3m::loadAmf(Common::SeekableReadStream &st) {
 		sample.loopLength = st.readUint32LE();
 
 		if (sample.loopStart + sample.loopLength > sample.length) {
-			 sample.loopLength = sample.length - sample.loopStart;
+			sample.loopLength = sample.length - sample.loopStart;
 		}
 		if (sample.loopLength < 4) {
 			sample.loopStart = sample.length;
@@ -890,14 +890,14 @@ bool ModuleModXmS3m::loadAmf(Common::SeekableReadStream &st) {
 				Note &n = patterns[i].notes[row * 8 + channel];
 				uint8 note = st.readByte();
 				if (note != 0) {
-					note = note + 13;
+					note = note + 1;
 				}
 				n.key = note;
 				n.instrument = st.readByte();
 				n.effect = st.readByte();
 				n.param = st.readByte();
 				// TODO: copied from libmodplug .. is this needed?
-				if (n.effect < 1 || n.effect >= 0x0f) {
+				if (n.effect < 1 || n.effect > 0x0f) {
 					n.effect = n.param = 0;
 				}
 				// TODO: copied from mod loader.. is this needed?




More information about the Scummvm-git-logs mailing list