summaryrefslogtreecommitdiff
path: root/extras/analyze_texts.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-07 12:11:12 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-07 12:11:12 -0600
commit20c54ccd583d2f847e6f264d7ced057f652dd095 (patch)
tree78482e02e24923e8885c5f1d1b199ea079b119f9 /extras/analyze_texts.py
parent53f6e08cfb0b5ce855b76870e94e66e90f6293b7 (diff)
add more text bytes for abbreviations
hg-commit-id: 95383d94746e
Diffstat (limited to 'extras/analyze_texts.py')
-rw-r--r--extras/analyze_texts.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/extras/analyze_texts.py b/extras/analyze_texts.py
index 61ba6de6..9d2ce8bf 100644
--- a/extras/analyze_texts.py
+++ b/extras/analyze_texts.py
@@ -40,7 +40,7 @@ def process_00_subcommands(start_address, end_address):
"""split this text up into multiple lines
based on subcommands ending each line"""
lines = {}
- subsection = extract_maps.rom[start_address:end_address]
+ subsection = extract_maps.rom[start_address:end_address+1]
line_count = 0
current_line = []
@@ -308,7 +308,8 @@ def parse_text_script(text_pointer, text_id, map_id, txfar=False):
else:
#if len(commands) > 0:
# print "Unknown text command " + hex(command_byte) + " at " + hex(offset) + ", script began with " + hex(commands[0]["type"])
- print "Unknown text command at " + hex(offset) + " - command: " + hex(ord(extract_maps.rom[offset])) + " on map_id=" + str(map_id) + " text_id=" + str(text_id)
+ if debug:
+ print "Unknown text command at " + hex(offset) + " - command: " + hex(ord(extract_maps.rom[offset])) + " on map_id=" + str(map_id) + " text_id=" + str(text_id)
#end at the first unknown command
end = True