Made Portal_Add static; move ffloors clip reset from R_RenderPlayerView to r_plane.
This commit is contained in:
parent
f536ab3467
commit
581e80ed69
10
src/r_main.c
10
src/r_main.c
|
@ -1114,15 +1114,7 @@ void R_RenderPlayerView(player_t *player)
|
||||||
masks[nummasks - 1].viewsector = viewsector;
|
masks[nummasks - 1].viewsector = viewsector;
|
||||||
curdrawsegs = ds_p;
|
curdrawsegs = ds_p;
|
||||||
|
|
||||||
// opening / clipping determination
|
R_ClearFFloorClips();
|
||||||
for (i = 0; i < viewwidth; i++)
|
|
||||||
{
|
|
||||||
for (p = 0; p < MAXFFLOORS; p++)
|
|
||||||
{
|
|
||||||
ffloor[p].f_clip[i] = (INT16)viewheight;
|
|
||||||
ffloor[p].c_clip[i] = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
R_RenderBSPNode((INT32)numnodes - 1);
|
R_RenderBSPNode((INT32)numnodes - 1);
|
||||||
masks[nummasks - 1].drawsegs[1] = ds_p - drawsegs;
|
masks[nummasks - 1].drawsegs[1] = ds_p - drawsegs;
|
||||||
|
|
|
@ -305,6 +305,23 @@ void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void R_ClearFFloorClips (void)
|
||||||
|
{
|
||||||
|
INT32 i, p;
|
||||||
|
|
||||||
|
// opening / clipping determination
|
||||||
|
for (i = 0; i < viewwidth; i++)
|
||||||
|
{
|
||||||
|
for (p = 0; p < MAXFFLOORS; p++)
|
||||||
|
{
|
||||||
|
ffloor[p].f_clip[i] = (INT16)viewheight;
|
||||||
|
ffloor[p].c_clip[i] = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
numffloors = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// R_ClearPlanes
|
// R_ClearPlanes
|
||||||
// At begining of frame.
|
// At begining of frame.
|
||||||
|
@ -327,8 +344,6 @@ void R_ClearPlanes(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
numffloors = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < MAXVISPLANES; i++)
|
for (i = 0; i < MAXVISPLANES; i++)
|
||||||
for (*freehead = visplanes[i], visplanes[i] = NULL;
|
for (*freehead = visplanes[i], visplanes[i] = NULL;
|
||||||
freehead && *freehead ;)
|
freehead && *freehead ;)
|
||||||
|
|
|
@ -76,6 +76,7 @@ extern lighttable_t **planezlight;
|
||||||
|
|
||||||
void R_InitPlanes(void);
|
void R_InitPlanes(void);
|
||||||
void R_ClearPlanes(void);
|
void R_ClearPlanes(void);
|
||||||
|
void R_ClearFFloorClips (void);
|
||||||
|
|
||||||
void R_MapPlane(INT32 y, INT32 x1, INT32 x2);
|
void R_MapPlane(INT32 y, INT32 x1, INT32 x2);
|
||||||
void R_MakeSpans(INT32 x, INT32 t1, INT32 b1, INT32 t2, INT32 b2);
|
void R_MakeSpans(INT32 x, INT32 t1, INT32 b1, INT32 t2, INT32 b2);
|
||||||
|
|
|
@ -97,7 +97,7 @@ void Portal_ClipApply (const portal_t* portal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
portal_t* Portal_Add (const INT16 x1, const INT16 x2)
|
static portal_t* Portal_Add (const INT16 x1, const INT16 x2)
|
||||||
{
|
{
|
||||||
portal_t *portal = Z_Malloc(sizeof(portal_t), PU_LEVEL, NULL);
|
portal_t *portal = Z_Malloc(sizeof(portal_t), PU_LEVEL, NULL);
|
||||||
INT16 *ceilingclipsave = Z_Malloc(sizeof(INT16)*(x2-x1 + 1), PU_LEVEL, NULL);
|
INT16 *ceilingclipsave = Z_Malloc(sizeof(INT16)*(x2-x1 + 1), PU_LEVEL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue