From 0549acc1d987207b6b4e76b672e830ab6e2674b0 Mon Sep 17 00:00:00 2001 From: KungFuFurby Date: Wed, 10 Sep 2025 01:12:07 -0400 Subject: [PATCH] Correct a typo where the wrong effect ID was used for vibrato waveform E4x is the correct ID, not E3x, for MOD and XM. Additionally, updated the coding style for MOD to be more consistent with the pre-existing code, namely by not using hex for the effect IDs being checked. --- src/engine/fileOps/mod.cpp | 10 +++++----- src/engine/fileOps/xm.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/fileOps/mod.cpp b/src/engine/fileOps/mod.cpp index 44df0a35e..8cdd4a61f 100644 --- a/src/engine/fileOps/mod.cpp +++ b/src/engine/fileOps/mod.cpp @@ -356,16 +356,16 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) { case 2: // single note slide down writeFxCol(fxTyp-1+0xf1,fxVal); break; - case 0x3: // vibrato waveform + case 4: // vibrato waveform switch (fxVal&3) { - case 0x0: // sine + case 0: // sine writeFxCol(0xe3,0x00); break; - case 0x1: // ramp down + case 1: // ramp down writeFxCol(0xe3,0x05); break; - case 0x2: // square - case 0x3: + case 2: // square + case 3: writeFxCol(0xe3,0x06); break; } diff --git a/src/engine/fileOps/xm.cpp b/src/engine/fileOps/xm.cpp index 3e533eb11..edc1cf14c 100644 --- a/src/engine/fileOps/xm.cpp +++ b/src/engine/fileOps/xm.cpp @@ -1147,7 +1147,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) { case 0xe: // special... // TODO: implement the rest switch (effectVal>>4) { - case 0x3: // vibrato waveform + case 0x4: // vibrato waveform switch (effectVal&3) { case 0x0: // sine p->data[j][effectCol[k]++]=0xe3;