Common Data Types: Difference between revisions

moving the GtTexture spec to its own page
mNo edit summary
(moving the GtTexture spec to its own page)
Line 28:
| 0x08 || Blue additive || float
|-
|}
 
= CGtTexture =
'''Textures''' on the PlayStation 2 and PlayStation Portable Burnout games are of type <code>CGtTexture</code> and stored as uncompressed bitmaps, with CLUT4 (16-color) and CLUT8 (256-color) palettes.
 
=== PS2 ===
{|class="wikitable"
|-
! Offset
! Name
! Type
! Value
! Notes
|-
! colspan="5" | CGtTexture
|-
| 0x00 || Raster graphic || RwRaster || ||
|-
! colspan="5" | RwRaster
|-
| 0x00 || Parent raster offset || RwRaster* || ||
|-
| 0x04 || Pixels offset || word* || || Pointer to raster's bitmap
|-
| 0x08 || Palette offset || word* || || Pointer to raster's color palette
|-
| 0x0C || Bitmap width || int32 || ||
|-
| 0x10 || Bitmap height || int32 || ||
|-
| 0x14 || Bitmap depth || int32 || ||
|-
| 0x18 || Stride || int32 || ||
|}
 
=== PSP ===
The version used on Burnout PSP uses a different header and swizzling method.
{|class="wikitable"
|-
! Offset
! Name
! Type
! Value
! Notes
|-
| 0x08 || Palette pointer || word* || ||
|-
| 0x0C || Bitmap width || int32 || ||
|-
| 0x10 || Bitmap height || int32 || ||
|-
| 0x38 || Pixels pointer || word* || ||
|-
| 0x84 || Pixel mode || int32 || || 0x04 = CLUT4, 0x05 = CLUT8
|-
| 0x8C || Texture name || char[20] || ||
|-
| 0xB0 || Palette count || int8 || ||
|-
| 0xB1 || Palette index || int8 || ||
|-
| 0xB2 || Texture level count || int8 || ||
|-
| 0x104 || Is swizzled? || bool || ||
|}