mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 05:11:34 +00:00
Ranking face highlights
This commit is contained in:
parent
60dcd3470b
commit
571ef7173e
2 changed files with 34 additions and 12 deletions
25
src/k_kart.c
25
src/k_kart.c
|
@ -5604,9 +5604,10 @@ static patch_t *kp_positionnum[NUMPOSNUMS][NUMPOSFRAMES];
|
||||||
static patch_t *kp_winnernum[NUMPOSFRAMES];
|
static patch_t *kp_winnernum[NUMPOSFRAMES];
|
||||||
|
|
||||||
static patch_t *kp_facenum[MAXPLAYERS+1];
|
static patch_t *kp_facenum[MAXPLAYERS+1];
|
||||||
|
static patch_t *kp_facehighlight[8];
|
||||||
|
|
||||||
static patch_t *kp_rankbumper;
|
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_ranknobumpers;
|
||||||
|
|
||||||
static patch_t *kp_battlewin;
|
static patch_t *kp_battlewin;
|
||||||
|
@ -5734,10 +5735,17 @@ void K_LoadKartHUDGraphics(void)
|
||||||
kp_facenum[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
|
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
|
// Extra ranking icons
|
||||||
kp_rankbumper = W_CachePatchName("K_BLNICO", PU_HUDGFX);
|
kp_rankbumper = W_CachePatchName("K_BLNICO", PU_HUDGFX);
|
||||||
kp_tinybumpera = W_CachePatchName("K_BLNA", PU_HUDGFX);
|
kp_tinybumper[0] = W_CachePatchName("K_BLNA", PU_HUDGFX);
|
||||||
kp_tinybumperb = W_CachePatchName("K_BLNB", PU_HUDGFX);
|
kp_tinybumper[1] = W_CachePatchName("K_BLNB", PU_HUDGFX);
|
||||||
kp_ranknobumpers = W_CachePatchName("K_NOBLNS", PU_HUDGFX);
|
kp_ranknobumpers = W_CachePatchName("K_NOBLNS", PU_HUDGFX);
|
||||||
|
|
||||||
// Battle graphics
|
// 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);
|
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)
|
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++)
|
for (j = 1; j < players[rankplayer[i]].kartstuff[k_bumper]; j++)
|
||||||
{
|
{
|
||||||
bumperx += 5;
|
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)
|
if (G_BattleGametype() && players[rankplayer[i]].kartstuff[k_bumper] <= 0)
|
||||||
V_DrawScaledPatch(FACE_X-4, Y-3, V_HUDTRANS|V_SNAPTOLEFT, kp_ranknobumpers);
|
V_DrawScaledPatch(FACE_X-4, Y-3, V_HUDTRANS|V_SNAPTOLEFT, kp_ranknobumpers);
|
||||||
else
|
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
|
/*if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] > 0) -- not enough space for this
|
||||||
{
|
{
|
||||||
INT32 bumperx = x+19;
|
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++)
|
for (j = 1; j < players[tab[i].num].kartstuff[k_bumper]; j++)
|
||||||
{
|
{
|
||||||
bumperx += 5;
|
bumperx += 5;
|
||||||
V_DrawMappedPatch(bumperx, y-4, 0, kp_tinybumperb, colormap);
|
V_DrawMappedPatch(bumperx, y-4, 0, kp_tinybumper[1], colormap);
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
21
src/m_menu.c
21
src/m_menu.c
|
@ -7739,9 +7739,12 @@ Update the maxplayers label...
|
||||||
|
|
||||||
if (itemOn == 2 && i == setupm_pselect)
|
if (itemOn == 2 && i == setupm_pselect)
|
||||||
{
|
{
|
||||||
/*V_DrawCharacter(x + 12, y-4 + (skullAnimCounter/5),
|
static UINT8 cursorframe = 0;
|
||||||
'\x1B' | highlightflags, false); // down arrow*/
|
if (skullAnimCounter % 4 == 0)
|
||||||
V_DrawFixedPatch((x-2)<<FRACBITS, (y-2)<<FRACBITS, FRACUNIT, 0, W_CachePatchName("K_CHRCUR", PU_CACHE), colmap);
|
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;
|
x += incrwidth;
|
||||||
|
@ -8080,10 +8083,18 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||||
INT32 x = BASEVIDWIDTH/2 - ((icons+1)*24) - 4;
|
INT32 x = BASEVIDWIDTH/2 - ((icons+1)*24) - 4;
|
||||||
fixed_t scale = FRACUNIT/2;
|
fixed_t scale = FRACUNIT/2;
|
||||||
INT32 offx = 8, offy = 8;
|
INT32 offx = 8, offy = 8;
|
||||||
patch_t *cursor = W_CachePatchName("K_CHRCUR", PU_CACHE);
|
patch_t *cursor;
|
||||||
|
static UINT8 cursorframe = 0;
|
||||||
patch_t *face;
|
patch_t *face;
|
||||||
UINT8 *colmap;
|
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)
|
if (col < 0)
|
||||||
col += numskins;
|
col += numskins;
|
||||||
while (k <= icons)
|
while (k <= icons)
|
||||||
|
@ -8105,7 +8116,7 @@ static void M_DrawSetupMultiPlayerMenu(void)
|
||||||
colmap = R_GetTranslationColormap(col, setupm_fakecolor, 0);
|
colmap = R_GetTranslationColormap(col, setupm_fakecolor, 0);
|
||||||
V_DrawFixedPatch((x+offx)<<FRACBITS, (my+28+offy)<<FRACBITS, FRACUNIT, 0, face, colmap);
|
V_DrawFixedPatch((x+offx)<<FRACBITS, (my+28+offy)<<FRACBITS, FRACUNIT, 0, face, colmap);
|
||||||
if (scale == FRACUNIT) // bit of a hack
|
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)
|
if (++col >= numskins)
|
||||||
col -= numskins;
|
col -= numskins;
|
||||||
x += FixedMul(iconwidth<<FRACBITS, 3*scale/2)/FRACUNIT;
|
x += FixedMul(iconwidth<<FRACBITS, 3*scale/2)/FRACUNIT;
|
||||||
|
|
Loading…
Reference in a new issue