summaryrefslogtreecommitdiff
path: root/extras/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-05-05 01:40:28 -0500
committerBryan Bishop <kanzure@gmail.com>2012-05-05 01:40:28 -0500
commita9a1e084a1aeb8235e93351d2ed5dbac66461fe6 (patch)
treefd096fbef8ea5ddce64c8a3983b7683be5e4cc24 /extras/crystal.py
parentadf55937c0c7db80bdd202d6ae176b73fcc08205 (diff)
fix MovementCommand.to_asm return value for id>$45
Diffstat (limited to 'extras/crystal.py')
-rw-r--r--extras/crystal.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/extras/crystal.py b/extras/crystal.py
index b377ad9d0..a4b12f999 100644
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -1908,7 +1908,9 @@ class MovementCommand(Command):
def to_asm(self):
if ord(rom[self.address]) < 0x45:
byte = ord(rom[self.address])
+
base = [0, 4, 8, 0x0C, 0x10, 0x14, 0x18, 0x1C, 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x3A, 0x3B, 0x3D]
+
if byte in base:
modulator = "down"
elif byte in [x+1 for x in base]:
@@ -1922,7 +1924,7 @@ class MovementCommand(Command):
return self.macro_name+" "+modulator
else:
- Command.parse(self)
+ return Command.to_asm(self)
movement_command_classes = inspect.getmembers(sys.modules[__name__], \
lambda obj: inspect.isclass(obj) and \