summaryrefslogtreecommitdiff
path: root/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-05-13 21:32:28 -0500
committerBryan Bishop <kanzure@gmail.com>2012-05-13 21:32:28 -0500
commiteffedab1d31c4de3382576b5ad17632aaebf1f17 (patch)
tree881ea8f2d4878bcb7b89cea404dc87214cbb890b /crystal.py
parent8fffbe86b33a0d6a72d0979533504f55f4b0ae5d (diff)
fix unknown MovementCommand parsing
original-commit-id: eaff513b474d01ffe52052a0fe9b7f9d6179b2e9
Diffstat (limited to 'crystal.py')
-rw-r--r--crystal.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/crystal.py b/crystal.py
index b3452c8..ab8f493 100644
--- a/crystal.py
+++ b/crystal.py
@@ -2149,14 +2149,17 @@ class ApplyMovementData:
# temporary fix for applymovement scripts
if ord(rom[current_address]) == 0x47:
end = True
- scripting_command_class = movement_command_classes[0]
# no matching command found
+ xyz = None
if scripting_command_class == None:
- raise Exception, "unable to parse movement command $%.2x in the movement script at %s" % (cur_byte, hex(start_address))
+ scripting_command_class = MovementCommand
+ xyz = True
# create an instance of the command class and let it parse its parameter bytes
cls = scripting_command_class(address=current_address, map_group=self.map_group, map_id=self.map_id, debug=self.debug, force=self.force)
+ if xyz:
+ cls.byte = ord(rom[current_address])
if self.debug:
print cls.to_asm()