From 67aa9b3ea94970d83b4ca21ace9c973865e07cab Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Tue, 25 Nov 2025 15:05:58 -0600 Subject: [PATCH] decode_pvrt: add support for twiddled textures --- gen/k_means/python/decode_pvrt.py | 46 +++++++++++++++++++------------ 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/gen/k_means/python/decode_pvrt.py b/gen/k_means/python/decode_pvrt.py index 877495d..b525c8d 100644 --- a/gen/k_means/python/decode_pvrt.py +++ b/gen/k_means/python/decode_pvrt.py @@ -11,23 +11,21 @@ class PVRT: texture_type: int width: int height: int - codebook: list[int] - indices: list[int] + data: list[int] def parse_pvrt_header(buf): header = buf[0:16] - codebook = buf[16:codebook_size + 16] - indices = buf[codebook_size + 16:] + #codebook = buf[16:codebook_size + 16] + #indices = buf[codebook_size + 16:] + data = buf[16:] assert len(header) == 16 - assert len(codebook) == codebook_size - assert header[0:4] == b"PVRT" unpacked = struct.unpack('