Merge branch 'fix-bbox-col-raster' into 'master'
Fix renderhitbox in Software renderer See merge request KartKrew/Kart!1548
This commit is contained in:
parent
8771a08cf7
commit
82f1b11c7d
1 changed files with 9 additions and 10 deletions
19
src/r_bbox.c
19
src/r_bbox.c
|
|
@ -58,11 +58,11 @@ raster_bbox_seg
|
|||
{
|
||||
y /= FRACUNIT;
|
||||
|
||||
h = y + (FixedCeil(abs(h)) / FRACUNIT);
|
||||
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
|
||||
h = y + (FixedCeil(abs(h)) / FRACUNIT);
|
||||
|
||||
if (h >= viewheight)
|
||||
h = viewheight;
|
||||
|
||||
|
|
@ -94,11 +94,10 @@ draw_bbox_col
|
|||
col->y = (centeryfrac - FixedMul(bb->tz, yscale));
|
||||
col->h = FixedMul(bb->height, yscale);
|
||||
|
||||
// Using this function is TOO EASY!
|
||||
V_DrawFill(
|
||||
viewwindowx + col->x,
|
||||
viewwindowy + col->y / FRACUNIT, 1,
|
||||
col->h / FRACUNIT, V_NOSCALESTART | bb->color);
|
||||
if (col->x >= 0 && col->x < viewwidth)
|
||||
{
|
||||
raster_bbox_seg(col->x, col->y, col->h, bb->color);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -127,9 +126,6 @@ draw_bbox_row
|
|||
x1 = a->x;
|
||||
x2 = b->x;
|
||||
|
||||
if (x2 >= viewwidth)
|
||||
x2 = viewwidth - 1;
|
||||
|
||||
if (x1 == x2 || x1 >= viewwidth || x2 < 0)
|
||||
return;
|
||||
|
||||
|
|
@ -157,6 +153,9 @@ draw_bbox_row
|
|||
x1 = 0;
|
||||
}
|
||||
|
||||
if (x2 >= viewwidth)
|
||||
x2 = viewwidth - 1;
|
||||
|
||||
while (x1 < x2)
|
||||
{
|
||||
raster_bbox_seg(x1, y1, s1, bb->color);
|
||||
|
|
|
|||
Loading…
Reference in a new issue