papermario/tools/sort_symbol_addrs.py
Alex Bates d22bd18f98
Disassemble Star Power scripts (#584)
* fix diff_evt.py

* document UW/UF based on @SeekyCt's advice

* fix star_rod_idx_to_c.py

* migrate battle/star/focus data

* use N() where possible

* rm data.s

* update symbol_addrs

* refresh

* lullaby

* star storm

* chill out

* fix float problems (sad)

* smooch

* time out

* up and away

* star beam

* peach beam

* peach focus

* peach dash

* rm old data

* Assorted Decomp Across The Galaxy (#574)

* popup_menu_update & other

* a bunch of 190B20

* starting load_player_actor

* load_player_actor

* blorp

* load_partner_actor

* fx_11_main

* fx_11 done

* cleanup

* fx_12

* 3 encounter_api funcs

* encounter_api done

* some 20ec0 funcs

* clean

* PR comments, warnings

* name btl_actorHomePositions

* PR comments

* merge

* Introduce SPRITE_PIXEL_SCALE (#580)

* fix func_80273444 warns

* make end of data explicit in splat.yaml

* lol

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
Co-authored-by: Alexander Faßbender <31699028+Brotenko@users.noreply.github.com>
2021-12-29 02:11:07 +09:00

28 lines
685 B
Python
Executable File

#!/usr/bin/python3
from collections import OrderedDict
import os
import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
syms = {}
for version in ["us", "jp"]:
file_path = os.path.join(script_dir, f"../ver/{version}/symbol_addrs.txt")
with open(file_path) as f:
symbol_lines = f.readlines()
for line in symbol_lines:
addr_text = line.split(" = ")[1][:10]
addr = int(addr_text, 0)
if addr in syms:
print("Duplicate address: " + addr_text)
sys.exit(55)
syms[addr] = line
with open(file_path, newline="\n", mode="w") as f:
for addr in sorted(syms):
f.write(syms[addr])