mirror of https://github.com/pret/pokecrystal.git
use PokedexText to parse text-script-like text without the first bash command
This commit is contained in:
parent
6c8db52d3b
commit
0c778f2930
|
@ -2319,6 +2319,7 @@ class MainText(TextCommand):
|
||||||
"Write text. Structure: [00][Text][0x50 (ends code)]"
|
"Write text. Structure: [00][Text][0x50 (ends code)]"
|
||||||
id = 0x0
|
id = 0x0
|
||||||
macro_name = "do_text"
|
macro_name = "do_text"
|
||||||
|
use_zero = True
|
||||||
|
|
||||||
def parse(self):
|
def parse(self):
|
||||||
offset = self.address
|
offset = self.address
|
||||||
|
@ -2351,7 +2352,10 @@ class MainText(TextCommand):
|
||||||
if self.size < 2 or len(self.bytes) < 1:
|
if self.size < 2 or len(self.bytes) < 1:
|
||||||
raise Exception, "$0 text command can't end itself with no follow-on bytes"
|
raise Exception, "$0 text command can't end itself with no follow-on bytes"
|
||||||
|
|
||||||
|
if use_zero:
|
||||||
output = "db $0"
|
output = "db $0"
|
||||||
|
else:
|
||||||
|
output += "db "
|
||||||
|
|
||||||
# db $0, $57 or db $0, $50 or w/e
|
# db $0, $57 or db $0, $50 or w/e
|
||||||
if self.size == 2 and len(self.bytes) == 1:
|
if self.size == 2 and len(self.bytes) == 1:
|
||||||
|
@ -2503,6 +2507,9 @@ class MainText(TextCommand):
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
class PokedexText(MainText):
|
||||||
|
use_zero = False
|
||||||
|
|
||||||
class WriteTextFromRAM(TextCommand):
|
class WriteTextFromRAM(TextCommand):
|
||||||
"""
|
"""
|
||||||
Write text from ram. Structure: [01][Ram address (2byte)]
|
Write text from ram. Structure: [01][Ram address (2byte)]
|
||||||
|
|
Loading…
Reference in New Issue