mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Interpolate challenges menu
This commit is contained in:
parent
e2cbf06fa7
commit
17a14208e2
1 changed files with 7 additions and 3 deletions
|
|
@ -5962,7 +5962,7 @@ static void M_DrawChallengeTile(INT16 i, INT16 j, INT32 x, INT32 y, boolean hili
|
||||||
if (challengesmenu.extradata[id].flip != 0
|
if (challengesmenu.extradata[id].flip != 0
|
||||||
&& challengesmenu.extradata[id].flip != (TILEFLIP_MAX/2))
|
&& challengesmenu.extradata[id].flip != (TILEFLIP_MAX/2))
|
||||||
{
|
{
|
||||||
angle_t bad = (FixedAngle((fixed_t)(challengesmenu.extradata[id].flip) * (360*FRACUNIT/TILEFLIP_MAX)) >> ANGLETOFINESHIFT) & FINEMASK;
|
angle_t bad = (FixedAngle(FixedMul(challengesmenu.extradata[id].flip * FRACUNIT + rendertimefrac, 360*FRACUNIT/TILEFLIP_MAX)) >> ANGLETOFINESHIFT) & FINEMASK;
|
||||||
accordion = FINECOSINE(bad);
|
accordion = FINECOSINE(bad);
|
||||||
if (accordion < 0)
|
if (accordion < 0)
|
||||||
accordion = -accordion;
|
accordion = -accordion;
|
||||||
|
|
@ -6822,10 +6822,14 @@ void M_DrawChallenges(void)
|
||||||
{
|
{
|
||||||
#define questionslow 4 // slows down the scroll by this factor
|
#define questionslow 4 // slows down the scroll by this factor
|
||||||
#define questionloop (questionslow*100) // modulo
|
#define questionloop (questionslow*100) // modulo
|
||||||
INT32 questionoffset = (challengesmenu.ticker % questionloop);
|
INT32 questionoffset;
|
||||||
|
double questionoffset_f;
|
||||||
patch_t *bg = W_CachePatchName("BGUNLCKG", PU_CACHE);
|
patch_t *bg = W_CachePatchName("BGUNLCKG", PU_CACHE);
|
||||||
patch_t *qm = W_CachePatchName("BGUNLSC", PU_CACHE);
|
patch_t *qm = W_CachePatchName("BGUNLSC", PU_CACHE);
|
||||||
|
|
||||||
|
questionoffset_f = fmod(challengesmenu.ticker + FixedToFloat(rendertimefrac), questionloop);
|
||||||
|
questionoffset = floor(questionoffset_f);
|
||||||
|
|
||||||
// Background gradient
|
// Background gradient
|
||||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, bg, NULL);
|
V_DrawFixedPatch(0, 0, FRACUNIT, 0, bg, NULL);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue