ref: 0357e1e2f0846d9ccbf199d22de005e1b24fd13d
parent: a9d376719882f7e6dcaa4ebb272ef47dfab40054
author: Bryan Bishop <[email protected]>
date: Fri May 4 22:15:47 EDT 2012
temporary and horrible fix to applymovement scripts
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -1880,7 +1880,7 @@
class MovementCommand(Command):
# by default.. handle all the <$45s
- id = [0, 4, 8, 0x0C, 0x10, 0x14, 0x18, 0x1C, 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x3A, 0x3B, 0x3D]
+ #id = [0, 4, 8, 0x0C, 0x10, 0x14, 0x18, 0x1C, 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x3A, 0x3B, 0x3D]
# the vast majority of movement commands do not end the movement script
end = False
@@ -1902,13 +1902,17 @@
# return []
def parse(self):
- if ord(rom[self.address]) < 0x45:
- # this is mostly handled in to_asm
- pass
- else:
- Command.parse(self)
+ self.byte = ord(rom[self.address])
+ #
+ #if ord(rom[self.address]) < 0x45:
+ # # this is mostly handled in to_asm
+ # pass
+ #else:
+ # Command.parse(self)
def to_asm(self):
+ return "db $%.2x"%(self.byte)
+
if ord(rom[self.address]) < 0x38:
byte = ord(rom[self.address])
@@ -2044,6 +2048,10 @@
# certain commands will end the movement engine
end = cls.end
+
+ # temporary fix for applymovement scripts
+ if ord(rom[current_address]) == 0x47:
+ end = True
# skip past the command's parameter bytes to go to the next command
current_address += cls.size