coastline 0.0.4
Loading...
Searching...
No Matches
ModelTexture Struct Reference

A texture of a model and its palette. More...

#include <render.h>

Collaboration diagram for ModelTexture:

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 
}; 

Detailed Description

A texture of a model and its palette.

Its fields join this structure as they are reconstructed.

Member Data Documentation

◆ image

u8* ModelTexture::image

The texels.

◆ palette

u16* ModelTexture::palette

The 16 colors of the palette, in RGBA 5551.

◆ paletteRomIndex

u32 ModelTexture::paletteRomIndex

The palette offset, in units of 32 bytes in the low 12 bits.

◆ animation

TextureAnimation* ModelTexture::animation

The frames of an animated texture.

◆ [union]

union { ... } ModelTexture::source

The source of the palette, or of the frames of an animated texture.

◆ width

u16 ModelTexture::width

The width in texels.

◆ height

u16 ModelTexture::height

The height in texels.

◆ tileT0

s16 ModelTexture::tileT0

The first texel row the tile covers.

◆ tileS0

s16 ModelTexture::tileS0

The first texel column the tile covers.

◆ tileT1

s16 ModelTexture::tileT1

The last texel row the tile covers.

◆ tileS1

s16 ModelTexture::tileS1

The last texel column the tile covers.

◆ unreconstructed18

u8 ModelTexture::unreconstructed18[0x20 - 0x18]

Bytes not yet reconstructed.

◆ mirrorS

unsigned ModelTexture::mirrorS

Whether the texture repeats mirrored in s.

◆ mirrorT

unsigned ModelTexture::mirrorT

Whether the texture repeats mirrored in t.

◆ clampS

unsigned ModelTexture::clampS

Whether the texture clamps in s rather than wrapping.

◆ clampT

unsigned ModelTexture::clampT

Whether the texture clamps in t rather than wrapping.

◆ format

unsigned ModelTexture::format

The format, a TEXTURE_FORMAT_* value.

◆ animated

unsigned ModelTexture::animated

Whether source points to animated texture frames.

◆ size

unsigned ModelTexture::size

The length of the texels in bytes.

◆ formatByte

u8 ModelTexture::formatByte

The packed flags and format at the first descriptor byte.

◆ [union]

union { ... } ModelTexture

The documentation for this struct was generated from the following file: