You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
remove another MoneyByteParam special case
This updates the preprocessor to just look for a from_asm method on the class for the parameter it's processing. If there's a from_asm method, then it uses it to spit out the right asm.
This commit is contained in:
@@ -557,8 +557,8 @@ def macro_translator(macro, token, line):
|
|||||||
output += ("db " + params[index+1].strip() + "\n")
|
output += ("db " + params[index+1].strip() + "\n")
|
||||||
index += 2
|
index += 2
|
||||||
correction += 1
|
correction += 1
|
||||||
elif size == 3 and issubclass(param_klass, MoneyByteParam):
|
elif size == 3 and "from_asm" in dir(param_klass):
|
||||||
output += ("db " + MoneyByteParam.from_asm(param) + "\n")
|
output += ("db " + param_klass.from_asm(param) + "\n")
|
||||||
index += 1
|
index += 1
|
||||||
else:
|
else:
|
||||||
raise Exception, "dunno what to do with this macro " + \
|
raise Exception, "dunno what to do with this macro " + \
|
||||||
|
Reference in New Issue
Block a user