yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gfx::SnesColor Class Reference

SNES Color container. More...

#include <snes_color.h>

Collaboration diagram for yaze::gfx::SnesColor:

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
 

Detailed Description

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:

  • Color data from the rom in a snes_color struct
  • Color data for displaying to the UI via ImVec4

Definition at line 38 of file snes_color.h.

Constructor & Destructor Documentation

◆ SnesColor() [1/5]

yaze::gfx::SnesColor::SnesColor ( )
inlineconstexpr

Definition at line 40 of file snes_color.h.

References rgb_.

◆ SnesColor() [2/5]

yaze::gfx::SnesColor::SnesColor ( const ImVec4 val)
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_.

Here is the call graph for this function:

◆ SnesColor() [3/5]

yaze::gfx::SnesColor::SnesColor ( const uint16_t val)
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_.

Here is the call graph for this function:

◆ SnesColor() [4/5]

yaze::gfx::SnesColor::SnesColor ( const snes_color val)
inlineexplicit

Definition at line 56 of file snes_color.h.

References yaze::gfx::ConvertRgbToSnes(), yaze::gfx::kColorByteMaxF, rgb_, rom_color_, and snes_.

Here is the call graph for this function:

◆ SnesColor() [5/5]

yaze::gfx::SnesColor::SnesColor ( uint8_t r,
uint8_t g,
uint8_t b )
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_.

Here is the call graph for this function:

Member Function Documentation

◆ set_rgb()

void yaze::gfx::SnesColor::set_rgb ( const ImVec4 val)

◆ set_snes()

void yaze::gfx::SnesColor::set_snes ( uint16_t val)

◆ rgb()

ImVec4 yaze::gfx::SnesColor::rgb ( ) const
inlineconstexpr

◆ rom_color()

snes_color yaze::gfx::SnesColor::rom_color ( ) const
inlineconstexpr

Definition at line 75 of file snes_color.h.

References rom_color_.

◆ snes()

uint16_t yaze::gfx::SnesColor::snes ( ) const
inlineconstexpr

◆ is_modified()

bool yaze::gfx::SnesColor::is_modified ( ) const
inlineconstexpr

Definition at line 77 of file snes_color.h.

References modified.

Referenced by yaze::Rom::SavePalette().

◆ is_transparent()

bool yaze::gfx::SnesColor::is_transparent ( ) const
inlineconstexpr

Definition at line 78 of file snes_color.h.

References transparent.

◆ set_transparent()

void yaze::gfx::SnesColor::set_transparent ( bool t)
inlineconstexpr

Definition at line 79 of file snes_color.h.

References transparent.

◆ set_modified()

void yaze::gfx::SnesColor::set_modified ( bool m)
inlineconstexpr

Definition at line 80 of file snes_color.h.

References modified.

Referenced by yaze::Rom::SavePalette().

Member Data Documentation

◆ rgb_

ImVec4 yaze::gfx::SnesColor::rgb_
private

Definition at line 83 of file snes_color.h.

Referenced by rgb(), set_rgb(), set_snes(), SnesColor(), SnesColor(), SnesColor(), SnesColor(), and SnesColor().

◆ snes_

uint16_t yaze::gfx::SnesColor::snes_
private

Definition at line 84 of file snes_color.h.

Referenced by set_rgb(), set_snes(), snes(), SnesColor(), SnesColor(), SnesColor(), and SnesColor().

◆ rom_color_

snes_color yaze::gfx::SnesColor::rom_color_
private

Definition at line 85 of file snes_color.h.

Referenced by rom_color(), set_rgb(), SnesColor(), and SnesColor().

◆ modified

bool yaze::gfx::SnesColor::modified = false
private

Definition at line 86 of file snes_color.h.

Referenced by is_modified(), set_modified(), set_rgb(), and set_snes().

◆ transparent

bool yaze::gfx::SnesColor::transparent = false
private

Definition at line 87 of file snes_color.h.

Referenced by is_transparent(), and set_transparent().


The documentation for this class was generated from the following files: