mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Revert debug line drawing for R_RenderMaskedSegRange
Reverts parts of b7ef8275c
This commit is contained in:
parent
08b5bf8c4c
commit
1fa98a08d6
2 changed files with 4 additions and 30 deletions
29
src/r_segs.c
29
src/r_segs.c
|
|
@ -549,10 +549,9 @@ static boolean R_CheckBlendMode(const line_t *ldef, INT32 bmnum)
|
|||
|
||||
void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||
{
|
||||
INT32 texnum, bmnum, i;
|
||||
INT32 texnum, bmnum;
|
||||
void (*colfunc_2s)(column_t *, column_t *, INT32);
|
||||
line_t *ldef;
|
||||
INT32 range;
|
||||
|
||||
// Calculate light table.
|
||||
// Use different light tables
|
||||
|
|
@ -560,32 +559,6 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
// OPTIMIZE: get rid of LIGHTSEGSHIFT globally
|
||||
curline = ds->curline;
|
||||
|
||||
if (R_IsDebugLine(curline))
|
||||
{
|
||||
const UINT8 thickness = 4;
|
||||
const UINT8 pal = (leveltime % 70 < 35) ? 0x23 : 0x00;
|
||||
|
||||
const INT32 horizon = ((centeryfrac>>4) + 1 + HEIGHTUNIT - 1) >> HEIGHTBITS;
|
||||
const INT32 y = max(0, min(horizon, vid.height - thickness));
|
||||
|
||||
UINT8 *p = &topleft[x1 + (y * vid.width)];
|
||||
|
||||
range = max(x2 - x1, 0) + 1;
|
||||
|
||||
for (i = 0; i < thickness; ++i)
|
||||
{
|
||||
memset(p, pal, range);
|
||||
p += vid.width;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (ds->maskedtexturecol == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
frontsector = curline->frontsector;
|
||||
backsector = curline->backsector;
|
||||
texnum = R_GetTextureNum(curline->sidedef->midtexture);
|
||||
|
|
|
|||
|
|
@ -2899,7 +2899,7 @@ static void R_CreateDrawNodes(maskcount_t* mask, drawnode_t* head, boolean temps
|
|||
}
|
||||
ds->curline->polyseg->visplane = NULL;
|
||||
}
|
||||
if (ds->maskedtexturecol || R_IsDebugLine(ds->curline))
|
||||
if (ds->maskedtexturecol)
|
||||
{
|
||||
entry = R_CreateDrawNode(head);
|
||||
entry->seg = ds;
|
||||
|
|
@ -3698,10 +3698,11 @@ static void R_DrawMaskedList (drawnode_t* head)
|
|||
R_DoneWithNode(r2);
|
||||
r2 = next;
|
||||
}
|
||||
else if (r2->seg)
|
||||
else if (r2->seg && r2->seg->maskedtexturecol != NULL)
|
||||
{
|
||||
next = r2->prev;
|
||||
R_RenderMaskedSegRange(r2->seg, r2->seg->x1, r2->seg->x2);
|
||||
r2->seg->maskedtexturecol = NULL;
|
||||
R_DoneWithNode(r2);
|
||||
r2 = next;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue