From 576d94b013b8fecbc7def4224414085f7431b97f Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 15 Feb 2023 13:47:06 -0500 Subject: [PATCH] Fix STRG chunk for Wii U DKCTF --- CPakFile.bt | 10 ++++++++-- Common.bt | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CPakFile.bt b/CPakFile.bt index af6a5cb..7774c20 100644 --- a/CPakFile.bt +++ b/CPakFile.bt @@ -83,8 +83,14 @@ typedef struct // Byteswapped uint32 type ; GUID id; - uint32 length; - char name[length]; + // Wii U DKCTF uses a null terminated string here + // but PACK/TOCC version is the same + if (!isDKCTF || ReadByte() == 0) { + uint32 length; + char name[length]; + } else { + string name; + } } StringEntry < name=(Str("%s (%s) %s", name, FourCCInt(type), GUIDToString(id))) >; diff --git a/Common.bt b/Common.bt index 80ea25d..2c957a3 100644 --- a/Common.bt +++ b/Common.bt @@ -72,6 +72,7 @@ local GUID GUIDZero ; typedef enum { + NONE = 0x0, LZSS_8 = 0x1, LZSS_16 = 0x2, LZSS_32 = 0x3,