diff --git a/src/f_finale.c b/src/f_finale.c index b863ea74b..fb67e9271 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -611,7 +611,7 @@ void F_CreditDrawer(void) if (credits_pics[i].colorize != SKINCOLOR_NONE) { - colormap = R_GetTranslationColormap(TC_RAINBOW, credits_pics[i].colorize, 0); + colormap = R_GetTranslationColormap(TC_RAINBOW, credits_pics[i].colorize, GTC_MENUCACHE); sc = FRACUNIT; // quick hack so I don't have to add another field to credits_pics } @@ -1103,6 +1103,10 @@ void F_StartWaitingPlayers(void) finalecount = 0; randskin = M_RandomKey(numskins); + + if (waitcolormap) + Z_Free(waitcolormap); + waitcolormap = R_GetTranslationColormap(randskin, skins[randskin].prefcolor, 0); for (i = 0; i < 2; i++) diff --git a/src/k_kart.c b/src/k_kart.c index 1190ab4ff..04901f86b 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -6989,7 +6989,7 @@ static void K_drawKartItem(void) } if (localcolor != SKINCOLOR_NONE) - colmap = R_GetTranslationColormap(colormode, localcolor, 0); + colmap = R_GetTranslationColormap(colormode, localcolor, GTC_CACHE); V_DrawScaledPatch(fx, fy, V_HUDTRANS|fflags, localbg); @@ -7651,7 +7651,7 @@ static void K_drawKartSpeedometer(void) static void K_drawKartBumpersOrKarma(void) { - UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, 0); + UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, GTC_CACHE); INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTOLEFT); INT32 fx = 0, fy = 0, fflags = 0; boolean flipstring = false; // same as laps, used for splitscreen @@ -7859,7 +7859,7 @@ static void K_drawKartPlayerCheck(void) else if (x > 306) x = 306; - colormap = R_GetTranslationColormap(TC_DEFAULT, players[i].mo->color, 0); + colormap = R_GetTranslationColormap(TC_DEFAULT, players[i].mo->color, GTC_CACHE); V_DrawMappedPatch(x, CHEK_Y, V_HUDTRANS|splitflags, kp_check[pnum], colormap); } } @@ -8388,16 +8388,16 @@ static void K_drawKartFirstPerson(void) // drift sparks! if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dsthree)) - colmap = R_GetTranslationColormap(TC_RAINBOW, (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))), 0); + colmap = R_GetTranslationColormap(TC_RAINBOW, (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))), GTC_CACHE); else if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dstwo)) - colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_KETCHUP, 0); + colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_KETCHUP, GTC_CACHE); else if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dsone)) - colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_SAPPHIRE, 0); + colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_SAPPHIRE, GTC_CACHE); else #endif // invincibility/grow/shrink! if (stplyr->mo->colorized && stplyr->mo->color) - colmap = R_GetTranslationColormap(TC_RAINBOW, stplyr->mo->color, 0); + colmap = R_GetTranslationColormap(TC_RAINBOW, stplyr->mo->color, GTC_CACHE); } V_DrawFixedPatch(x, y, scale, splitflags, kp_fpview[target], colmap); @@ -8507,7 +8507,7 @@ static void K_drawInput(void) else { UINT8 *colormap; - colormap = R_GetTranslationColormap(0, stplyr->skincolor, 0); + colormap = R_GetTranslationColormap(0, stplyr->skincolor, GTC_CACHE); V_DrawFixedPatch(x<kartstuff[k_lapanimation]; - UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, 0); + UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, GTC_CACHE); V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT, (48 - (32*max(0, progress-76)))*FRACUNIT, @@ -8906,7 +8906,7 @@ void K_drawKartHUD(void) for (c = 1; c < MAXSKINCOLORS; c++) { - UINT8 *cm = R_GetTranslationColormap(TC_RAINBOW, c, 0); + UINT8 *cm = R_GetTranslationColormap(TC_RAINBOW, c, GTC_CACHE); V_DrawFixedPatch(x<>1, 0, facewantprefix[stplyr->skin], cm); x += 16; diff --git a/src/m_menu.c b/src/m_menu.c index 873c04a38..3b4e98fa6 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3474,7 +3474,7 @@ static void M_DrawMapEmblems(INT32 mapnum, INT32 x, INT32 y) if (emblem->collected) V_DrawSmallMappedPatch(x, y, 0, W_CachePatchName(M_GetEmblemPatch(emblem), PU_CACHE), - R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_CACHE)); + R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_MENUCACHE)); else V_DrawSmallScaledPatch(x, y, 0, W_CachePatchName("NEEDIT", PU_CACHE)); @@ -3811,7 +3811,7 @@ static void M_DrawPauseMenu(void) if (emblem->collected) V_DrawSmallMappedPatch(40, 44 + (i*8), 0, W_CachePatchName(M_GetEmblemPatch(emblem), PU_CACHE), - R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_CACHE)); + R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_MENUCACHE)); else V_DrawSmallScaledPatch(40, 44 + (i*8), 0, W_CachePatchName("NEEDIT", PU_CACHE)); @@ -5359,7 +5359,7 @@ static void M_DrawEmblemHints(void) { collected = recommendedflags; V_DrawMappedPatch(12, 12+(28*j), 0, W_CachePatchName(M_GetEmblemPatch(emblem), PU_CACHE), - R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_CACHE)); + R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(emblem), GTC_MENUCACHE)); } else { @@ -5702,7 +5702,7 @@ static void M_DrawLoadGameData(void) V_DrawScaledPatch(SP_LoadDef.x,144+8,0,W_CachePatchName(skins[savegameinfo[saveSlotSelected].skinnum].face, PU_CACHE)); else { - UINT8 *colormap = R_GetTranslationColormap(savegameinfo[saveSlotSelected].skinnum, savegameinfo[saveSlotSelected].skincolor, 0); + UINT8 *colormap = R_GetTranslationColormap(savegameinfo[saveSlotSelected].skinnum, savegameinfo[saveSlotSelected].skincolor, GTC_MENUCACHE); V_DrawMappedPatch(SP_LoadDef.x,144+8,0,W_CachePatchName(skins[savegameinfo[saveSlotSelected].skinnum].face, PU_CACHE), colormap); } @@ -6392,7 +6392,7 @@ static void M_DrawStatsMaps(int location) if (exemblem->collected) V_DrawSmallMappedPatch(295, y, 0, W_CachePatchName(M_GetExtraEmblemPatch(exemblem), PU_CACHE), - R_GetTranslationColormap(TC_DEFAULT, M_GetExtraEmblemColor(exemblem), GTC_CACHE)); + R_GetTranslationColormap(TC_DEFAULT, M_GetExtraEmblemColor(exemblem), GTC_MENUCACHE)); else V_DrawSmallScaledPatch(295, y, 0, W_CachePatchName("NEEDIT", PU_CACHE)); @@ -6527,7 +6527,7 @@ void M_DrawTimeAttackMenu(void) // Character face! if (W_CheckNumForName(skins[cv_chooseskin.value-1].facewant) != LUMPERROR) { - UINT8 *colormap = R_GetTranslationColormap(cv_chooseskin.value-1, cv_playercolor.value, 0); + UINT8 *colormap = R_GetTranslationColormap(cv_chooseskin.value-1, cv_playercolor.value, GTC_MENUCACHE); V_DrawMappedPatch(BASEVIDWIDTH-x - SHORT(facewantprefix[cv_chooseskin.value-1]->width), y, 0, facewantprefix[cv_chooseskin.value-1], colormap); } @@ -6652,7 +6652,7 @@ void M_DrawTimeAttackMenu(void) if (em->collected) V_DrawMappedPatch(BASEVIDWIDTH - 64 - 24, y+48, 0, W_CachePatchName(M_GetEmblemPatch(em), PU_CACHE), - R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(em), GTC_CACHE)); + R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(em), GTC_MENUCACHE)); else V_DrawScaledPatch(BASEVIDWIDTH - 64 - 24, y+48, 0, W_CachePatchName("NEEDIT", PU_CACHE)); @@ -6812,7 +6812,7 @@ static boolean M_QuitTimeAttackMenu(void) if (em->collected) V_DrawSmallMappedPatch(160+88, yHeight, 0, W_CachePatchName(M_GetEmblemPatch(em), PU_CACHE), - R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(em), GTC_CACHE)); + R_GetTranslationColormap(TC_DEFAULT, M_GetEmblemColor(em), GTC_MENUCACHE)); else V_DrawSmallScaledPatch(160+88, yHeight, 0, W_CachePatchName("NEEDIT", PU_CACHE)); @@ -7886,7 +7886,7 @@ Update the maxplayers label... if (!trans && i > cv_splitplayers.value) trans = V_TRANSLUCENT; - colmap = R_GetTranslationColormap(pskin, pcol, 0); + colmap = R_GetTranslationColormap(pskin, pcol, GTC_MENUCACHE); V_DrawFixedPatch(x<