libdragon
Loading...
Searching...
No Matches
Data Structures | Data Fields
sprite_ext_t Struct Reference

Internal structure used as additional sprite header. More...

#include <sprite_internal.h>

Data Structures

struct  detail_s
 Detail texture parameters. More...
 
struct  sprite_lod_s
 Information on LODs. More...
 
struct  texparms_s
 RDP texture parameters. More...
 
struct  texparms_s.s
 
struct  texparms_s.t
 

Data Fields

uint16_t size
 Size of the structure itself (for forward compatibility)
 
uint16_t version
 Version of the structure (currently 1)
 
uint32_t pal_file_pos
 
struct sprite_ext_t::sprite_lod_s lods [7]
 Information on the available LODs (if detail is present, it's always at position 6)
 
struct { 
 
uint16_t flags
 Generic Flags for the sprite.
 
uint16_t padding
 Padding.
 
};  
 
struct sprite_ext_t::texparms_s texparms
 
struct sprite_ext_t::detail_s detail
 Detail texture parameters.
 

Detailed Description

Internal structure used as additional sprite header.

This data is put at the end of the main image data of the sprite. This allows the library to stay backward compatible with old sprites created before this structure existed.

The existence of the structure in the sprite can be checked via SPRITE_FLAGS_EXT.


Data Structure Documentation

◆ sprite_ext_t::detail_s

struct sprite_ext_t::detail_s

Detail texture parameters.

Data Fields
struct texparms_s texparms Detail LOD RDP texture parameters.
float blend_factor Blending factor for the detail texture at maximum zoom (0=hidden, 1=opaque)
bool use_main_texture True if the detail texture is the same as the LOD0 of the main texture.
uint8_t padding[3] Padding.

◆ sprite_ext_t::sprite_lod_s

struct sprite_ext_t::sprite_lod_s

Information on LODs.

Data Fields
uint16_t width Width of this LOD.
uint16_t height Height of this LOD.
uint32_t fmt_file_pos Top 8 bits: format; lowest 24 bits: absolute offset in the file.

◆ sprite_ext_t::texparms_s

struct sprite_ext_t::texparms_s

RDP texture parameters.

Data Fields
struct texparms_s.s s
struct texparms_s.t t

◆ sprite_ext_t::texparms_s.s

struct sprite_ext_t::texparms_s.s
Data Fields
float translate Translate the texture in pixels.
float repeats Number of repetitions (default: 1)
int16_t scale_log Power of 2 scale modifier of the texture (default: 0)
bool mirror Repetition mode (default: MIRROR_NONE)
int8_t padding

◆ sprite_ext_t::texparms_s.t

struct sprite_ext_t::texparms_s.t
Data Fields
float translate Translate the texture in pixels.
float repeats Number of repetitions (default: 1)
int16_t scale_log Power of 2 scale modifier of the texture (default: 0)
bool mirror Repetition mode (default: MIRROR_NONE)
int8_t padding

Field Documentation

◆ size

uint16_t sprite_ext_t::size

Size of the structure itself (for forward compatibility)

◆ version

uint16_t sprite_ext_t::version

Version of the structure (currently 1)

◆ pal_file_pos

uint32_t sprite_ext_t::pal_file_pos

Position of the palette in the file

◆ lods

struct sprite_ext_t::sprite_lod_s sprite_ext_t::lods[7]

Information on the available LODs (if detail is present, it's always at position 6)

◆ [struct]

struct { ... } sprite_ext_t

◆ texparms

struct sprite_ext_t::texparms_s sprite_ext_t::texparms

RDP texture parameters

◆ detail

struct sprite_ext_t::detail_s sprite_ext_t::detail

Detail texture parameters.


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