ScummVM API documentation
Sci::GfxRemap32 Class Reference

#include <remap32.h>

Inheritance diagram for Sci::GfxRemap32:
Common::Serializable

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)
 

Detailed Description

This class provides color remapping support for SCI32 games.

Member Function Documentation

◆ remapOff()

void Sci::GfxRemap32::remapOff ( const uint8  color)

Turns off remapping of the given color. If color is 0, all remaps are turned off.

◆ remapAllOff()

void Sci::GfxRemap32::remapAllOff ( )

Turns off all color remaps.

◆ remapByRange()

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.

◆ remapByPercent()

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.

◆ remapToGray()

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.

◆ remapToPercentGray()

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.

◆ blockRange()

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.

◆ remapEnabled()

bool Sci::GfxRemap32::remapEnabled ( uint8  color) const
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.

Note
SSCI uses a boolean array to decide whether a pixel is remapped, but it is possible to get the same information from _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.

◆ remapColor()

uint8 Sci::GfxRemap32::remapColor ( const uint8  sourceColor,
const uint8  targetColor 
) const
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.

◆ remapAllTables()

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.


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