Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
COLOR

Color Palette Control. More...

Functions

T_void ColorAddFilt (T_sbyte8 red, T_sbyte8 green, T_sbyte8 blue)
 
T_void ColorAddGlobal (T_sword16 red, T_sword16 green, T_sword16 blue)
 
T_void ColorFadeTo (T_byte8 red, T_byte8 green, T_byte8 blue)
 
T_word16 ColorGammaAdjust (T_void)
 
T_byte8 ColorGetBlue (T_byte8 colornum)
 
T_byte8 ColorGetGreen (T_byte8 colornum)
 
T_byte8 ColorGetRed (T_byte8 colornum)
 
T_void ColorGlowUpdate (T_void)
 
T_void ColorInit (T_void)
 
T_void ColorResetFilt (T_void)
 
T_void ColorRestore (T_void)
 
T_void ColorSetColor (T_byte8 colornum, T_byte8 red, T_byte8 green, T_byte8 blue)
 
T_void ColorSetFilt (T_sbyte8 red, T_sbyte8 green, T_sbyte8 blue)
 
T_void ColorSetGlobal (T_sbyte8 red, T_sbyte8 green, T_sbyte8 blue)
 
T_void ColorStoreDefaultPalette (T_void)
 
T_void ColorUpdate (T_word16 delta)
 

Detailed Description

Color Palette Control.

Many of the graphical effects in the game is created with color shifting effects. Either the whole palette is changed (go red for major damage) or a small subset of the palette (last 32 colors) are given specific animations to make magic items more magical and glow.

See Also
http://www.amuletsandarmor.com/AALicense.txt

Function Documentation

T_void ColorAddFilt ( T_sbyte8  red,
T_sbyte8  green,
T_sbyte8  blue 
)

ColorAddFilt adds an amount of r,g,b to a 'filter' value that affects all colors in the palette.

T_void ColorAddGlobal ( T_sword16  red,
T_sword16  green,
T_sword16  blue 
)

ColorAddGlobal adds an amount of R,G,B to all values in the palette. Used to indicate damage or effects in the game.

T_void ColorFadeTo ( T_byte8  red,
T_byte8  green,
T_byte8  blue 
)
T_word16 ColorGammaAdjust ( T_void  )
T_byte8 ColorGetBlue ( T_byte8  colornum)
T_byte8 ColorGetGreen ( T_byte8  colornum)
T_byte8 ColorGetRed ( T_byte8  colornum)
T_void ColorGlowUpdate ( T_void  )

ColorGlowUpdate updates the 'glow colors' defined in the palette

T_void ColorInit ( T_void  )

ColorInit inits variables used by routines in color.c

T_void ColorResetFilt ( T_void  )

ColorResetFilt resets the value of the filter to 0,0,0

T_void ColorRestore ( T_void  )

ColorRestore restores the default palette.

T_void ColorSetColor ( T_byte8  colornum,
T_byte8  red,
T_byte8  green,
T_byte8  blue 
)

ColorSetColor permanently sets a color palette value to r,g,b

T_void ColorSetFilt ( T_sbyte8  red,
T_sbyte8  green,
T_sbyte8  blue 
)

ColorAddFilt sets the filter to an amount of r,g,b - filter affects all colors in the palette.

T_void ColorSetGlobal ( T_sbyte8  red,
T_sbyte8  green,
T_sbyte8  blue 
)

ColorAddGlobal sets an amount of R,G,B to all values in the palette. Used to indicate damage or effects in the game.

T_void ColorStoreDefaultPalette ( T_void  )

ColorStoreDefaultPalette stores the current palette for use with other routines in color.c

T_void ColorUpdate ( T_word16  delta)

ColorUpdate moves the entire palette spectrum from current colors towards colors stored in ColorStoreDefaultPalette.