mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
ACTUALLY let's do this better
This commit is contained in:
parent
b13a9ad9d1
commit
65a202e843
1 changed files with 7 additions and 6 deletions
|
|
@ -224,18 +224,19 @@ static void F_SkyScroll(INT32 scrollspeed)
|
||||||
{
|
{
|
||||||
INT32 scrolled, x, mx, fakedwidth;
|
INT32 scrolled, x, mx, fakedwidth;
|
||||||
patch_t *pat;
|
patch_t *pat;
|
||||||
|
INT16 patwidth;
|
||||||
|
|
||||||
pat = W_CachePatchName("TITLESKY", PU_CACHE);
|
pat = W_CachePatchName("TITLESKY", PU_CACHE);
|
||||||
|
|
||||||
fakedwidth = SHORT(pat->width);
|
patwidth = SHORT(pat->width);
|
||||||
animtimer = ((finalecount*scrollspeed)/16 + fakedwidth) % fakedwidth;
|
animtimer = ((finalecount*scrollspeed)/16 + patwidth) % patwidth;
|
||||||
|
|
||||||
fakedwidth = vid.width / vid.dupx;
|
fakedwidth = vid.width / vid.dupx;
|
||||||
|
|
||||||
if (rendermode == render_soft)
|
if (rendermode == render_soft)
|
||||||
{ // if only hardware rendering could be this elegant and complete
|
{ // if only hardware rendering could be this elegant and complete
|
||||||
scrolled = (SHORT(pat->width) - animtimer) - 1;
|
scrolled = (patwidth - animtimer) - 1;
|
||||||
for (x = 0, mx = scrolled; x < fakedwidth; x++, mx = (mx+1)%SHORT(pat->width))
|
for (x = 0, mx = scrolled; x < fakedwidth; x++, mx = (mx+1)%patwidth)
|
||||||
F_DrawPatchCol(x, pat, mx);
|
F_DrawPatchCol(x, pat, mx);
|
||||||
}
|
}
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
|
|
@ -243,8 +244,8 @@ static void F_SkyScroll(INT32 scrollspeed)
|
||||||
{ // if only software rendering could be this simple and retarded
|
{ // if only software rendering could be this simple and retarded
|
||||||
scrolled = animtimer;
|
scrolled = animtimer;
|
||||||
if (scrolled > 0)
|
if (scrolled > 0)
|
||||||
V_DrawScaledPatch(scrolled - SHORT(pat->width), 0, 0, pat);
|
V_DrawScaledPatch(scrolled - patwidth, 0, 0, pat);
|
||||||
for (x = 0; x < fakedwidth; x += SHORT(pat->width))
|
for (x = 0; x < fakedwidth; x += patwidth)
|
||||||
V_DrawScaledPatch(x + scrolled, 0, 0, pat);
|
V_DrawScaledPatch(x + scrolled, 0, 0, pat);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue