mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Made Portal_Add static; move ffloors clip reset from R_RenderPlayerView to r_plane.
This commit is contained in:
parent
f536ab3467
commit
581e80ed69
4 changed files with 20 additions and 12 deletions
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;
|
||||
curdrawsegs = ds_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;
|
||||
}
|
||||
}
|
||||
R_ClearFFloorClips();
|
||||
|
||||
R_RenderBSPNode((INT32)numnodes - 1);
|
||||
masks[nummasks - 1].drawsegs[1] = ds_p - drawsegs;
|
||||
|
|
|
@ -305,6 +305,23 @@ void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
|||
#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
|
||||
// At begining of frame.
|
||||
|
@ -327,8 +344,6 @@ void R_ClearPlanes(void)
|
|||
}
|
||||
}
|
||||
|
||||
numffloors = 0;
|
||||
|
||||
for (i = 0; i < MAXVISPLANES; i++)
|
||||
for (*freehead = visplanes[i], visplanes[i] = NULL;
|
||||
freehead && *freehead ;)
|
||||
|
|
|
@ -76,6 +76,7 @@ extern lighttable_t **planezlight;
|
|||
|
||||
void R_InitPlanes(void);
|
||||
void R_ClearPlanes(void);
|
||||
void R_ClearFFloorClips (void);
|
||||
|
||||
void R_MapPlane(INT32 y, INT32 x1, INT32 x2);
|
||||
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);
|
||||
INT16 *ceilingclipsave = Z_Malloc(sizeof(INT16)*(x2-x1 + 1), PU_LEVEL, NULL);
|
||||
|
|
Loading…
Reference in a new issue