diff options
| author | Bryan Bishop <kanzure@gmail.com> | 2012-03-21 21:06:33 -0500 | 
|---|---|---|
| committer | Bryan Bishop <kanzure@gmail.com> | 2012-03-21 21:06:33 -0500 | 
| commit | 08961e4f326e6397e9b1255eb4588e364acd4d73 (patch) | |
| tree | 7d496008e1e4e226fb9aa6deff289a525fa071f5 | |
| parent | 0173ab3c7ff476ea99f08bb5d5c58e8b7ca5129c (diff) | |
parse texts in scripts
| -rw-r--r-- | extras/crystal.py | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/extras/crystal.py b/extras/crystal.py index e2bd3b202..475afa3f6 100644 --- a/extras/crystal.py +++ b/extras/crystal.py @@ -2135,6 +2135,7 @@ def parse_script_engine_script_at(address, map_group=None, map_id=None, force=Fa              size = 4              command["pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=False)              command["memory_id"] = ord(rom[start_address+3]) +            command["text"] = parse_text_engine_script_at(command["pointer"], map_group=map_group, map_id=map_id)          elif command_byte == 0x45: #Stow away item code              info = "Show HIRO put the ITEMNAME in the ITEMPOCKET text box"              long_info = """ @@ -2183,6 +2184,7 @@ def parse_script_engine_script_at(address, map_group=None, map_id=None, force=Fa              size = 4              command["text_group"] = ord(rom[start_address+1])              command["pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=True) +            command["text"] = parse_text_engine_script_at(command["pointer"], map_group=map_group, map_id=map_id)          elif command_byte == 0x4C: #Display text [2b]              info = "Display text by pointer [xxyy]"              long_info = """ @@ -2191,6 +2193,7 @@ def parse_script_engine_script_at(address, map_group=None, map_id=None, force=Fa              """              size = 3              command["pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=False) +            command["text"] = parse_text_engine_script_at(command["pointer"], map_group=map_group, map_id=map_id)          elif command_byte == 0x4D: #Repeat text [xxyy]              info = "Repeat text [FF][FF]"              long_info = """ @@ -2233,7 +2236,8 @@ def parse_script_engine_script_at(address, map_group=None, map_id=None, force=Fa              """              size = 3              end = True -            command["text_pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=False) +            command["pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=False) +            command["text"] = parse_text_engine_script_at(command["pointer"], map_group=map_id, map_id=map_id)          elif command_byte == 0x53: #Text2 code [2b]              info = "Display text (by pointer) and end [xxyy]"              long_info = """ @@ -2243,7 +2247,8 @@ def parse_script_engine_script_at(address, map_group=None, map_id=None, force=Fa              """              size = 3              end = True -            command["text_pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=False) +            command["pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=False) +            command["text"] = parse_text_engine_script_at(command["pointer"], map_group=map_id, map_id=map_id)          elif command_byte == 0x54: #Close text box code              info = "Close text box"              long_info = "Closes a text box which was opened by 47 resp. 4B/4C/4D." @@ -2387,6 +2392,8 @@ def parse_script_engine_script_at(address, map_group=None, map_id=None, force=Fa              size = 5              command["won_pointer"] = calculate_pointer_from_bytes_at(start_address+1, bank=False)              command["lost_pointer"] = calculate_pointer_from_bytes_at(start_address+3, bank=False) +            command["text_won"] = parse_text_engine_script_at(command["won_pointer"], map_group=map_id, map_id=map_id) +            command["text_lost"] = parse_text_engine_script_at(command["lost_pointer"], map_group=map_id, map_id=map_id)          elif command_byte == 0x65: #Script talk-after              #XXX this is a really poor description of whatever this is              info = "? Load the trainer talk-after script" | 
