mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-06 19:31:13 +00:00
M_DrawChallenges: Scrolling question mark background
This commit is contained in:
parent
f9f4d56850
commit
d66a4cff81
1 changed files with 18 additions and 1 deletions
|
|
@ -4828,8 +4828,25 @@ void M_DrawChallenges(void)
|
|||
INT16 offset;
|
||||
|
||||
{
|
||||
patch_t *bg = W_CachePatchName("BGUNLCK2", PU_CACHE);
|
||||
#define questionslow 4 // slows down the scroll by this factor
|
||||
#define questionloop (questionslow*100) // modulo
|
||||
INT32 questionoffset = (challengesmenu.ticker % questionloop);
|
||||
patch_t *bg = W_CachePatchName("BGUNLCKG", PU_CACHE);
|
||||
patch_t *qm = W_CachePatchName("BGUNLSC", PU_CACHE);
|
||||
|
||||
// Background gradient
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, bg, NULL);
|
||||
|
||||
// Scrolling question mark overlay
|
||||
V_DrawFixedPatch(
|
||||
-((160 + questionoffset)*FRACUNIT)/questionslow,
|
||||
-(4*FRACUNIT) - (245*(FixedDiv((questionloop - questionoffset)*FRACUNIT, questionloop*FRACUNIT))),
|
||||
FRACUNIT,
|
||||
V_MODULATE,
|
||||
qm,
|
||||
NULL);
|
||||
#undef questionslow
|
||||
#undef questionloop
|
||||
}
|
||||
|
||||
if (gamedata->challengegrid == NULL || challengesmenu.extradata == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue