summaryrefslogtreecommitdiff
path: root/extras/analyze_texts.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-01-11 02:15:37 -0600
committerBryan Bishop <kanzure@gmail.com>2012-01-11 02:15:37 -0600
commit09289d049b77858fe4c60935722a14cd91f50fd5 (patch)
tree1d5441fdfd38512694f59963cbe183452cd2e633 /extras/analyze_texts.py
parent5173776c1af2caace5f2215e7fe9d688d8003fcd (diff)
calculate usage count for undone texts
hg-commit-id: d3d02d17f44b
Diffstat (limited to 'extras/analyze_texts.py')
-rw-r--r--extras/analyze_texts.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/extras/analyze_texts.py b/extras/analyze_texts.py
index 1346f632..4d089975 100644
--- a/extras/analyze_texts.py
+++ b/extras/analyze_texts.py
@@ -469,6 +469,7 @@ def is_label_in_asm(label):
return False
def find_undone_texts():
+ usable_table = {}
if analyze_incbins.asm == None:
analyze_incbins.load_asm()
@@ -492,6 +493,15 @@ def find_undone_texts():
if not is_label_in_asm(label):
print label + " map_id=" + str(map_id) + " text_id=" + str(text_id) + " at " + hex(address) + " byte is: " + hex(ord(extract_maps.rom[address]))
+ if not address in usable_table.keys():
+ usable_table[address] = 1
+ else:
+ usable_table[address] += 1
+
+ print "\n\n which ones are priority?"
+ sorted_results = sorted(usable_table.iteritems(), key=itemgetter(1), reverse=True)
+ for result in sorted_results:
+ print str(result[1]) + " times: " + hex(result[0])
if __name__ == "__main__":
extract_maps.load_rom()