SINGLE_BASIC => 0x114, # Standard/Light
SINGLE_BEGINNER => 0x414 # Beginner
);
+my %stepchart_text = ();
while (<STDIN>) {
chomp;
}
$text =~ s/[\s\n;]//sg;
- my $code = $difficulty_codes{'SINGLE_' . $difficulty};
- push @stepcharts, make_stepchart_chunk($code, $text); # Also updates $len_beats.
+ $stepchart_text{'SINGLE_' . $difficulty} = $text;
}
}
+# Append the step charts. The ordering matters; the first one in the file seems
+# to be chosen if beginner is unavailable.
+for my $code (qw(SINGLE_BEGINNER SINGLE_BASIC SINGLE_ANOTHER SINGLE_MANIAC)) {
+ next if (!exists($stepchart_text{$code}));
+
+ my $text = $stepchart_text{$code};
+ push @stepcharts, make_stepchart_chunk($difficulty_codes{$code}, $text); # Also updates $len_beats.
+}
+
# Add one measure of margin after the last step.
$len_beats += 4.0;