yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gfx::PaletteGroup Struct Reference

Represents a group of palettes. More...

#include <snes_palette.h>

Public Member Functions

 PaletteGroup ()=default
 
 PaletteGroup (const std::string &name)
 
void AddPalette (SnesPalette pal)
 
void AddColor (SnesColor color)
 
void clear ()
 
void resize (size_t new_size)
 
auto name () const
 
auto size () const
 
auto palette (int i) const
 
auto mutable_palette (int i)
 
SnesPalette operator[] (int i)
 
const SnesPaletteoperator[] (int i) const
 

Private Attributes

std::string name_
 
std::vector< SnesPalettepalettes
 

Detailed Description

Represents a group of palettes.

Supports adding palettes and colors, clearing the group, and accessing palettes and colors by index.

Definition at line 210 of file snes_palette.h.

Constructor & Destructor Documentation

◆ PaletteGroup() [1/2]

yaze::gfx::PaletteGroup::PaletteGroup ( )
default

◆ PaletteGroup() [2/2]

yaze::gfx::PaletteGroup::PaletteGroup ( const std::string &  name)
inline

Definition at line 212 of file snes_palette.h.

Member Function Documentation

◆ AddPalette()

◆ AddColor()

void yaze::gfx::PaletteGroup::AddColor ( SnesColor  color)
inline

Definition at line 216 of file snes_palette.h.

References palettes.

Referenced by yaze::gfx::palette_group_internal::LoadGrassColors().

◆ clear()

void yaze::gfx::PaletteGroup::clear ( )
inline

◆ resize()

void yaze::gfx::PaletteGroup::resize ( size_t  new_size)
inline

Definition at line 224 of file snes_palette.h.

References palettes.

◆ name()

auto yaze::gfx::PaletteGroup::name ( ) const
inline

Definition at line 225 of file snes_palette.h.

References name_.

◆ size()

auto yaze::gfx::PaletteGroup::size ( ) const
inline

◆ palette()

auto yaze::gfx::PaletteGroup::palette ( int  i) const
inline

Definition at line 227 of file snes_palette.h.

References palettes.

◆ mutable_palette()

auto yaze::gfx::PaletteGroup::mutable_palette ( int  i)
inline

◆ operator[]() [1/2]

SnesPalette yaze::gfx::PaletteGroup::operator[] ( int  i)
inline

Definition at line 230 of file snes_palette.h.

References palettes.

◆ operator[]() [2/2]

const SnesPalette & yaze::gfx::PaletteGroup::operator[] ( int  i) const
inline

Definition at line 238 of file snes_palette.h.

References palettes.

Member Data Documentation

◆ name_

std::string yaze::gfx::PaletteGroup::name_
private

Definition at line 247 of file snes_palette.h.

Referenced by name().

◆ palettes

std::vector<SnesPalette> yaze::gfx::PaletteGroup::palettes
private

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