1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-26 14:46:16 +00:00

Fix VROM address handling in sym_info.py (#2292)

This commit is contained in:
cadmic 2024-11-17 14:34:23 -08:00 committed by GitHub
parent 17edb82c0d
commit 5881164453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,23 @@ def symInfoMain():
if args.use_expected:
mapPath = "expected" / BUILTMAP
mapfile_parser.frontends.sym_info.doSymInfo(mapPath, args.symname)
# Guess if the input is an VROM/VRAM or a symbol name
as_vram = False
as_vrom = False
as_name = False
try:
address = int(args.symname, 0)
if address >= 0x01000000:
as_vram = True
else:
as_vrom = True
except ValueError:
as_name = True
mapfile_parser.frontends.sym_info.doSymInfo(
mapPath, args.symname, as_vram=as_vram, as_vrom=as_vrom, as_name=as_name
)
if __name__ == "__main__":
symInfoMain()