mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Handle Encore ruby in Y_DrawVoteThumbnail
This commit is contained in:
parent
11eadd4e75
commit
2d8905c816
1 changed files with 15 additions and 18 deletions
33
src/k_vote.c
33
src/k_vote.c
|
|
@ -361,6 +361,7 @@ void Y_SetPlayersVote(const UINT8 playerId, SINT8 newVote)
|
||||||
|
|
||||||
static void Y_DrawVoteThumbnail(fixed_t x, fixed_t y, fixed_t width, INT32 flags, SINT8 v, boolean dim, SINT8 playerID)
|
static void Y_DrawVoteThumbnail(fixed_t x, fixed_t y, fixed_t width, INT32 flags, SINT8 v, boolean dim, SINT8 playerID)
|
||||||
{
|
{
|
||||||
|
const boolean encore = vote_draw.levels[v].encore;
|
||||||
const fixed_t height = (width * BASEVIDHEIGHT) / BASEVIDWIDTH;
|
const fixed_t height = (width * BASEVIDHEIGHT) / BASEVIDWIDTH;
|
||||||
INT32 fx, fy, fw, fh;
|
INT32 fx, fy, fw, fh;
|
||||||
INT32 dupx, dupy;
|
INT32 dupx, dupy;
|
||||||
|
|
@ -414,11 +415,22 @@ static void Y_DrawVoteThumbnail(fixed_t x, fixed_t y, fixed_t width, INT32 flags
|
||||||
|
|
||||||
K_DrawMapThumbnail(
|
K_DrawMapThumbnail(
|
||||||
x, y,
|
x, y,
|
||||||
width, flags,
|
width, flags | ((encore == true) ? V_FLIP : 0),
|
||||||
g_voteLevels[v][0],
|
g_voteLevels[v][0],
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (encore == true)
|
||||||
|
{
|
||||||
|
V_DrawFixedPatch(
|
||||||
|
x + (width / 2) - (vote_draw.ruby_icon->width * (FRACUNIT >> 1)),
|
||||||
|
y + (height / 2) - (vote_draw.ruby_icon->height * (FRACUNIT >> 1)) - (vote_draw.ruby_height << 1),
|
||||||
|
FRACUNIT, flags,
|
||||||
|
vote_draw.ruby_icon,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (dim == true)
|
if (dim == true)
|
||||||
{
|
{
|
||||||
V_DrawFadeFill(
|
V_DrawFadeFill(
|
||||||
|
|
@ -662,11 +674,6 @@ static void Y_DrawVoteSelection(fixed_t offset)
|
||||||
destHop = SELECTION_HOP;
|
destHop = SELECTION_HOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vote_draw.levels[i].encore == true)
|
|
||||||
{
|
|
||||||
flags |= V_FLIP;
|
|
||||||
}
|
|
||||||
|
|
||||||
vote_draw.levels[i].hop += FixedMul(
|
vote_draw.levels[i].hop += FixedMul(
|
||||||
(destHop - vote_draw.levels[i].hop) / 2,
|
(destHop - vote_draw.levels[i].hop) / 2,
|
||||||
renderdeltatics
|
renderdeltatics
|
||||||
|
|
@ -675,20 +682,10 @@ static void Y_DrawVoteSelection(fixed_t offset)
|
||||||
Y_DrawVoteThumbnail(
|
Y_DrawVoteThumbnail(
|
||||||
x, y - vote_draw.levels[i].hop,
|
x, y - vote_draw.levels[i].hop,
|
||||||
SELECTION_WIDTH, flags,
|
SELECTION_WIDTH, flags,
|
||||||
i, (selected == false), -1
|
i, (selected == false),
|
||||||
|
-1
|
||||||
);
|
);
|
||||||
|
|
||||||
if (vote_draw.levels[i].encore == true)
|
|
||||||
{
|
|
||||||
V_DrawFixedPatch(
|
|
||||||
x - (vote_draw.ruby_icon->width * (FRACUNIT >> 1)),
|
|
||||||
y - (vote_draw.ruby_icon->height * (FRACUNIT >> 1)) - (vote_draw.ruby_height << 1),
|
|
||||||
FRACUNIT, (flags & ~V_FLIP),
|
|
||||||
vote_draw.ruby_icon,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
x += SELECTION_SPACING_W;
|
x += SELECTION_SPACING_W;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue