ScummVM API documentation
MADS::Palette Class Reference
Inheritance diagram for MADS::Palette:
MADS::Fader

Public Member Functions

 Palette (MADSEngine *vm)
 
virtual ~Palette ()
 
void setEntry (byte palIndex, byte r, byte g, byte b)
 
uint8 palIndexFromRgb (byte r, byte g, byte b, byte *paletteData=nullptr)
 
void setSystemPalette ()
 
void resetGamePalette (int lowRange, int highRange)
 
void initPalette ()
 
void setLowRange ()
 
void setColorFlags (byte r, byte g, byte b)
 
void setColorValues (byte r, byte g, byte b)
 
void lock ()
 
void unlock ()
 
void refreshSceneColors ()
 
- Public Member Functions inherited from MADS::Fader
 Fader (MADSEngine *vm)
 
void setPalette (const byte *colors, uint start, uint num)
 
void grabPalette (byte *colors, uint start, uint num)
 
void getFullPalette (byte palette[(256 *3)])
 
void setFullPalette (byte palette[(256 *3)])
 
int rgbMerge (byte r, byte g, byte b)
 
int rgbMerge (RGB6 &palEntry)
 
void fadeOut (byte palette[(256 *3)], byte *paletteMap, int baseColor, int numColors, int baseGrey, int numGreys, int tickDelay, int steps)
 
void fadeIn (byte palette[(256 *3)], byte destPalette[(256 *3)], int baseColor, int numColors, int baseGrey, int numGreys, int tickDelay, int steps)
 

Static Public Member Functions

static void setGradient (byte *palette, int start, int count, int rgbValue1, int rgbValue2)
 
static int closestColor (const byte *matchColor, const byte *refPalette, int paletteInc, int count)
 

Public Attributes

byte _mainPalette [(256 *3)]
 
byte _cyclingPalette [(256 *3)]
 
uint32 _palFlags [256]
 
PaletteUsage _paletteUsage
 
RGBList _rgbList
 
bool _lockFl
 
int _lowRange
 
int _highRange
 
- Public Attributes inherited from MADS::Fader
bool _colorFlags [4]
 
int _colorValues [4]
 

Additional Inherited Members

- Protected Attributes inherited from MADS::Fader
MADSEngine_vm
 
byte _rgb64Map [256]
 

Constructor & Destructor Documentation

◆ Palette()

MADS::Palette::Palette ( MADSEngine vm)

Constructor

◆ ~Palette()

virtual MADS::Palette::~Palette ( )
inlinevirtual

Destructor

Member Function Documentation

◆ setEntry()

void MADS::Palette::setEntry ( byte  palIndex,
byte  r,
byte  g,
byte  b 
)

Set a palette entry

◆ palIndexFromRgb()

uint8 MADS::Palette::palIndexFromRgb ( byte  r,
byte  g,
byte  b,
byte *  paletteData = nullptr 
)

Returns the palette index in the palette that most closely matches the specified RGB pair

◆ setSystemPalette()

void MADS::Palette::setSystemPalette ( )

Sets a small set of system/core colors needed by the game

◆ setGradient()

static void MADS::Palette::setGradient ( byte *  palette,
int  start,
int  count,
int  rgbValue1,
int  rgbValue2 
)
static

Update a range of an arbitrary palette

◆ resetGamePalette()

void MADS::Palette::resetGamePalette ( int  lowRange,
int  highRange 
)

Resets the game palette

◆ initPalette()

void MADS::Palette::initPalette ( )

Initializes the main palette

◆ setLowRange()

void MADS::Palette::setLowRange ( )

Set the first four palette entries with preset values


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