From f8c1a0f758e68080e4901e722ef7bbd8cbf84667 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Tue, 28 Mar 2023 23:56:54 -0500 Subject: [PATCH] WIP: Marquee & Checker scrolling Bad numbers. Scroll is happening, just not the way we want it to. --- src/y_inter.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 1bea0f66c..a3921608c 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -98,6 +98,10 @@ static INT32 endtic = -1; static INT32 sorttic = -1; static INT32 replayprompttic; +// FUCK YOU +static fixed_t mqscroll = 0; +static fixed_t chkscroll = 0; + intertype_t intertype = int_none; static huddrawlist_h luahuddrawlist_intermission; @@ -631,6 +635,9 @@ skiptallydrawer: // Blending mask for the background patch_t *mask = W_CachePatchName("R_MASK", PU_PATCH); + fixed_t mqloop = SHORT(rrmq->height)*FRACUNIT; + fixed_t chkloop = SHORT(rbgchk->width)*FRACUNIT; + UINT8 *color = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_YELLOW, GTC_CACHE); // I don't even know how necessary this is anymore but I don't want the game yelling at me UINT8 *greymap = R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_GREY, GTC_CACHE); @@ -652,15 +659,30 @@ skiptallydrawer: // Draw the background K_DrawMapThumbnail(0, 0, BASEVIDWIDTH< mqloop) + mqscroll -= mqloop; + + V_DrawFixedPatch(-chkscroll, 0, FRACUNIT, V_SUBTRACT, rbgchk, NULL); + V_DrawFixedPatch(-chkscroll + chkloop, 0, FRACUNIT, V_SUBTRACT, rbgchk, NULL); + + chkscroll += (6*renderdeltatics); + + while (chkscroll > chkloop) + chkscroll -= chkloop; // Draw the header bar V_DrawMappedPatch(20, 24, 0, rtpbr, 0);