upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorwxrrry <127362966+wxrrry@users.noreply.github.com>2026-11-23 00:17:56 +0300
committerwxrrry <127362966+wxrrry@users.noreply.github.com>2026-11-23 00:17:56 +0300
commitcac7fe25cf488d620dd7bb2a8cec4ba83217b02a (patch)
treeeda137d76b9a543c86d89431414274d9d784c285 /docs
parent14c5b93ff7943e1f578a37f0f1efbd05ce076299 (diff)
tex_headers: address review comments on pointer tags, JOAAT name mapping, and mip layout
- tools/tex_headers.py: read mips from flags at +0x42 (flags >> 16) and preserve b6 at +0x3e. - tools/tex_headers.py: validate system pointer tag (0x5...) and reject null pointers so all-zero buffers produce empty records. - tools/tex_headers.py: match texture names by lowercase JOAAT32 hash rather than index position. - docs/textures.md: wrap lines under 118 chars and label dry cell occupancy as hypothesis. - tests/test_tex_headers.py: add tests for differing b6/mips offsets, zero buffers, invalid tags, reversed and missing names.
Diffstat (limited to 'docs')
-rw-r--r--docs/textures.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/textures.md b/docs/textures.md
index b26a6954f..bda503e05 100644
--- a/docs/textures.md
+++ b/docs/textures.md
@@ -959,14 +959,17 @@ one at 4.1). They are left as opaque raw data here; matching them to the `data/t
959obvious next check. 959obvious next check.
960 960
961**Measured keying and format codes (ASSET-274):** 961**Measured keying and format codes (ASSET-274):**
962All 1,315 system streams are RAGE `pgDictionary<grcTexture>` pages containing descriptor pointers and a 32-bit `joaat32` hash table: 962All 1,315 system streams are RAGE `pgDictionary<grcTexture>` pages containing descriptor pointers and a 32-bit
963`joaat32` hash table:
963- **Format codes are 1:1 DXGI format enums:** 964- **Format codes are 1:1 DXGI format enums:**
964 - `0x5f` (95) = `DXGI_FORMAT_BC6H_UF16` (1,313 pairs, 128 x 128). 965 - `0x5f` (95) = `DXGI_FORMAT_BC6H_UF16` (1,313 pairs, 128 x 128).
965 - `0x62` (98) = `DXGI_FORMAT_BC7_UNORM` (1 pair, 172 x 172: UI switch portraits `switch_jason` and `switch_lucia`). 966 - `0x62` (98) = `DXGI_FORMAT_BC7_UNORM` (1 pair, 172 x 172: UI switch portraits `switch_jason` and `switch_lucia`).
966 - `0x4d` (77) = `DXGI_FORMAT_BC3_UNORM` (1 pair, 512 x 512: UI indicators `qrcode_logo` and `busy_spinner`). 967 - `0x4d` (77) = `DXGI_FORMAT_BC3_UNORM` (1 pair, 512 x 512: UI indicators `qrcode_logo` and `busy_spinner`).
967- **Keying:** Each dictionary indexes textures by the lower-case ASCII asset name hash (`joaat32`). 968- **Keying:** Each dictionary indexes textures by the lower-case ASCII asset name hash (`joaat32`).
968 - The 1,313 pairs are each keyed by `waterfog2` (`0x9b9b31df`) and `waterfog` (`0xf1389e16`). 969 - The 1,313 pairs are each keyed by `waterfog2` (`0x9b9b31df`) and `waterfog` (`0xf1389e16`).
969 - The count of 1,313 matches the water-bearing cells of the 36 x 41 (1,476 total) world streaming grid (`StreamingDesc/NumberOfTilesX, Y` in `docs/world.md:361`), with the remaining 163 cells being dry/inland sectors without water surface fog data. 970 - The count of 1,313 matches the water-bearing cells of the 36 x 41 (1,476 total) world streaming grid
971 (`StreamingDesc/NumberOfTilesX, Y` in `docs/world.md:361`); whether the remaining 163 cells are inland/dry
972 cells with no waterfog dictionary is a hypothesis.
970 973
971## Next step 974## Next step
972 975