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

Colorizing Routines (Grayscale to Shade table) More...

Functions

T_void ColorizeFinish (T_void)
 
T_byte8ColorizeGetTable (E_colorizeTable colorTable)
 
T_void ColorizeInitialize (T_void)
 
T_void ColorizeMemAsm (T_byte8 *p_source, T_byte8 *p_destination, T_word32 count, T_byte8 *p_transTable)
 
T_void ColorizeMemory (T_byte8 *p_source, T_byte8 *p_destination, T_word32 count, E_colorizeTable table)
 

Detailed Description

Colorizing Routines (Grayscale to Shade table)

The game has many creatures and items that were rendered with gray shades. We then colorize the raw graphics using color translation tables to other colors. Doing this allows for more types of creatures. These routine provide the raw optimized translation.

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

Function Documentation

T_void ColorizeFinish ( T_void  )

ColorizeFinish frees up the tables used by colorize.

NOTE: Must call ColorizeInitialize first.

T_byte8* ColorizeGetTable ( E_colorizeTable  colorTable)

ColorizeGetTable returns the actual table of 256 translation values for the given table.

NOTE: Don't call this with an unknown table or with COLORIZE_TABLE_NONE

Parameters
colorTable– Table to use to colorize
Returns
Pointer to table of 256 values
T_void ColorizeInitialize ( T_void  )

Colorize Initialize loads in all the tables needed for doing colorization techniques.

NOTE: Bombs if you call twice before callling ColorizeFinish.

T_void ColorizeMemAsm ( T_byte8 p_source,
T_byte8 p_destination,
T_word32  count,
T_byte8 p_transTable 
)
T_void ColorizeMemory ( T_byte8 p_source,
T_byte8 p_destination,
T_word32  count,
E_colorizeTable  table 
)

ColorizeMemory does the brute work of colorizing a section of memory.

NOTE: The source and destination should be either exactly the same or don't overlap. If you do, unpredictable results will occur.

Parameters
p_source– Memory to colorize
p_destination– Where to put the colorized memory
count– How many bytes to colorize
table– Table to use to colorize