diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-05-23 17:56:34 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-05-23 17:56:34 -0500 |
commit | 38eae01fcd134b4ef55ae8cac62626ff52015687 (patch) | |
tree | 65bd045bfc4f83fc51ed29266e33867e2a43c4c7 /extras/crystal.py | |
parent | 1663472cf61e999168c2ba2a4b5f55de56c95c91 (diff) |
fix PokedexText
Diffstat (limited to 'extras/crystal.py')
-rw-r--r-- | extras/crystal.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/extras/crystal.py b/extras/crystal.py index ec1084dc9..44635658d 100644 --- a/extras/crystal.py +++ b/extras/crystal.py @@ -2325,8 +2325,8 @@ class MainText(TextCommand): offset = self.address # the code below assumes we're jumping past a $0 byte - if use_zero == False: - offset = offset - 1 + if self.use_zero == False: + offset = offset -1 # read until $50, $57 or $58 (not sure about $58...) jump57 = how_many_until(chr(0x57), offset) @@ -2356,10 +2356,10 @@ class MainText(TextCommand): if self.size < 2 or len(self.bytes) < 1: raise Exception, "$0 text command can't end itself with no follow-on bytes" - if use_zero: + if self.use_zero: output = "db $0" else: - output += "db " + output = "" # db $0, $57 or db $0, $50 or w/e if self.size == 2 and len(self.bytes) == 1: @@ -2379,6 +2379,10 @@ class MainText(TextCommand): # has a $50 or $57 been passed yet? end = False + if not self.use_zero: + new_line = True + was_comma = False + for byte in self.bytes: if end: raise Exception, "the text ended due to a $50 or $57 but there are more bytes?" |