Class controlling the game's color palette.
More...
#include <palette.h>
Class controlling the game's color palette.
Definition at line 41 of file palette.h.
◆ Palettes
◆ GradientType
Colors can be static or can alter over time.
Enumerator |
---|
STATIC | |
PULSE | |
SPECTRUM | |
RAINBOW | |
Definition at line 53 of file palette.h.
◆ Palette() [1/3]
Palette::Palette |
( |
int |
size | ) |
|
◆ Palette() [2/3]
Palette::Palette |
( |
const Palette & |
| ) |
|
|
delete |
◆ Palette() [3/3]
◆ ~Palette()
◆ advanceGradient()
void Palette::advanceGradient |
( |
int |
advance | ) |
|
|
protected |
◆ advanceGradients()
void Palette::advanceGradients |
( |
| ) |
|
|
static |
Updates all colors, that are non-static.
Definition at line 82 of file palette.cpp.
◆ getColor()
const gcn::Color & Palette::getColor |
( |
int |
type | ) |
const |
|
inline |
Gets the color associated with the type.
- Parameters
-
type | the color type requested |
- Returns
- the requested color
Definition at line 72 of file palette.h.
◆ getGradientDelay()
int Palette::getGradientDelay |
( |
int |
type | ) |
const |
|
inline |
Gets the gradient delay for the specified type.
- Parameters
-
type | the color type of the color |
- Returns
- the gradient delay of the color with the given index
Definition at line 105 of file palette.h.
◆ getGradientType()
Gets the GradientType associated with the specified type.
- Parameters
-
type | the color type of the color |
- Returns
- the gradient type of the color with the given index
Definition at line 94 of file palette.h.
◆ getOutlineColor()
const std::optional< gcn::Color > & Palette::getOutlineColor |
( |
int |
type | ) |
const |
|
inline |
Gets the optional outline color associated with the type.
- Parameters
-
type | the color type requested |
- Returns
- the requested outline color, if any
Definition at line 83 of file palette.h.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ setColor()
void Palette::setColor |
( |
int |
type, |
|
|
const gcn::Color & |
color, |
|
|
const std::optional< gcn::Color > & |
outlineColor, |
|
|
GradientType |
grad, |
|
|
int |
delay |
|
) |
| |
◆ mColors
◆ mGradVector
◆ mInstances
◆ mRainbowTimer
Timer Palette::mRainbowTimer |
|
staticprotected |
Timer used when updating gradient-type colors.
Definition at line 119 of file palette.h.
◆ RAINBOW_COLOR_COUNT
const int Palette::RAINBOW_COLOR_COUNT = 7 |
|
staticprotected |
Number of Elemets of RAINBOW_COLORS.
Definition at line 116 of file palette.h.
◆ RAINBOW_COLORS
const gcn::Color Palette::RAINBOW_COLORS |
|
staticprotected |
Initial value:= {
gcn::Color(255, 0, 0),
gcn::Color(255, 153, 0),
gcn::Color(255, 255, 0),
gcn::Color(0, 153, 0),
gcn::Color(0, 204, 204),
gcn::Color(51, 0, 153),
gcn::Color(153, 0, 153)
}
Colors used for the rainbow gradient.
Definition at line 31 of file palette.h.
The documentation for this class was generated from the following files: