You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
move allowed_lengths for music macros out
This moves the allowed_lengths setting out of the preprocessor. Special cases should not be hardcoded in the preprocessor.
This commit is contained in:
@ -490,12 +490,6 @@ def macro_translator(macro, token, line):
|
||||
else:
|
||||
allowed_lengths = [allowed_length]
|
||||
|
||||
if macro.macro_name == "notetype":
|
||||
allowed_lengths = [1,2]
|
||||
elif macro.macro_name == "togglenoise" \
|
||||
or macro.macro_name == "sfxtogglenoise":
|
||||
allowed_lengths = [0,1]
|
||||
|
||||
assert len(params) in allowed_lengths, \
|
||||
"mismatched number of parameters on this line: " + \
|
||||
original_line
|
||||
@ -589,4 +583,4 @@ def read_line(l):
|
||||
sys.stdout.write(comment)
|
||||
|
||||
for l in sys.stdin:
|
||||
read_line(l)
|
||||
read_line(l)
|
||||
|
Reference in New Issue
Block a user