Ranking face highlights

This commit is contained in:
TehRealSalt 2018-11-10 00:01:44 -05:00
parent 60dcd3470b
commit 571ef7173e
2 changed files with 34 additions and 12 deletions

View file

@ -5604,9 +5604,10 @@ static patch_t *kp_positionnum[NUMPOSNUMS][NUMPOSFRAMES];
static patch_t *kp_winnernum[NUMPOSFRAMES];
static patch_t *kp_facenum[MAXPLAYERS+1];
static patch_t *kp_facehighlight[8];
static patch_t *kp_rankbumper;
static patch_t *kp_tinybumpera, *kp_tinybumperb;
static patch_t *kp_tinybumper[2];
static patch_t *kp_ranknobumpers;
static patch_t *kp_battlewin;
@ -5734,10 +5735,17 @@ void K_LoadKartHUDGraphics(void)
kp_facenum[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
}
sprintf(buffer, "K_CHILIx");
for (i = 0; i < 8; i++)
{
buffer[7] = '0'+(i+1);
kp_facehighlight[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
}
// Extra ranking icons
kp_rankbumper = W_CachePatchName("K_BLNICO", PU_HUDGFX);
kp_tinybumpera = W_CachePatchName("K_BLNA", PU_HUDGFX);
kp_tinybumperb = W_CachePatchName("K_BLNB", PU_HUDGFX);
kp_tinybumper[0] = W_CachePatchName("K_BLNA", PU_HUDGFX);
kp_tinybumper[1] = W_CachePatchName("K_BLNB", PU_HUDGFX);
kp_ranknobumpers = W_CachePatchName("K_NOBLNS", PU_HUDGFX);
// Battle graphics
@ -6603,15 +6611,18 @@ static boolean K_drawKartPositionFaces(void)
V_DrawMappedPatch(FACE_X, Y, V_HUDTRANS|V_SNAPTOLEFT, facerankprefix[players[rankplayer[i]].skin], colormap);
if (G_BattleGametype() && players[rankplayer[i]].kartstuff[k_bumper] > 0)
{
V_DrawMappedPatch(bumperx-2, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_tinybumpera, colormap);
V_DrawMappedPatch(bumperx-2, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_tinybumper[0], colormap);
for (j = 1; j < players[rankplayer[i]].kartstuff[k_bumper]; j++)
{
bumperx += 5;
V_DrawMappedPatch(bumperx, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_tinybumperb, colormap);
V_DrawMappedPatch(bumperx, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_tinybumper[1], colormap);
}
}
}
if (i == strank)
V_DrawScaledPatch(FACE_X, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_facehighlight[(leveltime / 4) % 8]);
if (G_BattleGametype() && players[rankplayer[i]].kartstuff[k_bumper] <= 0)
V_DrawScaledPatch(FACE_X-4, Y-3, V_HUDTRANS|V_SNAPTOLEFT, kp_ranknobumpers);
else
@ -6683,11 +6694,11 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
/*if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] > 0) -- not enough space for this
{
INT32 bumperx = x+19;
V_DrawMappedPatch(bumperx-2, y-4, 0, kp_tinybumpera, colormap);
V_DrawMappedPatch(bumperx-2, y-4, 0, kp_tinybumper[0], colormap);
for (j = 1; j < players[tab[i].num].kartstuff[k_bumper]; j++)
{
bumperx += 5;
V_DrawMappedPatch(bumperx, y-4, 0, kp_tinybumperb, colormap);
V_DrawMappedPatch(bumperx, y-4, 0, kp_tinybumper[1], colormap);
}
}*/
}

View file

@ -7739,9 +7739,12 @@ Update the maxplayers label...
if (itemOn == 2 && i == setupm_pselect)
{
/*V_DrawCharacter(x + 12, y-4 + (skullAnimCounter/5),
'\x1B' | highlightflags, false); // down arrow*/
V_DrawFixedPatch((x-2)<<FRACBITS, (y-2)<<FRACBITS, FRACUNIT, 0, W_CachePatchName("K_CHRCUR", PU_CACHE), colmap);
static UINT8 cursorframe = 0;
if (skullAnimCounter % 4 == 0)
cursorframe++;
if (cursorframe > 7)
cursorframe = 0;
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, 0, W_CachePatchName(va("K_BHILI%d", cursorframe+1), PU_CACHE), NULL);
}
x += incrwidth;
@ -8080,10 +8083,18 @@ static void M_DrawSetupMultiPlayerMenu(void)
INT32 x = BASEVIDWIDTH/2 - ((icons+1)*24) - 4;
fixed_t scale = FRACUNIT/2;
INT32 offx = 8, offy = 8;
patch_t *cursor = W_CachePatchName("K_CHRCUR", PU_CACHE);
patch_t *cursor;
static UINT8 cursorframe = 0;
patch_t *face;
UINT8 *colmap;
if (skullAnimCounter % 4 == 0)
cursorframe++;
if (cursorframe > 7)
cursorframe = 0;
cursor = W_CachePatchName(va("K_BHILI%d", cursorframe+1), PU_CACHE);
if (col < 0)
col += numskins;
while (k <= icons)
@ -8105,7 +8116,7 @@ static void M_DrawSetupMultiPlayerMenu(void)
colmap = R_GetTranslationColormap(col, setupm_fakecolor, 0);
V_DrawFixedPatch((x+offx)<<FRACBITS, (my+28+offy)<<FRACBITS, FRACUNIT, 0, face, colmap);
if (scale == FRACUNIT) // bit of a hack
V_DrawFixedPatch((x-2+offx)<<FRACBITS, (my+26+offy)<<FRACBITS, FRACUNIT, 0, cursor, colmap);
V_DrawFixedPatch((x+offx)<<FRACBITS, (my+28+offy)<<FRACBITS, FRACUNIT, 0, cursor, colmap);
if (++col >= numskins)
col -= numskins;
x += FixedMul(iconwidth<<FRACBITS, 3*scale/2)/FRACUNIT;