diff --git a/src/deh_lua.c b/src/deh_lua.c index 6c97cda93df84517684917770c7e1d7e40cc92a3..224d0c010ca7ee6def3e35cfeda4801e90f1ccc3 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -143,7 +143,7 @@ static inline int lib_freeslot(lua_State *L) CONS_Printf("Skincolor SKINCOLOR_%s allocated.\n",word); FREE_SKINCOLORS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL); strcpy(FREE_SKINCOLORS[i],word); - skincolors[i].cache_spraycan = UINT16_MAX; + skincolors[SKINCOLOR_FIRSTFREESLOT+i].cache_spraycan = UINT16_MAX; numskincolors++; lua_pushinteger(L, SKINCOLOR_FIRSTFREESLOT + i); r++; diff --git a/src/deh_soc.c b/src/deh_soc.c index b0e7a473a9181fab7b712459bbf82c989d34fc5c..32475d0a6268ffd09ecec1fe9a676960f317008c 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -334,7 +334,7 @@ void readfreeslots(MYFILE *f) CONS_Printf("Skincolor SKINCOLOR_%s allocated.\n",word); FREE_SKINCOLORS[i] = Z_Malloc(strlen(word)+1, PU_STATIC, NULL); strcpy(FREE_SKINCOLORS[i],word); - skincolors[i].cache_spraycan = UINT16_MAX; + skincolors[SKINCOLOR_FIRSTFREESLOT+i].cache_spraycan = UINT16_MAX; numskincolors++; break; } diff --git a/src/k_color.c b/src/k_color.c index 35ea3d6a82e4c5e24f69de37989d0f872d21971f..dcf6e0fa78ff1daaa08648dad154fed9c857c02a 100644 --- a/src/k_color.c +++ b/src/k_color.c @@ -53,11 +53,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; @@ -193,7 +193,7 @@ static void K_IntermissionColormap(UINT8 *dest_colormap) } } - UINT16 skincolor = SKINCOLOR_INTERMISSION1; + skincolornum_t skincolor = SKINCOLOR_INTERMISSION1; const double blue_start = 3.0; const double blue_end = 5.0; const double green_buffer = 0.5; @@ -214,11 +214,11 @@ static void K_IntermissionColormap(UINT8 *dest_colormap) } /*-------------------------------------------------- - void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color) + void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, skincolornum_t color) 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; diff --git a/src/k_color.h b/src/k_color.h index 2123b22e8b242b702d9dee2eec8dc28f51bf1468..3d922ce5f8665e04e1ce224e0b4f80aebdd3c3e4 100644 --- a/src/k_color.h +++ b/src/k_color.h @@ -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,7 +68,7 @@ UINT16 K_RainbowColor(tic_t time); None --------------------------------------------------*/ -void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor); +void K_RainbowColormap(UINT8 *dest_colormap, skincolornum_t skincolor); /*-------------------------------------------------- UINT8 K_HitlagColorValue(RGBA_t color); @@ -100,7 +100,7 @@ UINT8 K_HitlagColorValue(RGBA_t color); void K_HitlagColormap(UINT8 *dest_colormap); /*-------------------------------------------------- - 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 @@ -113,7 +113,7 @@ void K_HitlagColormap(UINT8 *dest_colormap); None --------------------------------------------------*/ -void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color); +void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, skincolornum_t color); /*-------------------------------------------------- diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 3d66bf52f695ad147c832e0c6d3ac8f1c112cc6c..be30fef7548866215fc100a9cd534ef3167d95be 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -4881,6 +4881,12 @@ static void K_drawKartMinimap(void) if (encoremode) ang = ANGLE_180 - ang; + if (skin && mobj->color && !mobj->colorized // relevant to redo + && skins[skin].starttranscolor != skins[0].starttranscolor) // redoing would have an affect + { + colormap = R_GetTranslationColormap(TC_DEFAULT, static_cast<skincolornum_t>(mobj->color), GTC_CACHE); + } + K_drawKartMinimapIcon( interpx, interpy,