ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

commit ba7827f46f5471a47556e74cc4cf7ddfce111041
parent c15838c29b81566b58021880e552b8788280e40b
Author: Olav Sørensen <olav.sorensen@live.no>
Date:   Mon, 30 Oct 2023 13:44:14 +0100

Rename table for less confusion

Diffstat:
Msrc/ft2_module_saver.c | 4++--
Msrc/ft2_tables.c | 2+-
Msrc/ft2_tables.h | 2+-
Msrc/modloaders/ft2_load_mod.c | 4++--
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/ft2_module_saver.c b/src/ft2_module_saver.c @@ -549,8 +549,8 @@ static bool saveMOD(UNICHAR *filenameU) } else { - modPattData[offs+0] = (inst & 0xF0) | ((amigaPeriod[note-1] >> 8) & 0x0F); - modPattData[offs+1] = amigaPeriod[note-1] & 0xFF; + modPattData[offs+0] = (inst & 0xF0) | ((modPeriods[note-1] >> 8) & 0x0F); + modPattData[offs+1] = modPeriods[note-1] & 0xFF; } // FT2 bugfix: if effect is overflowing (0xF in .MOD), set effect and param to 0 diff --git a/src/ft2_tables.c b/src/ft2_tables.c @@ -67,7 +67,7 @@ const uint8_t vibTab[32] = // for normal vibrato/tremolo 255,253,250,244,235,224,212,197,180,161,141,120, 97, 74, 49, 24 }; -const uint16_t amigaPeriod[8 * 12] = // used for .MOD loading/saving +const uint16_t modPeriods[8 * 12] = // used for .MOD loading/saving { 6848, 6464, 6096, 5760, 5424, 5120, 4832, 4560, 4304, 4064, 3840, 3624, 3424, 3232, 3048, 2880, 2712, 2560, 2416, 2280, 2152, 2032, 1920, 1812, diff --git a/src/ft2_tables.h b/src/ft2_tables.h @@ -15,7 +15,7 @@ extern const uint16_t ptPeriods[3 * 12]; extern const uint8_t arpTab[256]; extern const int8_t autoVibSineTab[256]; extern const uint8_t vibTab[32]; -extern const uint16_t amigaPeriod[8 * 12]; +extern const uint16_t modPeriods[8 * 12]; extern const uint16_t linearPeriods[1936]; extern const uint16_t amigaPeriods[1936]; diff --git a/src/modloaders/ft2_load_mod.c b/src/modloaders/ft2_load_mod.c @@ -123,7 +123,7 @@ bool loadMOD(FILE *f, uint32_t filesize) uint16_t period = ((bytes[0] & 0x0F) << 8) | bytes[1]; for (i = 0; i < 8*12; i++) { - if (period >= amigaPeriod[i]) + if (period >= modPeriods[i]) { p->note = (uint8_t)i + 1; break; @@ -181,7 +181,7 @@ bool loadMOD(FILE *f, uint32_t filesize) uint16_t period = ((bytes[0] & 0x0F) << 8) | bytes[1]; for (i = 0; i < 8*12; i++) { - if (period >= amigaPeriod[i]) + if (period >= modPeriods[i]) { p->note = (uint8_t)i + 1; break;