mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
calculate usage count for undone texts
hg-commit-id: d3d02d17f44b
This commit is contained in:
parent
5173776c1a
commit
09289d049b
2 changed files with 11 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue