master
Ashley N. 2023-08-14 19:46:26 -04:00
parent 5312d0fe8a
commit d541506c6c
1 changed files with 8 additions and 4 deletions

View File

@ -568,12 +568,13 @@ impl DmfModule {
// (channel, patterns)
let mut channel_patterns: Vec<Vec<PatternRow>> = Vec::new();
for _ in 0..system_total_channels {
for channel in 0..system_total_channels {
let mut channel_rows: Vec<PatternRow> = Vec::new();
let num_effects = get_u8( bytes.by_ref() )?;
println!( "Patterns for Ch. {}", channel );
for _ in 0..patterns_count {
for _ in 0..rows_per_pattern {
for row_id in 0..rows_per_pattern {
let note = get_u16( bytes.by_ref() )?;
let octave = get_u16( bytes.by_ref() )?;
@ -616,7 +617,7 @@ impl DmfModule {
effects.push(
Effect{
effect_code,
effect_value: if effect_value != -1 { Some( effect_code ) } else { None }
effect_value: if effect_value != -1 { Some( effect_value ) } else { None }
}
);
}
@ -629,7 +630,10 @@ impl DmfModule {
None
};
channel_rows.push( PatternRow { note, volume, effects, instrument_index } );
let pattern_row = PatternRow { note, volume, effects, instrument_index };
println!( "{}:\t{:?}", row_id, pattern_row );
channel_rows.push( pattern_row );
}
}