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 |
| bool | empty () const |
| auto | palette (int i) const |
| const SnesPalette & | palette_ref (int i) const |
| auto | mutable_palette (int i) |
| SnesPalette & | palette_ref (int i) |
| SnesColor | GetColor (int palette_index, int color_index) const |
| Get a specific color from a palette. | |
| bool | SetColor (int palette_index, int color_index, const SnesColor &color) |
| Set a specific color in a palette. | |
| SnesPalette | operator[] (int i) |
| const SnesPalette & | operator[] (int i) const |
Private Attributes | |
| std::string | name_ |
| std::vector< SnesPalette > | palettes |
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.
|
default |
|
inline |
Definition at line 212 of file snes_palette.h.
|
inline |
Definition at line 216 of file snes_palette.h.
References palettes.
Referenced by yaze::gfx::CreatePaletteGroupFromColFile(), yaze::gfx::CreatePaletteGroupFromLargePalette(), yaze::test::DungeonObjectRenderingTests::CreateTestPaletteGroup(), yaze::zelda3::DungeonRenderingIntegrationTest::CreateTestPaletteGroup(), yaze::zelda3::ObjectRenderingTest::CreateTestPaletteGroup(), yaze::gfx::palette_group_internal::Load3DObjectPalettes(), yaze::gfx::palette_group_internal::LoadArmorPalettes(), yaze::gfx::palette_group_internal::LoadDungeonMainPalettes(), yaze::gfx::palette_group_internal::LoadGlobalSpritePalettes(), yaze::gfx::palette_group_internal::LoadHUDPalettes(), yaze::gfx::palette_group_internal::LoadOverworldAnimatedPalettes(), yaze::gfx::palette_group_internal::LoadOverworldAuxiliaryPalettes(), yaze::gfx::palette_group_internal::LoadOverworldMainPalettes(), yaze::gfx::palette_group_internal::LoadOverworldMiniMapPalettes(), yaze::gfx::palette_group_internal::LoadShieldPalettes(), yaze::gfx::palette_group_internal::LoadSpriteAux1Palettes(), yaze::gfx::palette_group_internal::LoadSpriteAux2Palettes(), yaze::gfx::palette_group_internal::LoadSpriteAux3Palettes(), and yaze::gfx::palette_group_internal::LoadSwordPalettes().
|
inline |
Definition at line 218 of file snes_palette.h.
References palettes.
Referenced by yaze::gfx::palette_group_internal::LoadGrassColors().
|
inline |
Definition at line 225 of file snes_palette.h.
References palettes.
Referenced by yaze::gfx::PaletteGroupMap::clear(), and yaze::editor::GraphicsEditor::DrawPaletteControls().
|
inline |
Definition at line 226 of file snes_palette.h.
References palettes.
|
inline |
Definition at line 230 of file snes_palette.h.
References name_.
|
inline |
Definition at line 231 of file snes_palette.h.
References palettes.
Referenced by yaze::editor::GraphicsEditor::DrawPaletteControls(), yaze::editor::PaletteEditor::DrawPaletteGroup(), and yaze::gfx::PaletteGroupMap::empty().
|
inline |
Definition at line 232 of file snes_palette.h.
References palettes.
|
inline |
Definition at line 235 of file snes_palette.h.
References palettes.
|
inline |
Definition at line 236 of file snes_palette.h.
References palettes.
|
inline |
Definition at line 239 of file snes_palette.h.
References palettes.
Referenced by yaze::editor::PaletteEditor::DrawPaletteGroup(), and yaze::Rom::mutable_dungeon_palette().
|
inline |
Definition at line 240 of file snes_palette.h.
References palettes.
|
inline |
Get a specific color from a palette.
| palette_index | The palette index |
| color_index | The color index within the palette |
Definition at line 250 of file snes_palette.h.
References palettes.
|
inline |
Set a specific color in a palette.
| palette_index | The palette index |
| color_index | The color index within the palette |
| color | The new color value |
Definition at line 267 of file snes_palette.h.
References palettes.
|
inline |
Definition at line 280 of file snes_palette.h.
References palettes, and yaze::gfx::SnesPalette::size().

|
inline |
Definition at line 289 of file snes_palette.h.
References palettes, and yaze::gfx::SnesPalette::size().

|
private |
Definition at line 300 of file snes_palette.h.
Referenced by name().
|
private |
Definition at line 301 of file snes_palette.h.
Referenced by AddColor(), AddPalette(), clear(), empty(), GetColor(), mutable_palette(), operator[](), operator[](), palette(), palette_ref(), palette_ref(), resize(), SetColor(), and size().