summaryrefslogtreecommitdiff
path: root/preprocessor.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-08-28 16:30:47 -0500
committerBryan Bishop <kanzure@gmail.com>2013-08-28 16:30:47 -0500
commit0236b59360d51938303b234747ad7ad5d5f3845b (patch)
tree3550b40e3ce08c22d8b1bb6c6d17527d0c454f37 /preprocessor.py
parentddc4a929058ff103cac5743ca39bb8e4b520ee90 (diff)
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.
Diffstat (limited to 'preprocessor.py')
-rw-r--r--preprocessor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/preprocessor.py b/preprocessor.py
index 3b49af835..6b2dc298f 100644
--- a/preprocessor.py
+++ b/preprocessor.py
@@ -557,8 +557,8 @@ def macro_translator(macro, token, line):
output += ("db " + params[index+1].strip() + "\n")
index += 2
correction += 1
- elif size == 3 and issubclass(param_klass, MoneyByteParam):
- output += ("db " + MoneyByteParam.from_asm(param) + "\n")
+ elif size == 3 and "from_asm" in dir(param_klass):
+ output += ("db " + param_klass.from_asm(param) + "\n")
index += 1
else:
raise Exception, "dunno what to do with this macro " + \