mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Panning effect
This commit is contained in:
parent
989d376056
commit
a8d751a0ef
|
@ -123,7 +123,7 @@ pub fn parse_module(module: &Module) -> TokenStream {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let (mut volume, panning) = match slot.volume {
|
let (mut volume, mut panning) = match slot.volume {
|
||||||
0x10..=0x50 => (Some((slot.volume - 0x10) as f64 / 64.0), None),
|
0x10..=0x50 => (Some((slot.volume - 0x10) as f64 / 64.0), None),
|
||||||
0xC0..=0xCF => (
|
0xC0..=0xCF => (
|
||||||
None,
|
None,
|
||||||
|
@ -136,6 +136,10 @@ pub fn parse_module(module: &Module) -> TokenStream {
|
||||||
volume = Some(slot.effect_parameter as f64 / 255.0);
|
volume = Some(slot.effect_parameter as f64 / 255.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if slot.effect_type == 0x8 {
|
||||||
|
panning = Some(Num::new(slot.effect_parameter as i16 - 128) / 128);
|
||||||
|
}
|
||||||
|
|
||||||
if sample == 0 {
|
if sample == 0 {
|
||||||
if slot.volume == 0 && slot.effect_type == 0 {
|
if slot.volume == 0 && slot.effect_type == 0 {
|
||||||
pattern_data.push(agb_tracker_interop::PatternSlot {
|
pattern_data.push(agb_tracker_interop::PatternSlot {
|
||||||
|
|
Loading…
Reference in a new issue