k_color: Fix support for more than 255 skincolors

Resolves KartKrew/RingRacers#109
This commit is contained in:
toaster 2024-08-18 16:24:15 +01:00 committed by NepDisk
parent cf9f6fc570
commit 8fc9f62698
2 changed files with 8 additions and 7 deletions

View file

@ -43,11 +43,11 @@ UINT16 K_RainbowColor(tic_t time)
}
/*--------------------------------------------------
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
void K_RainbowColormap(UINT8 *dest_colormap, skincolornum_t skincolor)
See header file for description.
--------------------------------------------------*/
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
void K_RainbowColormap(UINT8 *dest_colormap, skincolornum_t skincolor)
{
INT32 i;
RGBA_t color;
@ -95,7 +95,7 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor)
See header file for description.
--------------------------------------------------*/
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color)
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, skincolornum_t color)
{
INT32 i;
INT32 starttranscolor;

View file

@ -55,7 +55,7 @@ UINT8 K_ColorRelativeLuminance(UINT8 r, UINT8 g, UINT8 b);
UINT16 K_RainbowColor(tic_t time);
/*--------------------------------------------------
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);
void K_RainbowColormap(UINT8 *dest_colormap, skincolornum_t skincolor);
Generates a colormap to "colorize" all palette indicies
to the provided skincolor.
@ -68,11 +68,11 @@ UINT16 K_RainbowColor(tic_t time);
None
--------------------------------------------------*/
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);
void K_RainbowColormap(UINT8 *dest_colormap, skincolornum_t skincolor);
/*--------------------------------------------------
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color);
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, skincolornum_t color);
Generates a translation colormap for Kart, to replace R_GenerateTranslationColormap in r_draw.c
@ -84,7 +84,8 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);
Return:-
None
--------------------------------------------------*/
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color);
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, skincolornum_t color);
#ifdef __cplusplus
} // extern "C"