1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-06-07 17:11:50 +00:00

Fix sym_info.py for older Python (#2557)

This commit is contained in:
Dragorn421 2025-05-29 08:26:58 +02:00 committed by GitHub
parent e991255a45
commit d62bf87542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -233,9 +233,9 @@ def find_symbols_by_name(
def print_map_file(map_file: mapfile_parser.mapfile.MapFile, *, colors: bool): def print_map_file(map_file: mapfile_parser.mapfile.MapFile, *, colors: bool):
for segment in map_file: for segment in map_file:
print( print(
f"{colorama.Fore.GREEN if colors else ""}" f"{colorama.Fore.GREEN if colors else ''}"
f"{segment.name}" f"{segment.name}"
f"{colorama.Fore.RESET if colors else ""}" f"{colorama.Fore.RESET if colors else ''}"
) )
for file in segment: for file in segment:
# Ignore debug sections # Ignore debug sections
@ -246,9 +246,9 @@ def print_map_file(map_file: mapfile_parser.mapfile.MapFile, *, colors: bool):
): ):
continue continue
print( print(
f"{colorama.Fore.CYAN if colors else ""}" f"{colorama.Fore.CYAN if colors else ''}"
f" {file.asStr()}" f" {file.asStr()}"
f"{colorama.Fore.RESET if colors else ""}" f"{colorama.Fore.RESET if colors else ''}"
) )
for sym in file: for sym in file:
vram_str = f"{sym.vram:08X}" vram_str = f"{sym.vram:08X}"