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

SNES Color container. More...

#include <snes_color.h>

Collaboration diagram for yaze::app::gfx::SnesColor:

Public Member Functions

 SnesColor ()
 
 SnesColor (const ImVec4 val)
 
 SnesColor (const uint16_t val)
 
 SnesColor (const snes_color val)
 
 SnesColor (uint8_t r, uint8_t g, uint8_t b)
 
ImVec4 rgb () const
 
void set_rgb (const ImVec4 val)
 
void set_snes (uint16_t val)
 
snes_color rom_color () const
 
uint16_t snes () const
 
bool is_modified () const
 
bool is_transparent () const
 
void set_transparent (bool t)
 
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::app::gfx::SnesColor::SnesColor ( )
inline

Definition at line 40 of file snes_color.h.

◆ SnesColor() [2/5]

yaze::app::gfx::SnesColor::SnesColor ( const ImVec4 val)
inlineexplicit

Definition at line 41 of file snes_color.h.

References snes_color::blue, yaze::app::gfx::ConvertRGBtoSNES(), snes_color::green, yaze::app::gfx::kColorByteMax, snes_color::red, and snes_.

Here is the call graph for this function:

◆ SnesColor() [3/5]

yaze::app::gfx::SnesColor::SnesColor ( const uint16_t val)
inlineexplicit

Definition at line 48 of file snes_color.h.

References snes_color::blue, yaze::app::gfx::ConvertSNEStoRGB(), snes_color::green, snes_color::red, and rgb_.

Here is the call graph for this function:

◆ SnesColor() [4/5]

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

Definition at line 52 of file snes_color.h.

◆ SnesColor() [5/5]

yaze::app::gfx::SnesColor::SnesColor ( uint8_t r,
uint8_t g,
uint8_t b )
inline

Definition at line 57 of file snes_color.h.

References snes_color::blue, yaze::app::gfx::ConvertRGBtoSNES(), snes_color::green, yaze::app::gfx::kColorByteMaxF, snes_color::red, rgb_, rom_color_, and snes_.

Here is the call graph for this function:

Member Function Documentation

◆ rgb()

ImVec4 yaze::app::gfx::SnesColor::rgb ( ) const
inline

◆ set_rgb()

◆ set_snes()

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

◆ rom_color()

snes_color yaze::app::gfx::SnesColor::rom_color ( ) const
inline

Definition at line 89 of file snes_color.h.

References rom_color_.

◆ snes()

uint16_t yaze::app::gfx::SnesColor::snes ( ) const
inline

◆ is_modified()

bool yaze::app::gfx::SnesColor::is_modified ( ) const
inline

Definition at line 91 of file snes_color.h.

References modified.

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

◆ is_transparent()

bool yaze::app::gfx::SnesColor::is_transparent ( ) const
inline

Definition at line 92 of file snes_color.h.

References transparent.

◆ set_transparent()

void yaze::app::gfx::SnesColor::set_transparent ( bool t)
inline

Definition at line 93 of file snes_color.h.

References transparent.

◆ set_modified()

void yaze::app::gfx::SnesColor::set_modified ( bool m)
inline

Definition at line 94 of file snes_color.h.

References modified.

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

Member Data Documentation

◆ rgb_

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

Definition at line 97 of file snes_color.h.

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

◆ snes_

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

Definition at line 98 of file snes_color.h.

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

◆ rom_color_

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

Definition at line 99 of file snes_color.h.

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

◆ modified

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

Definition at line 100 of file snes_color.h.

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

◆ transparent

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

Definition at line 101 of file snes_color.h.

Referenced by is_transparent(), and set_transparent().


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