From dc46ab57cf8dd3bdac743a0bb96dbd8d40625735 Mon Sep 17 00:00:00 2001 From: Lilith Naomi Nightingale Date: Sun, 25 Apr 2021 04:52:27 +0100 Subject: [PATCH] [research] tpGxTexHead --- research/bxon.txt | 24 ------------- research/bxon_types/tpArchiveFileParam.txt | 27 +++++++++++++++ research/bxon_types/tpGxTexHead.txt | 40 ++++++++++++++++++++++ research/pack.txt | 1 + 4 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 research/bxon_types/tpArchiveFileParam.txt create mode 100644 research/bxon_types/tpGxTexHead.txt diff --git a/research/bxon.txt b/research/bxon.txt index ad8f46a..61df43a 100644 --- a/research/bxon.txt +++ b/research/bxon.txt @@ -9,27 +9,3 @@ header: project_id (4) rel_offset_typename (4) -> null terminated string rel_offset_data (4) -> buffer -> polymorphic based on typename - -type tpArchiveFileParam: - header: - archive_count (4) - rel_offset_arc_list (4) -> arc[] - xap_count (4) - rel_offset_xap_list (4) -> xap[] - - arc: - rel_offset_name (4) -> null terminated string - rel_offset_flags (4) -> arc_flags; note: you can inline this - - arc_flags: - is_streamed (1) note: if 0 decompress the entire arc before slicing - - xap: - id (4) note: probably hash - rel_offset_name (4) -> null terminated string - arc_offset (4) note: shift left by 4. - compressed_size (4) note: zstd - size (4) - buffer_size (4) note: add to size to get total size - arc_index (1) - is_compressed (1) note: zstd diff --git a/research/bxon_types/tpArchiveFileParam.txt b/research/bxon_types/tpArchiveFileParam.txt new file mode 100644 index 0000000..6ffb3a6 --- /dev/null +++ b/research/bxon_types/tpArchiveFileParam.txt @@ -0,0 +1,27 @@ +tpArchiveFileParam format + +note: everything is aligned to 4 bytes. +note: rel_offset is from the start of that field. + +header: + archive_count (4) + rel_offset_arc_list (4) -> arc[] + xap_count (4) + rel_offset_xap_list (4) -> xap[] + +arc: + rel_offset_name (4) -> null terminated string + rel_offset_flags (4) -> arc_flags; note: you can inline this + +arc_flags: + is_streamed (1) note: if 0 decompress the entire arc before slicing + +xap: + id (4) note: probably hash + rel_offset_name (4) -> null terminated string + arc_offset (4) note: shift left by 4. + compressed_size (4) note: zstd + size (4) + buffer_size (4) note: add to size to get total size + arc_index (1) + is_compressed (1) note: zstd diff --git a/research/bxon_types/tpGxTexHead.txt b/research/bxon_types/tpGxTexHead.txt new file mode 100644 index 0000000..c4c0623 --- /dev/null +++ b/research/bxon_types/tpGxTexHead.txt @@ -0,0 +1,40 @@ +tpGxTexHead format + +note: everything is aligned to 4 bytes. +note: rel_offset is from the start of that field. + +header: + width (4) + height (4) + surfaces (4) + rel_offset_imaging (4) -> imaging + total_image_size (4) + unknown (4) note: probably flags + format (4) note: see format_map, maybe 1 byte? + mip_surface_count (4) + rel_offset_mip_surface (4) -> mip_surface + +mip_surface: + offset (4) + unknown (4) + unknown (4) note: seems to be powers of 2? + unknown (4) + size (4) + unknown (4) + width (4) + height (4) + unknown (4) + unknown (4) note: seems to be powers of 2? + +format_map: + 0x00010800 = R8G8B8A8_UNORM + 0x00010B00 = R8G8B8A8_UNORM_SRGB + 0x00010F00 = BC1_UNORM + 0x00011000 = BC1_UNORM_SRGB + 0x00011100 = BC2_UNORM + 0x00011200 = BC2_UNORM_SRGB + 0x00011300 = BC3_UNORM + 0x00011400 = BC3_UNORM_SRGB + 0x00011500 = BC4_UNORM + 0x00011600 = BC5_UNORM + 0x00030000 = R32G32B32A32_FLOAT \ No newline at end of file diff --git a/research/pack.txt b/research/pack.txt index a300c30..a9c8f8e 100644 --- a/research/pack.txt +++ b/research/pack.txt @@ -9,6 +9,7 @@ header: total_size (4) serialized_size (4) note: this is the size of the PACK data, seeking to this number will be where resource data starts. resource_size (4) note: this is data that exists inherently in the pack, always after all the files. + note 2: keep track of the offset, each bxon doesn't specify resource offset. alignment is 0x80. preload_count (4) rel_offset_preload_table (4) -> preload[] pack_count (4)