mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Fix 2p ("wide") splitscreen having an incorrect FINISH arrangement (drawn at wrong scale, moved across screen at wrong speed...)
This commit is contained in:
parent
d1b8b5d2f7
commit
f9ad07da5f
1 changed files with 18 additions and 13 deletions
27
src/k_kart.c
27
src/k_kart.c
|
@ -7140,25 +7140,30 @@ static void K_drawKartFinish(void)
|
||||||
if ((stplyr->kartstuff[k_cardanimation] % (2*5)) / 5) // blink
|
if ((stplyr->kartstuff[k_cardanimation] % (2*5)) / 5) // blink
|
||||||
pnum = 1;
|
pnum = 1;
|
||||||
|
|
||||||
if (splitscreen > 1) // small splitscreen
|
if (splitscreen > 1) // 3/4p, stationary FIN
|
||||||
|
{
|
||||||
pnum += 2;
|
pnum += 2;
|
||||||
else if (splitscreen == 1) // wide splitscreen
|
V_DrawScaledPatch(STCD_X - (SHORT(kp_racefinish[pnum]->width)/2), STCD_Y - (SHORT(kp_racefinish[pnum]->height)/2), splitflags, kp_racefinish[pnum]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//else -- 1/2p, scrolling FINISH
|
||||||
|
{
|
||||||
|
INT32 x, xval;
|
||||||
|
|
||||||
|
if (splitscreen) // wide splitscreen
|
||||||
pnum += 4;
|
pnum += 4;
|
||||||
|
|
||||||
if (splitscreen > 1) // Stationary FIN
|
x = ((vid.width<<FRACBITS)/vid.dupx);
|
||||||
V_DrawScaledPatch(STCD_X - (SHORT(kp_racefinish[pnum]->width)/2), STCD_Y - (SHORT(kp_racefinish[pnum]->height)/2), splitflags, kp_racefinish[pnum]);
|
xval = (SHORT(kp_racefinish[pnum]->width)<<FRACBITS);
|
||||||
else // Scrolling FINISH
|
|
||||||
{
|
|
||||||
INT32 scaleshift = (FRACBITS - splitscreen); // FRACUNIT or FRACUNIT/2
|
|
||||||
INT32 x = ((vid.width<<FRACBITS)/vid.dupx), xval = (SHORT(kp_racefinish[pnum]->width)<<scaleshift);
|
|
||||||
x = ((TICRATE - stplyr->kartstuff[k_cardanimation])*(xval > x ? xval : x))/TICRATE;
|
x = ((TICRATE - stplyr->kartstuff[k_cardanimation])*(xval > x ? xval : x))/TICRATE;
|
||||||
|
|
||||||
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
if (splitscreen && stplyr == &players[secondarydisplayplayer])
|
||||||
x = -x;
|
x = -x;
|
||||||
|
|
||||||
V_DrawFixedPatch(x + (STCD_X<<FRACBITS) - (SHORT(kp_racefinish[pnum]->width)<<(scaleshift-1)),
|
V_DrawFixedPatch(x + (STCD_X<<FRACBITS) - (xval>>1),
|
||||||
(STCD_Y<<FRACBITS) - (SHORT(kp_racefinish[pnum]->height)<<(scaleshift-1)),
|
(STCD_Y<<FRACBITS) - (SHORT(kp_racefinish[pnum]->height)<<(FRACBITS-1)),
|
||||||
(1<<scaleshift),
|
FRACUNIT,
|
||||||
splitflags, kp_racefinish[pnum], NULL);
|
splitflags, kp_racefinish[pnum], NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue