mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-04-24 23:27:03 -05:00
TextPointerLabelParam sometimes doesn't point to anything useful
original-commit-id: 90cee9191e01720656819eef906fb5053108e606
This commit is contained in:
parent
ed02842315
commit
86cb81a9d5
|
|
@ -1517,6 +1517,7 @@ class RawTextPointerLabelParam(PointerLabelParam):
|
|||
class TextPointerLabelParam(PointerLabelParam):
|
||||
"""this is a pointer to a text script"""
|
||||
bank = False
|
||||
text = None
|
||||
def parse(self):
|
||||
PointerLabelParam.parse(self)
|
||||
address = calculate_pointer_from_bytes_at(self.address, bank=self.bank)
|
||||
|
|
@ -1524,8 +1525,11 @@ class TextPointerLabelParam(PointerLabelParam):
|
|||
self.text = parse_text_engine_script_at(address, map_group=self.map_group, map_id=self.map_id, force=self.force, debug=self.debug)
|
||||
|
||||
def get_dependencies(self, recompute=False, global_dependencies=set()):
|
||||
global_dependencies.add(self.text)
|
||||
return [self.text]
|
||||
if self.text:
|
||||
global_dependencies.add(self.text)
|
||||
return [self.text]
|
||||
else:
|
||||
return []
|
||||
|
||||
class MovementPointerLabelParam(PointerLabelParam):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user