diff options
| author | Bryan Bishop <kanzure@gmail.com> | 2012-01-30 13:46:31 -0600 | 
|---|---|---|
| committer | Bryan Bishop <kanzure@gmail.com> | 2012-01-30 13:46:31 -0600 | 
| commit | f4b8782536cbc5d4d380f7fd4b5c5be8a64e2593 (patch) | |
| tree | 7997cbcf9f02633afdb18542dd22118d1e9802cb | |
| parent | 25df78ecf338b150cb78fbd0409aa8fe47a4a0dd (diff) | |
tool to sort INCBINs by interval length
hg-commit-id: 3d687a971202
| -rw-r--r-- | extras/analyze_incbins.py | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/extras/analyze_incbins.py b/extras/analyze_incbins.py index 22b51c6f..0684b027 100644 --- a/extras/analyze_incbins.py +++ b/extras/analyze_incbins.py @@ -416,6 +416,24 @@ def write_all_labels(all_labels):      fh.write(json.dumps(all_labels))      fh.close() +def analyze_intervals(): +    """find the largest baserom.gbc intervals""" +    global asm +    global processed_incbins +    if asm == None: +        load_asm() +    if processed_incbins == {}: +        isolate_incbins() +        process_incbins() +     +    results = [] +    ordered_keys = sorted(processed_incbins, key=lambda entry: processed_incbins[entry]["interval"]) +    ordered_keys.reverse() +    for key in ordered_keys: +        results.append(processed_incbins[key]) + +    return results +  if __name__ == "__main__":      #load map headers      load_rom() | 
