mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 19:31:26 +00:00
Fix M_DrawNightsAttackMountains being broken for obvious reasons
This commit is contained in:
parent
9d9c685dad
commit
1548a22ea9
1 changed files with 6 additions and 3 deletions
|
@ -5388,7 +5388,8 @@ static void M_DrawNightsAttackMountains(void)
|
||||||
static INT32 bgscrollx;
|
static INT32 bgscrollx;
|
||||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||||
patch_t *background = W_CachePatchName(curbgname, PU_PATCH);
|
patch_t *background = W_CachePatchName(curbgname, PU_PATCH);
|
||||||
INT32 x = FixedInt(bgscrollx) % SHORT(background->width);
|
INT16 w = SHORT(background->width);
|
||||||
|
INT32 x = FixedInt(-bgscrollx) % w;
|
||||||
INT32 y = BASEVIDHEIGHT - SHORT(background->height)*2;
|
INT32 y = BASEVIDHEIGHT - SHORT(background->height)*2;
|
||||||
|
|
||||||
if (vid.height != BASEVIDHEIGHT * dupz)
|
if (vid.height != BASEVIDHEIGHT * dupz)
|
||||||
|
@ -5396,11 +5397,13 @@ static void M_DrawNightsAttackMountains(void)
|
||||||
V_DrawFill(0, y+50, vid.width, BASEVIDHEIGHT, V_SNAPTOLEFT|31);
|
V_DrawFill(0, y+50, vid.width, BASEVIDHEIGHT, V_SNAPTOLEFT|31);
|
||||||
|
|
||||||
V_DrawScaledPatch(x, y, V_SNAPTOLEFT, background);
|
V_DrawScaledPatch(x, y, V_SNAPTOLEFT, background);
|
||||||
x += SHORT(background->width);
|
x += w;
|
||||||
if (x < BASEVIDWIDTH)
|
if (x < BASEVIDWIDTH)
|
||||||
V_DrawScaledPatch(x, y, V_SNAPTOLEFT, background);
|
V_DrawScaledPatch(x, y, V_SNAPTOLEFT, background);
|
||||||
|
|
||||||
bgscrollx -= (FRACUNIT/2);
|
bgscrollx += (FRACUNIT/2);
|
||||||
|
if (bgscrollx > w<<FRACBITS)
|
||||||
|
bgscrollx &= 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NiGHTS Attack foreground.
|
// NiGHTS Attack foreground.
|
||||||
|
|
Loading…
Reference in a new issue