SNES Color container. More...
#include <snes_color.h>
Public Member Functions | |
constexpr | SnesColor () |
constexpr | SnesColor (const ImVec4 val) |
constexpr | SnesColor (const uint16_t val) |
SnesColor (const snes_color val) | |
constexpr | SnesColor (uint8_t r, uint8_t g, uint8_t b) |
void | set_rgb (const ImVec4 val) |
void | set_snes (uint16_t val) |
constexpr ImVec4 | rgb () const |
constexpr snes_color | rom_color () const |
constexpr uint16_t | snes () const |
constexpr bool | is_modified () const |
constexpr bool | is_transparent () const |
constexpr void | set_transparent (bool t) |
constexpr void | set_modified (bool m) |
Private Attributes | |
ImVec4 | rgb_ |
uint16_t | snes_ |
snes_color | rom_color_ |
bool | modified = false |
bool | transparent = false |
SNES Color container.
Used for displaying the color to the screen and writing the color to the Rom file in the correct format.
SNES colors may be represented in one of three formats:
Definition at line 38 of file snes_color.h.
|
inlineconstexpr |
Definition at line 40 of file snes_color.h.
References rgb_.
|
inlineexplicitconstexpr |
Definition at line 43 of file snes_color.h.
References snes_color::blue, yaze::gfx::ConvertRgbToSnes(), snes_color::green, yaze::gfx::kColorByteMax, snes_color::red, rgb_, and snes_.
|
inlineexplicitconstexpr |
Definition at line 51 of file snes_color.h.
References snes_color::blue, yaze::gfx::ConvertSnesToRgb(), snes_color::green, snes_color::red, rgb_, and snes_.
|
inlineexplicit |
Definition at line 56 of file snes_color.h.
References yaze::gfx::ConvertRgbToSnes(), yaze::gfx::kColorByteMaxF, rgb_, rom_color_, and snes_.
|
inlineconstexpr |
Definition at line 61 of file snes_color.h.
References snes_color::blue, yaze::gfx::ConvertRgbToSnes(), snes_color::green, yaze::gfx::kColorByteMaxF, snes_color::red, rgb_, rom_color_, and snes_.
void yaze::gfx::SnesColor::set_rgb | ( | const ImVec4 | val | ) |
Definition at line 101 of file snes_color.cc.
References snes_color::blue, yaze::gfx::ConvertRgbToSnes(), snes_color::green, yaze::gfx::kColorByteMax, modified, snes_color::red, rgb_, rom_color_, and snes_.
Referenced by yaze::gfx::GetCgxColor(), yaze::gui::SnesColorEdit4(), yaze::gfx::SnesPalette::SnesPalette(), and yaze::gfx::SnesPalette::SnesPalette().
void yaze::gfx::SnesColor::set_snes | ( | uint16_t | val | ) |
Definition at line 114 of file snes_color.cc.
References snes_color::blue, yaze::gfx::ConvertSnesToRgb(), snes_color::green, yaze::gfx::kColorByteMaxF, modified, snes_color::red, rgb_, and snes_.
Referenced by yaze::gui::SnesColorEdit4(), yaze::gfx::SnesPalette::SnesPalette(), and yaze::gfx::SnesPalette::SnesPalette().
|
inlineconstexpr |
Definition at line 74 of file snes_color.h.
References rgb_.
Referenced by yaze::gui::ConvertSnesColorToImVec4(), yaze::test::TEST(), yaze::test::TEST(), and yaze::gfx::ToFloatArray().
|
inlineconstexpr |
Definition at line 75 of file snes_color.h.
References rom_color_.
|
inlineconstexpr |
Definition at line 76 of file snes_color.h.
References snes_.
Referenced by yaze::gui::SnesColorButton(), yaze::gfx::SnesPalette::SnesPalette(), yaze::gfx::SnesPalette::SnesPalette(), yaze::test::TEST(), yaze::test::TEST(), and yaze::Rom::WriteColor().
|
inlineconstexpr |
Definition at line 77 of file snes_color.h.
References modified.
Referenced by yaze::Rom::SavePalette().
|
inlineconstexpr |
Definition at line 78 of file snes_color.h.
References transparent.
|
inlineconstexpr |
Definition at line 79 of file snes_color.h.
References transparent.
|
inlineconstexpr |
Definition at line 80 of file snes_color.h.
References modified.
Referenced by yaze::Rom::SavePalette().
|
private |
Definition at line 83 of file snes_color.h.
Referenced by rgb(), set_rgb(), set_snes(), SnesColor(), SnesColor(), SnesColor(), SnesColor(), and SnesColor().
|
private |
Definition at line 84 of file snes_color.h.
Referenced by set_rgb(), set_snes(), snes(), SnesColor(), SnesColor(), SnesColor(), and SnesColor().
|
private |
Definition at line 85 of file snes_color.h.
Referenced by rom_color(), set_rgb(), SnesColor(), and SnesColor().
|
private |
Definition at line 86 of file snes_color.h.
Referenced by is_modified(), set_modified(), set_rgb(), and set_snes().
|
private |
Definition at line 87 of file snes_color.h.
Referenced by is_transparent(), and set_transparent().