renders: implement SURF_N64_SCROLL

This commit is contained in:
Denis Pauk 2024-04-22 00:35:54 +03:00
parent eb344a030e
commit 1364e4703f

View file

@ -404,14 +404,38 @@ R_FlowingScroll(const refdef_t *r_newrefdef, int flags, float *sscroll, float *t
}
else
{
multiply = 0.77; // mod 100
multiply = 0.025; // mod 40
}
}
else if (flags & (SURF_N64_SCROLL_X | SURF_N64_SCROLL_Y))
{
multiply = 0.0125; // mod 80
}
*sscroll = -64.0f * ((r_newrefdef->time * multiply) - (int)(r_newrefdef->time * multiply));
if (flags & (SURF_DRAWTURB | SURF_FLOWING | SURF_N64_SCROLL_X))
{
*sscroll = -64.0f * ((r_newrefdef->time * multiply) - (int)(r_newrefdef->time * multiply));
}
if (*sscroll == 0.0)
if (flags & SURF_N64_SCROLL_Y)
{
*tscroll = -64.0f * ((r_newrefdef->time * multiply) - (int)(r_newrefdef->time * multiply));
}
/* Opposite direction with SCROLL_X|Y ?, check at -1714 -824 238 q64/outpost */
if (!(flags & SURF_N64_SCROLL_FLIP) && (flags & (SURF_N64_SCROLL_Y | SURF_N64_SCROLL_X)))
{
*sscroll = -64 - *sscroll;
*tscroll = -64 - *tscroll;
}
if (*sscroll >= 0.0)
{
*sscroll = -64.0;
}
if (*tscroll >= 0.0)
{
*tscroll = -64.0;
}
}