Skip to content

Commit af969f7

Browse files
authored
Tile background flat (grnrock) the same as vanilla (#642)
1 parent a55a020 commit af969f7

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

prboom2/src/r_draw.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -569,19 +569,10 @@ void R_FillBackScreen (void)
569569
return;
570570
}
571571

572-
if (V_IsOpenGLMode())
573-
V_FillFlat(grnrock.lumpnum, 1, 0, stbar_top, SCREENWIDTH, ST_SCALED_HEIGHT, VPT_STRETCH);
572+
if (V_IsOpenGLMode()) // OpenGL has no way to adjust y-offset independent from height
573+
V_FillFlat(grnrock.lumpnum, 1, 0, 0, SCREENWIDTH, SCREENHEIGHT, VPT_STRETCH);
574574
else
575-
{
576-
V_FillFlat(grnrock.lumpnum, 1,
577-
0, stbar_top, ST_SCALED_OFFSETX, ST_SCALED_HEIGHT, VPT_STRETCH);
578-
V_FillFlat(grnrock.lumpnum, 1,
579-
SCREENWIDTH - ST_SCALED_OFFSETX, stbar_top, ST_SCALED_OFFSETX, ST_SCALED_HEIGHT, VPT_STRETCH);
580-
581-
// For custom huds, need to put the backfill inside the bar area (in the copy buffer)
582-
V_FillFlat(grnrock.lumpnum, 0,
583-
ST_SCALED_OFFSETX, stbar_top, SCREENWIDTH - 2 * ST_SCALED_OFFSETX, ST_SCALED_HEIGHT, VPT_STRETCH);
584-
}
575+
V_FillFlat(grnrock.lumpnum, 1, 0, stbar_top, SCREENWIDTH, ST_SCALED_HEIGHT, VPT_STRETCH);
585576

586577
// heretic_note: I think this looks bad, so I'm skipping it...
587578
if (!heretic)

prboom2/src/v_video.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static void FUNC_V_FillFlat(int lump, int scrn, int x, int y, int width, int hei
278278

279279
for (sy = y; sy < y + height; ++sy)
280280
{
281-
src_y_offset = 64 * ((int) ((sy - y) / ratio_y) % 64);
281+
src_y_offset = 64 * ((int) (sy / ratio_y) % 64);
282282
dest = screens[scrn].data + pitch * sy + x;
283283

284284
for (sx = x; sx < x + width; ++sx)

0 commit comments

Comments
 (0)