|
coastline 0.0.4
|
A texture of a model and its palette. More...
#include <render.h>

Public Attributes | |
| u8 * | image |
| u16 * | palette |
| union { | |
| u32 paletteRomIndex | |
| TextureAnimation * animation | |
| } | source |
| u16 | width |
| u16 | height |
| s16 | tileT0 |
| s16 | tileS0 |
| s16 | tileT1 |
| s16 | tileS1 |
| u8 | unreconstructed18 [0x20 - 0x18] |
| union { | |
| struct { | |
| unsigned mirrorS: 1 | |
| unsigned mirrorT: 1 | |
| unsigned clampS: 1 | |
| unsigned clampT: 1 | |
| unsigned format: 4 | |
| unsigned animated: 1 | |
| unsigned size: 18 | |
| } | |
| u8 formatByte | |
| }; | |
A texture of a model and its palette.
Its fields join this structure as they are reconstructed.
| u8* ModelTexture::image |
The texels.
| u16* ModelTexture::palette |
The 16 colors of the palette, in RGBA 5551.
| u32 ModelTexture::paletteRomIndex |
The palette offset, in units of 32 bytes in the low 12 bits.
| TextureAnimation* ModelTexture::animation |
The frames of an animated texture.
| union { ... } ModelTexture::source |
The source of the palette, or of the frames of an animated texture.
| u16 ModelTexture::width |
The width in texels.
| u16 ModelTexture::height |
The height in texels.
| s16 ModelTexture::tileT0 |
The first texel row the tile covers.
| s16 ModelTexture::tileS0 |
The first texel column the tile covers.
| s16 ModelTexture::tileT1 |
The last texel row the tile covers.
| s16 ModelTexture::tileS1 |
The last texel column the tile covers.
| u8 ModelTexture::unreconstructed18[0x20 - 0x18] |
Bytes not yet reconstructed.
| unsigned ModelTexture::mirrorS |
Whether the texture repeats mirrored in s.
| unsigned ModelTexture::mirrorT |
Whether the texture repeats mirrored in t.
| unsigned ModelTexture::clampS |
Whether the texture clamps in s rather than wrapping.
| unsigned ModelTexture::clampT |
Whether the texture clamps in t rather than wrapping.
| unsigned ModelTexture::format |
The format, a TEXTURE_FORMAT_* value.
| unsigned ModelTexture::animated |
Whether source points to animated texture frames.
| unsigned ModelTexture::size |
The length of the texels in bytes.
| u8 ModelTexture::formatByte |
The packed flags and format at the first descriptor byte.
| union { ... } ModelTexture |