SaturnRingLibrary 0.6
SGL wrapper
 
Loading...
Searching...
No Matches
SRL::CRAM::Palette Struct Reference

Detailed Description

Color palette in color RAM.

#include <srl_cram.hpp>

Public Member Functions

 Palette ()
 Construct a new empty palette.
 
 Palette (const CRAM::TextureColorMode mode, const uint16_t id)
 Construct a new Palette entry.
 
SRL::Types::HighColorGetData ()
 Get color data.
 
uint16_t GetId ()
 Get palette identifier.
 
CRAM::TextureColorMode GetMode ()
 Get color mode.
 
int16_t Load (Types::HighColor *data, const int16_t count=-1)
 Load color data to palette.
 

Constructor & Destructor Documentation

◆ Palette()

SRL::CRAM::Palette::Palette ( const CRAM::TextureColorMode mode,
const uint16_t id )
inline

Construct a new Palette entry.

Parameters
modeColor mode
idPalette identifier

Member Function Documentation

◆ GetData()

SRL::Types::HighColor * SRL::CRAM::Palette::GetData ( )
inline

Get color data.

Returns
Color data

◆ GetId()

uint16_t SRL::CRAM::Palette::GetId ( )
inline

Get palette identifier.

Returns
Palette identifier

◆ GetMode()

CRAM::TextureColorMode SRL::CRAM::Palette::GetMode ( )
inline

Get color mode.

Returns
Color mode

◆ Load()

int16_t SRL::CRAM::Palette::Load ( Types::HighColor * data,
const int16_t count = -1 )
inline

Load color data to palette.

Parameters
dataColor data
countNumber of color to load (-1 means full palette)
Returns
Number of colors that have been loaded, -1 on error