From 3976fd93ea1d404a011ac3ea6572ed784b51713f Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Sat, 5 Aug 2023 22:29:31 +0100 Subject: [PATCH] Correctly interpret F00 --- tracker/agb-xm-core/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tracker/agb-xm-core/src/lib.rs b/tracker/agb-xm-core/src/lib.rs index 4396293c..c1200c68 100644 --- a/tracker/agb-xm-core/src/lib.rs +++ b/tracker/agb-xm-core/src/lib.rs @@ -343,13 +343,13 @@ pub fn parse_module(module: &Module) -> TokenStream { 0xC => PatternEffect::NoteCut((slot.effect_parameter & 0xf).into()), _ => PatternEffect::None, }, - 0xF => { - if slot.effect_parameter < 0x20 { - PatternEffect::SetTicksPerStep(slot.effect_parameter as u32) - } else { - PatternEffect::None - } - } + 0xF => match slot.effect_parameter { + 0 => PatternEffect::SetTicksPerStep(u32::MAX), + 1..=0x20 => PatternEffect::SetTicksPerStep(slot.effect_parameter as u32), + 0x21.. => PatternEffect::SetFramesPerTick(bpm_to_frames_per_tick( + slot.effect_parameter as u32, + )), + }, _ => PatternEffect::None, };