mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Merge branch 'vaseline-for-challenges' into 'master'
Interpolate challenges menu See merge request KartKrew/Kart!1778
This commit is contained in:
commit
3f58a01774
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;
|
||||||
|
|
@ -6567,7 +6567,7 @@ static void M_DrawChallengePreview(INT32 x, INT32 y)
|
||||||
K_drawButtonAnim(x, y, 0, kp_button_a[1], challengesmenu.ticker);
|
K_drawButtonAnim(x, y, 0, kp_button_a[1], challengesmenu.ticker);
|
||||||
x += SHORT(kp_button_a[1][0]->width);
|
x += SHORT(kp_button_a[1][0]->width);
|
||||||
V_DrawThinString(x, y + 1, highlightflags, "Toggle");
|
V_DrawThinString(x, y + 1, highlightflags, "Toggle");
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -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