mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Fix tools/unnamed.py for new rgbds object format
This commit is contained in:
parent
ed44d1cdb7
commit
24c058bc0a
@ -73,8 +73,16 @@ if not objects:
|
||||
files = {}
|
||||
for objfile in objects:
|
||||
f = open(objfile, "rb")
|
||||
if unpack_file("4s", f)[0] != b'RGB6':
|
||||
print("Error: File '%s' is of an unknown format." % filename, file=stderr)
|
||||
obj_ver = None
|
||||
|
||||
magic = unpack_file("4s", f)[0]
|
||||
if magic == b'RGB6':
|
||||
obj_ver = 6
|
||||
elif magic == b'RGB9':
|
||||
obj_ver = 10 + unpack_file("<I", f)[0]
|
||||
|
||||
if obj_ver not in [6, 10]:
|
||||
print("Error: File '%s' is of an unknown format." % objfile, file=stderr)
|
||||
exit(1)
|
||||
|
||||
num_symbols = unpack_file("<II", f)[0]
|
||||
|
Loading…
Reference in New Issue
Block a user