ref: e3b6c0f4d232d3f959f4c30c6a8ccec9ca46d126
parent: 57d11561b0bb0c5e2233a2a2eb86d481e98b0cc3
author: Bryan Bishop <[email protected]>
date: Sat May 5 09:30:22 EDT 2012
preprocessor compatibility with text commands
--- a/preprocessor.py
+++ b/preprocessor.py
@@ -13,6 +13,7 @@
PointerLabelAfterBank, \
MoneyByteParam, \
ItemFragment, \
+ TextEndingCommand, \
text_command_classes
macros = command_classes + \
@@ -23,7 +24,7 @@
PeopleEvent,
DataByteWordMacro,
ItemFragment,
- ] #+ [x[1] for x in text_command_classes]
+ ] + [x[1] for x in text_command_classes]
chars = {
"ガ": 0x05,
@@ -435,6 +436,14 @@
# write out a comment showing the 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
# do: all scripting macros