#include <remap32.h>
Public Member Functions | |
void | saveLoadWithSerializer (Common::Serializer &s) override |
uint8 | getRemapCount () const |
uint8 | getStartColor () const |
uint8 | getEndColor () const |
uint8 | getBlockedRangeStart () const |
int16 | getBlockedRangeCount () const |
void | remapOff (const uint8 color) |
void | remapAllOff () |
void | remapByRange (const uint8 color, const int16 from, const int16 to, const int16 delta) |
void | remapByPercent (const uint8 color, const int16 percent) |
void | remapToGray (const uint8 color, const int8 gray) |
void | remapToPercentGray (const uint8 color, const int16 gray, const int16 percent) |
void | blockRange (const uint8 from, const int16 count) |
bool | remapEnabled (uint8 color) const |
uint8 | remapColor (const uint8 sourceColor, const uint8 targetColor) const |
bool | remapAllTables (const bool paletteUpdated) |
This class provides color remapping support for SCI32 games.
void Sci::GfxRemap32::remapOff | ( | const uint8 | color | ) |
Turns off remapping of the given color. If color
is 0, all remaps are turned off.
void Sci::GfxRemap32::remapAllOff | ( | ) |
Turns off all color remaps.
void Sci::GfxRemap32::remapByRange | ( | const uint8 | color, |
const int16 | from, | ||
const int16 | to, | ||
const int16 | delta | ||
) |
Configures a SingleRemap for the remap color color
. The SingleRemap will shift palette colors between from
and to
(inclusive) by delta
palette entries when the remap is applied.
void Sci::GfxRemap32::remapByPercent | ( | const uint8 | color, |
const int16 | percent | ||
) |
Configures a SingleRemap for the remap color color
to modify the brightness of remapped colors by percent
.
void Sci::GfxRemap32::remapToGray | ( | const uint8 | color, |
const int8 | gray | ||
) |
Configures a SingleRemap for the remap color color
to modify the saturation of remapped colors by gray
.
void Sci::GfxRemap32::remapToPercentGray | ( | const uint8 | color, |
const int16 | gray, | ||
const int16 | percent | ||
) |
Configures a SingleRemap for the remap color color
to modify the brightness of remapped colors by percent
, and saturation of remapped colors by gray
.
void Sci::GfxRemap32::blockRange | ( | const uint8 | from, |
const int16 | count | ||
) |
Prevents GfxRemap32 from using the given range of palette entries as potential remap targets.
Was DontMapToRange in SSCI.
|
inline |
Determines whether or not the given color has an active remapper. If it does not, it is treated as a skip color and the pixel is not drawn.
_remaps
, as this function does. Presumably, the separate array was created for performance reasons, since this is called a lot in the most critical section of the renderer.
|
inline |
Calculates the correct color for a target by looking up the target color in the SingleRemap that controls the given sourceColor. If there is no remap for the given color, it will be treated as a skip color.
bool Sci::GfxRemap32::remapAllTables | ( | const bool | paletteUpdated | ) |
Updates all active remaps in response to a palette change or a remap settings change.
paletteChanged
is true if the next palette in GfxPalette32 has been previously modified by other palette operations.