ref: 2489165312a0ee2cc45d2a03edbed7623f124b73
parent: 927d96621a543e4f27d570983259920db4625429
author: Bryan Bishop <[email protected]>
date: Fri May 4 18:03:52 EDT 2012
fix the use of text_command_classes (not the same format as command_classes)
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -458,8 +458,8 @@
# match the command id byte to a scripting command class like MainText
for class_ in text_command_classes:
- if class_.id == cur_byte:
- scripting_command_class = class_
+ if class_[1].id == cur_byte:
+ scripting_command_class = class_[1]
# no matching command found
if scripting_command_class == None:
@@ -487,9 +487,10 @@
# store the script in the global table/map thing
script_parse_table[start_address:current_address] = self
-
- asm_output = "\n".join([command.to_asm() for command in commands])
- print "--------------\n"+asm_output
+
+ if self.debug:
+ asm_output = "\n".join([command.to_asm() for command in commands])
+ print "--------------\n"+asm_output
# store the script
self.commands = commands