mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Specify that it is the volume envelope
This commit is contained in:
parent
826fdd881a
commit
d29a641a44
|
@ -22,7 +22,7 @@ pub struct Sample<'a> {
|
|||
pub should_loop: bool,
|
||||
pub restart_point: u32,
|
||||
pub volume: Num<i16, 8>,
|
||||
pub envelope: Option<usize>,
|
||||
pub volume_envelope: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
@ -176,10 +176,10 @@ impl<'a> quote::ToTokens for Sample<'a> {
|
|||
should_loop,
|
||||
restart_point,
|
||||
volume,
|
||||
envelope,
|
||||
volume_envelope,
|
||||
} = self;
|
||||
|
||||
let envelope = match envelope {
|
||||
let volume_envelope = match volume_envelope {
|
||||
Some(index) => quote!(Some(#index)),
|
||||
None => quote!(None),
|
||||
};
|
||||
|
@ -198,7 +198,7 @@ impl<'a> quote::ToTokens for Sample<'a> {
|
|||
should_loop: #should_loop,
|
||||
restart_point: #restart_point,
|
||||
volume: agb_tracker::__private::Num::from_raw(#volume),
|
||||
envelope: #envelope,
|
||||
volume_envelope: #volume_envelope,
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -377,7 +377,7 @@ pub fn parse_module(module: &Module) -> TokenStream {
|
|||
should_loop: sample.should_loop,
|
||||
restart_point: sample.restart_point,
|
||||
volume: sample.volume,
|
||||
envelope: None,
|
||||
volume_envelope: None,
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
|
Loading…
Reference in a new issue