From 24c058bc0af611f0fb8da5286dc08ae1837b131c Mon Sep 17 00:00:00 2001 From: mid-kid Date: Tue, 4 Feb 2020 23:19:41 +0100 Subject: [PATCH] Fix tools/unnamed.py for new rgbds object format --- tools/unnamed.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/unnamed.py b/tools/unnamed.py index cea500fcd..2c7cdd389 100755 --- a/tools/unnamed.py +++ b/tools/unnamed.py @@ -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("