mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
improve PointerLabelAfterBank handling in preprocessor
This commit is contained in:
parent
0e439e5e08
commit
5dc153880b
@ -454,6 +454,7 @@ def macro_translator(macro, token, line):
|
||||
assert len(params) == allowed_length, \
|
||||
"mismatched number of parameters on this line: " + \
|
||||
original_line
|
||||
|
||||
# --- end of ridiculously long sanity check ---
|
||||
|
||||
index = 0
|
||||
@ -482,9 +483,9 @@ def macro_translator(macro, token, line):
|
||||
index += 2
|
||||
elif size == 3 and issubclass(param_klass, PointerLabelAfterBank):
|
||||
# write the pointer first
|
||||
sys.stdout.write("dw " + params[index+1] + "\n")
|
||||
sys.stdout.write("dw " + params[index] + "\n")
|
||||
# write the bank second
|
||||
sys.stdout.write("db " + params[index] + "\n")
|
||||
sys.stdout.write("db " + params[index+1] + "\n")
|
||||
index += 2
|
||||
else:
|
||||
raise Exception, "dunno what to do with this macro " + \
|
||||
|
Loading…
Reference in New Issue
Block a user