From 9072b3c43c2597463f9f65b9e7141cefafbc7c5c Mon Sep 17 00:00:00 2001 From: Mc-muffin <8714476+Mc-muffin@users.noreply.github.com> Date: Mon, 8 Jan 2024 23:05:48 -0500 Subject: [PATCH] bandaid hw fix for scpk --- pythonlib/formats/scpk.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pythonlib/formats/scpk.py b/pythonlib/formats/scpk.py index b8214bc..ac07a2b 100644 --- a/pythonlib/formats/scpk.py +++ b/pythonlib/formats/scpk.py @@ -18,7 +18,7 @@ class scpk_file(): class Scpk(): def __init__(self) -> None: self.unk1 = 0 - self.unk2 = 0 + self.flags = 0 self.files = [] self._rsce = b"" self._rsce_pos = 0 @@ -32,8 +32,9 @@ class Scpk(): self = Scpk() self.unk1 = f.read_uint16() - self.unk2 = f.read_uint16() + self.flags = f.read_uint16() file_amount = f.read_uint32() + assert self.unk1 == 1, "scpk unk1 is not 1!" # version? assert f.read_uint32() == 0, "scpk padding is not zero!" # padding? self.files = [] @@ -61,7 +62,7 @@ class Scpk(): def to_bytes(self): out = MAGIC out += struct.pack("