mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix ruby scale & position on vote screen
This commit is contained in:
parent
2d8905c816
commit
505595b5d8
1 changed files with 6 additions and 7 deletions
13
src/k_vote.c
13
src/k_vote.c
|
|
@ -359,10 +359,12 @@ void Y_SetPlayersVote(const UINT8 playerId, SINT8 newVote)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
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 center_x, fixed_t center_y, fixed_t width, INT32 flags, SINT8 v, boolean dim, SINT8 playerID)
|
||||||
{
|
{
|
||||||
const boolean encore = vote_draw.levels[v].encore;
|
const boolean encore = vote_draw.levels[v].encore;
|
||||||
const fixed_t height = (width * BASEVIDHEIGHT) / BASEVIDWIDTH;
|
const fixed_t height = (width * BASEVIDHEIGHT) / BASEVIDWIDTH;
|
||||||
|
const fixed_t x = center_x - (width >> 1);
|
||||||
|
const fixed_t y = center_y - (height >> 1);
|
||||||
INT32 fx, fy, fw, fh;
|
INT32 fx, fy, fw, fh;
|
||||||
INT32 dupx, dupy;
|
INT32 dupx, dupy;
|
||||||
|
|
||||||
|
|
@ -371,9 +373,6 @@ static void Y_DrawVoteThumbnail(fixed_t x, fixed_t y, fixed_t width, INT32 flags
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
x -= width / 2;
|
|
||||||
y -= height / 2;
|
|
||||||
|
|
||||||
dupx = vid.dupx;
|
dupx = vid.dupx;
|
||||||
dupy = vid.dupy;
|
dupy = vid.dupy;
|
||||||
|
|
||||||
|
|
@ -422,10 +421,10 @@ static void Y_DrawVoteThumbnail(fixed_t x, fixed_t y, fixed_t width, INT32 flags
|
||||||
|
|
||||||
if (encore == true)
|
if (encore == true)
|
||||||
{
|
{
|
||||||
|
const fixed_t rubyScale = width / 72;
|
||||||
V_DrawFixedPatch(
|
V_DrawFixedPatch(
|
||||||
x + (width / 2) - (vote_draw.ruby_icon->width * (FRACUNIT >> 1)),
|
center_x, center_y - FixedMul(vote_draw.ruby_height << 1, rubyScale),
|
||||||
y + (height / 2) - (vote_draw.ruby_icon->height * (FRACUNIT >> 1)) - (vote_draw.ruby_height << 1),
|
rubyScale, flags,
|
||||||
FRACUNIT, flags,
|
|
||||||
vote_draw.ruby_icon,
|
vote_draw.ruby_icon,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue