From b38bec53b359829d34e8ca7104e77f8ec725475a Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sat, 5 May 2012 02:15:47 -0500 Subject: temporary and horrible fix to applymovement scripts original-commit-id: 0357e1e2f0846d9ccbf199d22de005e1b24fd13d --- crystal.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'crystal.py') diff --git a/crystal.py b/crystal.py index 651153c..6ab7713 100644 --- a/crystal.py +++ b/crystal.py @@ -1880,7 +1880,7 @@ class DataByteWordMacro(Command): 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 @@ class MovementCommand(Command): # 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 @@ class ApplyMovementData: # 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 -- cgit v1.2.3