[Scummvm-git-logs] scummvm master -> 79f151c6aaad58c0d6a8e921b9bfc97faf826b0b

mduggan mgithub at guarana.org
Sat May 2 08:10:47 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:
79f151c6aa AUDIO: Import small fix from latest micromod/ibxm


Commit: 79f151c6aaad58c0d6a8e921b9bfc97faf826b0b
    https://github.com/scummvm/scummvm/commit/79f151c6aaad58c0d6a8e921b9bfc97faf826b0b
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-05-02T17:07:54+09:00

Commit Message:
AUDIO: Import small fix from latest micromod/ibxm

Specifically, 9ff030a (Fix set panning command.)

Changed paths:
    audio/mods/mod_xm_s3m.cpp
    audio/mods/module_mod_xm_s3m.cpp


diff --git a/audio/mods/mod_xm_s3m.cpp b/audio/mods/mod_xm_s3m.cpp
index 3542d2c2fc..b21e63a86f 100644
--- a/audio/mods/mod_xm_s3m.cpp
+++ b/audio/mods/mod_xm_s3m.cpp
@@ -828,7 +828,7 @@ void ModXmS3mStream::updateChannelRow(Channel &channel, Note note) {
 			tremolo(channel);
 			break;
 		case 0x08: /* Set Panning.*/
-			channel.panning = (channel.note.param < 128) ? (channel.note.param << 1) : 255;
+			channel.panning = channel.note.param & 0xFF;
 			break;
 		case 0x0A:
 		case 0x84: /* Vol Slide. */
diff --git a/audio/mods/module_mod_xm_s3m.cpp b/audio/mods/module_mod_xm_s3m.cpp
index 3ea68e5486..ea8b26d6dc 100644
--- a/audio/mods/module_mod_xm_s3m.cpp
+++ b/audio/mods/module_mod_xm_s3m.cpp
@@ -350,14 +350,20 @@ bool ModuleModXmS3m::loadMod(Common::SeekableReadStream &st) {
 			// effect, param
 			byte effect = third & 0x0F;
 			byte param = fourth & 0xff;
-			if(param == 0 && (effect < 3 || effect == 0xA)) {
+			if (param == 0 && (effect < 3 || effect == 0xA)) {
 				effect = 0;
 			}
-			if(param == 0 && (effect == 5 || effect == 6)) {
+			if (param == 0 && (effect == 5 || effect == 6)) {
 				effect -= 2;
 			}
-			if(effect == 8 && numChannels == 4) {
-				effect = param = 0;
+			if (effect == 8) {
+				if (numChannels == 4) {
+					effect = param = 0;
+				} else if (param > 128) {
+					param = 128;
+				} else {
+					param = (param * 255) >> 7;
+				}
 			}
 			patterns[i].notes[idx].effect = effect;
 			patterns[i].notes[idx].param = param;




More information about the Scummvm-git-logs mailing list