mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
preprocessor compatibility with text commands
This commit is contained in:
parent
57d11561b0
commit
e3b6c0f4d2
@ -13,6 +13,7 @@ from extras.crystal import command_classes, \
|
|||||||
PointerLabelAfterBank, \
|
PointerLabelAfterBank, \
|
||||||
MoneyByteParam, \
|
MoneyByteParam, \
|
||||||
ItemFragment, \
|
ItemFragment, \
|
||||||
|
TextEndingCommand, \
|
||||||
text_command_classes
|
text_command_classes
|
||||||
|
|
||||||
macros = command_classes + \
|
macros = command_classes + \
|
||||||
@ -23,7 +24,7 @@ macros = command_classes + \
|
|||||||
PeopleEvent,
|
PeopleEvent,
|
||||||
DataByteWordMacro,
|
DataByteWordMacro,
|
||||||
ItemFragment,
|
ItemFragment,
|
||||||
] #+ [x[1] for x in text_command_classes]
|
] + [x[1] for x in text_command_classes]
|
||||||
|
|
||||||
chars = {
|
chars = {
|
||||||
"ガ": 0x05,
|
"ガ": 0x05,
|
||||||
@ -436,6 +437,14 @@ def macro_translator(macro, token, line):
|
|||||||
# write out a comment showing the original line
|
# write out a comment showing the original line
|
||||||
sys.stdout.write("; original_line: " + original_line)
|
sys.stdout.write("; original_line: " + original_line)
|
||||||
|
|
||||||
|
|
||||||
|
# "db" is a macro because of TextEndingCommand
|
||||||
|
# rgbasm can handle "db" so no preprocessing is required
|
||||||
|
# (don't check its param count)
|
||||||
|
if macro.macro_name == "db" and macro == TextEndingCommand:
|
||||||
|
sys.stdout.write(original_line)
|
||||||
|
return
|
||||||
|
|
||||||
# certain macros don't need an initial byte written
|
# certain macros don't need an initial byte written
|
||||||
# do: all scripting macros
|
# do: all scripting macros
|
||||||
# don't: signpost, warp_def, person_event, xy_trigger
|
# don't: signpost, warp_def, person_event, xy_trigger
|
||||||
|
Loading…
Reference in New Issue
Block a user