From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:BRRES resource archive" |
|---|
| claim | "TEX0 sub file as noclip reads it (big endian): magic TEX0 at 0, u32 version at 0x08 (accepted 1 or 3), u32 image data offset at 0x10 and u32 name offset at 0x14 (both relative to the start of the TEX0), u32 flags at 0x18 (read, unused), u16 width 0x1C, u16 height 0x1E, u32 GX texture format 0x20, u32 mip count 0x24, f32 minLOD 0x28, f32 maxLOD 0x2C. The mip count used is ceil(min(count, maxLOD + 1)). Pixel data is GX tiled data." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "BRRES resource archive" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "BRRES_TEX0" |
|---|
| size_min | "0x30" |
|---|
| endianness | "big" |
|---|
| variant | "version 1 or 3 (assert in noclip); the sub-file size at 0x04 and the back offset at 0x0C are not read by this function" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "char[4]" |
|---|
| name | "magic" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "version" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "dataOffset" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "nameOffset" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "flags" |
|---|
|
| offset | "0x1C" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "width" |
|---|
|
| offset | "0x1E" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "height" |
|---|
|
| offset | "0x20" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "format" |
|---|
|
| offset | "0x24" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "mipCount" |
|---|
|
| offset | "0x28" |
|---|
| size | 4 |
|---|
| type | "float" |
|---|
| name | "minLOD" |
|---|
|
| offset | "0x2C" |
|---|
| size | 4 |
|---|
| type | "float" |
|---|
| name | "maxLOD" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "parseTEX0 whole function" |
|---|
| repo | "https://github.com/magcius/noclip.website" |
|---|
| commit | "fd973ff240233c63883750a557c62baf6ff2a6c7" |
|---|
| path | "src/rres/brres.ts" |
|---|
| lines | "249-278" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "TEX0 texture sub file" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T17:09:48.879Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:36:08.873Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read parseTEX0 in src/rres/brres.ts at the cited commit: version u32 at 0x08 asserted in [1, 3]; dataOffs 0x10, nameOffs 0x14, flags 0x18, width u16 0x1C, height u16 0x1E, format u32 0x20, mipCountRaw u32 0x24, minLOD f32 0x28, maxLOD f32 0x2C; mipCount = ceil(min(raw, maxLOD+1)); DataView getters without littleEndian (big endian)." |
|---|
|
|
|---|