mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Update tools/unnamed.py for rgbds 0.6.0 object files
This commit is contained in:
parent
8e135931a6
commit
c61bd0d5a7
@ -90,14 +90,14 @@ for objfile in objects:
|
|||||||
elif magic == b'RGB9':
|
elif magic == b'RGB9':
|
||||||
obj_ver = 10 + unpack_from('<I', file)[0]
|
obj_ver = 10 + unpack_from('<I', file)[0]
|
||||||
|
|
||||||
if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17, 18]:
|
if obj_ver not in [6, 10, 11, 12, 13, 15, 16, 17, 18, 19]:
|
||||||
print(f"Error: File '{objfile}' is of an unknown format.", file=sys.stderr)
|
print(f"Error: File '{objfile}' is of an unknown format.", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
num_symbols = unpack_from('<I', file)[0]
|
num_symbols = unpack_from('<I', file)[0]
|
||||||
unpack_from('<I', file) # skip num sections
|
unpack_from('<I', file) # skip num sections
|
||||||
|
|
||||||
if obj_ver in [16, 17, 18]:
|
if obj_ver in [16, 17, 18, 19]:
|
||||||
node_filenames = []
|
node_filenames = []
|
||||||
num_nodes = unpack_from('<I', file)[0]
|
num_nodes = unpack_from('<I', file)[0]
|
||||||
for x in range(num_nodes):
|
for x in range(num_nodes):
|
||||||
@ -117,7 +117,7 @@ for objfile in objects:
|
|||||||
sym_type = symtype(unpack_from('<B', file)[0] & 0x7f)
|
sym_type = symtype(unpack_from('<B', file)[0] & 0x7f)
|
||||||
if sym_type == symtype.IMPORT:
|
if sym_type == symtype.IMPORT:
|
||||||
continue
|
continue
|
||||||
if obj_ver in [16, 17, 18]:
|
if obj_ver in [16, 17, 18, 19]:
|
||||||
sym_fileno = unpack_from('<I', file)[0]
|
sym_fileno = unpack_from('<I', file)[0]
|
||||||
sym_filename = node_filenames[sym_fileno]
|
sym_filename = node_filenames[sym_fileno]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user