mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Fix offsets, add colormapping
This commit is contained in:
parent
9db0c385f1
commit
94429a1cb6
1 changed files with 25 additions and 18 deletions
43
src/k_kart.c
43
src/k_kart.c
|
|
@ -7376,41 +7376,48 @@ static void K_drawLapStartAnim(void)
|
||||||
{
|
{
|
||||||
// This is an EVEN MORE insanely complicated animation.
|
// This is an EVEN MORE insanely complicated animation.
|
||||||
const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation];
|
const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation];
|
||||||
|
UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, 0);
|
||||||
|
|
||||||
V_DrawScaledPatch(BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)),
|
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
|
||||||
56 - (32*max(0, progress-76)),
|
(48 - (32*max(0, progress-76)))*FRACUNIT,
|
||||||
0, kp_lapanim_emblem);
|
FRACUNIT, V_HUDTRANS,
|
||||||
|
kp_lapanim_emblem, colormap);
|
||||||
|
|
||||||
if (stplyr->laps == (UINT8)(cv_numlaps.value - 1))
|
if (stplyr->laps == (UINT8)(cv_numlaps.value - 1))
|
||||||
{
|
{
|
||||||
V_DrawScaledPatch(27 - (32*max(0, progress-76)),
|
V_DrawFixedPatch((62 - (32*max(0, progress-76)))*FRACUNIT, // 27
|
||||||
32,
|
(-6)*FRACUNIT, // 24
|
||||||
0, kp_lapanim_final[min(progress/2, 10)]);
|
FRACUNIT, V_HUDTRANS,
|
||||||
|
kp_lapanim_final[min(progress/2, 10)], NULL);
|
||||||
|
|
||||||
if (progress/2-12 >= 0)
|
if (progress/2-12 >= 0)
|
||||||
{
|
{
|
||||||
V_DrawScaledPatch(194 + (32*max(0, progress-76)),
|
V_DrawFixedPatch((188 + (32*max(0, progress-76)))*FRACUNIT, // 194
|
||||||
32,
|
(-6)*FRACUNIT, // 24
|
||||||
0, kp_lapanim_lap[min(progress/2-12, 6)]);
|
FRACUNIT, V_HUDTRANS,
|
||||||
|
kp_lapanim_lap[min(progress/2-12, 6)], NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
V_DrawScaledPatch(61 - (32*max(0, progress-76)),
|
V_DrawFixedPatch((82 - (32*max(0, progress-76)))*FRACUNIT, // 61
|
||||||
32,
|
(-6)*FRACUNIT, // 24
|
||||||
0, kp_lapanim_lap[min(progress/2, 6)]);
|
FRACUNIT, V_HUDTRANS,
|
||||||
|
kp_lapanim_lap[min(progress/2, 6)], NULL);
|
||||||
|
|
||||||
if (progress/2-8 >= 0)
|
if (progress/2-8 >= 0)
|
||||||
{
|
{
|
||||||
V_DrawScaledPatch(194 + (32*max(0, progress-76)),
|
V_DrawFixedPatch((188 + (32*max(0, progress-76)))*FRACUNIT, // 194
|
||||||
32,
|
(-6)*FRACUNIT, // 24
|
||||||
0, kp_lapanim_number[(((UINT32)stplyr->laps+1) / 10)][min(progress/2-8, 2)]);
|
FRACUNIT, V_HUDTRANS,
|
||||||
|
kp_lapanim_number[(((UINT32)stplyr->laps+1) / 10)][min(progress/2-8, 2)], NULL);
|
||||||
|
|
||||||
if (progress/2-10 >= 0)
|
if (progress/2-10 >= 0)
|
||||||
{
|
{
|
||||||
V_DrawScaledPatch(221 + (32*max(0, progress-76)),
|
V_DrawFixedPatch((208 + (32*max(0, progress-76)))*FRACUNIT, // 221
|
||||||
32,
|
(-6)*FRACUNIT, // 24
|
||||||
0, kp_lapanim_number[(((UINT32)stplyr->laps+1) % 10)][min(progress/2-10, 2)]);
|
FRACUNIT, V_HUDTRANS,
|
||||||
|
kp_lapanim_number[(((UINT32)stplyr->laps+1) % 10)][min(progress/2-10, 2)], NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue