Amulets & Armor
v1.02
Open Source Game
|
Colorizing Routines (Grayscale to Shade table) More...
Functions | |
T_void | ColorizeFinish (T_void) |
T_byte8 * | ColorizeGetTable (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) |
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.
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
colorTable | – Table to use to colorize |
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.
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 |