few more hw_ file cleanups
This commit is contained in:
1 parent
3cca53e750
commit
dd521f2d6a
5 files changed
+32
-32
No files matched your search
+26
-26
@@ -1101,15 +1101,15 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
||||
{
|
||||
bheight = FixedToFloat(P_GetFFloorBottomZAt(list[i].caster, v1x, v1y));
|
||||
endbheight = FixedToFloat(P_GetFFloorBottomZAt(list[i].caster, v2x, v2y));
|
||||
}
|
||||
|
||||
if (endheight >= endtop && height >= top)
|
||||
{
|
||||
if (solid && top > bheight)
|
||||
top = bheight;
|
||||
if (endheight >= endtop && height >= top)
|
||||
{
|
||||
if (top > bheight)
|
||||
top = bheight;
|
||||
|
||||
if (solid && endtop > endbheight)
|
||||
endtop = endbheight;
|
||||
if (endtop > endbheight)
|
||||
endtop = endbheight;
|
||||
}
|
||||
}
|
||||
|
||||
if (i + 1 < sector->numlights)
|
||||
@@ -2365,11 +2365,11 @@ static void HWR_AddLine(seg_t *line)
|
||||
|
||||
gl_curline = line;
|
||||
|
||||
v1x = gl_curline->v1->x;
|
||||
v1y = gl_curline->v1->y;
|
||||
v1x = line->v1->x;
|
||||
v1y = line->v1->y;
|
||||
|
||||
v2x = gl_curline->v2->x;
|
||||
v2y = gl_curline->v2->y;
|
||||
v2x = line->v2->x;
|
||||
v2y = line->v2->y;
|
||||
|
||||
// OPTIMIZE: quickly reject orthogonal back sides.
|
||||
angle1 = R_PointToAngle64(v1x, v1y);
|
||||
@@ -2405,6 +2405,7 @@ static boolean HWR_CheckBBox(const fixed_t *bspcoord)
|
||||
{
|
||||
fixed_t px1, py1, px2, py2;
|
||||
angle_t angle1, angle2;
|
||||
const INT32* check;
|
||||
|
||||
// Find the corners of the box
|
||||
// that define the edges from current viewpoint.
|
||||
@@ -2416,10 +2417,12 @@ static boolean HWR_CheckBBox(const fixed_t *bspcoord)
|
||||
if (boxpos == 5)
|
||||
return true;
|
||||
|
||||
px1 = bspcoord[checkcoord[boxpos][0]];
|
||||
py1 = bspcoord[checkcoord[boxpos][1]];
|
||||
px2 = bspcoord[checkcoord[boxpos][2]];
|
||||
py2 = bspcoord[checkcoord[boxpos][3]];
|
||||
check = checkcoord[boxpos];
|
||||
|
||||
px1 = bspcoord[check[0]];
|
||||
py1 = bspcoord[check[1]];
|
||||
px2 = bspcoord[check[2]];
|
||||
py2 = bspcoord[check[3]];
|
||||
|
||||
if (current_bsp_culling_distance)
|
||||
{
|
||||
@@ -3061,15 +3064,12 @@ doaddline:
|
||||
// hurdler: false: we only add the sprites, the walls are drawn first
|
||||
if (line)
|
||||
{
|
||||
if (sub->sector->validcount != validcount)
|
||||
{
|
||||
// draw sprites first, coz they are clipped to the solidsegs of
|
||||
// subsectors more 'in front'
|
||||
if (cv_drawdist.value || current_bsp_culling_distance)
|
||||
HWR_AddSprites<AddSpritesType::kLimitDist>(gl_frontsector);
|
||||
else
|
||||
HWR_AddSprites<AddSpritesType::kNoLimitDist>(gl_frontsector);
|
||||
}
|
||||
// draw sprites first, coz they are clipped to the solidsegs of
|
||||
// subsectors more 'in front'
|
||||
if (cv_drawdist.value || current_bsp_culling_distance)
|
||||
HWR_AddSprites<AddSpritesType::kLimitDist>(gl_frontsector);
|
||||
else
|
||||
HWR_AddSprites<AddSpritesType::kNoLimitDist>(gl_frontsector);
|
||||
|
||||
//Hurdler: at this point validcount must be the same, but is not because
|
||||
// gl_frontsector doesn't point anymore to sub->sector due to
|
||||
@@ -5538,8 +5538,8 @@ static void HWR_RenderViewpoint(gl_portal_t *rootportal, int stencil_level, bool
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
void HWR_RenderPortalViewpoint(gl_portal_t *rootportal, int stencil_level, boolean allow_portals) {
|
||||
HWR_RenderViewpoint<RenderViewpointType::kPortal>(rootportal, stencil_level, allow_portals);
|
||||
void HWR_RenderPortalViewpoint(gl_portal_t *rootportal, int stencil_level) {
|
||||
HWR_RenderViewpoint<RenderViewpointType::kPortal>(rootportal, stencil_level, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ void HWR_SetViewSize(void);
|
||||
void HWR_AddCommands(void);
|
||||
|
||||
void HWR_RenderPlayerView(void);
|
||||
void HWR_RenderPortalViewpoint(gl_portal_t *rootportal, int stencil_level, boolean allow_portals);
|
||||
void HWR_RenderPortalViewpoint(gl_portal_t *rootportal, int stencil_level);
|
||||
|
||||
void HWR_ClearSkyDome(void);
|
||||
void HWR_BuildSkyDome(void);
|
||||
|
||||
@@ -170,7 +170,7 @@ void HWR_RenderPortal(gl_portal_t* portal, gl_portal_t* rootportal, const float
|
||||
HWR_PortalFrame(portal);
|
||||
|
||||
// call HWR_RenderViewpoint
|
||||
HWR_RenderPortalViewpoint(portal, stencil_level + 1, true);
|
||||
HWR_RenderPortalViewpoint(portal, stencil_level + 1);
|
||||
|
||||
// return to current frame
|
||||
if (rootportal)
|
||||
|
||||
+1
-1
@@ -320,7 +320,7 @@ static void R_AddLine(seg_t *line)
|
||||
INT32 x1, x2;
|
||||
angle_t angle1, angle2, span, tspan;
|
||||
static sector_t tempsec;
|
||||
boolean bothfloorssky = false;
|
||||
boolean bothfloorssky = false;
|
||||
|
||||
g_portal = NULL;
|
||||
|
||||
|
||||
+3
-3
@@ -423,9 +423,9 @@ static void ApplyPaletteDelta(const RGBA_t *pal_in, RGBA_t *pal_out, const INT16
|
||||
INT16 r = (INT16)pal_in[i].s.red + pal_delta[i][0];
|
||||
INT16 g = (INT16)pal_in[i].s.green + pal_delta[i][1];
|
||||
INT16 b = (INT16)pal_in[i].s.blue + pal_delta[i][2];
|
||||
pal_out[i].s.red = (UINT8)CLAMP(r, 0 , 255);
|
||||
pal_out[i].s.green = (UINT8)CLAMP(g, 0 , 255);
|
||||
pal_out[i].s.blue = (UINT8)CLAMP(b, 0 , 255);
|
||||
pal_out[i].s.red = (UINT8)CLAMP(r, 0, 255);
|
||||
pal_out[i].s.green = (UINT8)CLAMP(g, 0, 255);
|
||||
pal_out[i].s.blue = (UINT8)CLAMP(b, 0, 255);
|
||||
pal_out[i].s.alpha = 0xFF; // pal_in[i].s.alpha
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user