mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-28 06:42:09 +00:00
Rename drawseg_t to DrawSegment
This commit is contained in:
parent
9d9395c855
commit
2821c15795
12 changed files with 36 additions and 36 deletions
|
@ -321,7 +321,7 @@ namespace swrenderer
|
|||
I_FatalError("Bad R_StoreWallRange: %i to %i", start, stop);
|
||||
#endif
|
||||
|
||||
drawseg_t *draw_segment = R_AddDrawSegment();
|
||||
DrawSegment *draw_segment = R_AddDrawSegment();
|
||||
|
||||
if (!rw_prepped)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ struct FDynamicColormap;
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
struct drawseg_t;
|
||||
struct DrawSegment;
|
||||
struct FWallCoords;
|
||||
class ProjectedWallLine;
|
||||
class ProjectedWallTexcoords;
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace swrenderer
|
|||
}
|
||||
|
||||
// Create a drawseg to clip sprites to the sky plane
|
||||
drawseg_t *draw_segment = R_AddDrawSegment();
|
||||
DrawSegment *draw_segment = R_AddDrawSegment();
|
||||
draw_segment->CurrentPortalUniq = CurrentPortalUniq;
|
||||
draw_segment->siz1 = INT_MAX;
|
||||
draw_segment->siz2 = INT_MAX;
|
||||
|
|
|
@ -47,7 +47,7 @@ CVAR(Bool, r_fullbrightignoresectorcolor, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG
|
|||
namespace swrenderer
|
||||
{
|
||||
bool RenderTranslucentPass::DrewAVoxel;
|
||||
TArray<drawseg_t *> RenderTranslucentPass::portaldrawsegs;
|
||||
TArray<DrawSegment *> RenderTranslucentPass::portaldrawsegs;
|
||||
|
||||
void RenderTranslucentPass::Deinit()
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ namespace swrenderer
|
|||
// a) exit early if no relevant info is found and
|
||||
// b) skip most of the collected drawsegs which have no portal attached.
|
||||
portaldrawsegs.Clear();
|
||||
for (drawseg_t* seg = ds_p; seg-- > firstdrawseg; ) // copied code from killough below
|
||||
for (DrawSegment* seg = ds_p; seg-- > firstdrawseg; ) // copied code from killough below
|
||||
{
|
||||
// I don't know what makes this happen (some old top-down portal code or possibly skybox code? something adds null lines...)
|
||||
// crashes at the first frame of the first map of Action2.wad
|
||||
|
@ -98,7 +98,7 @@ namespace swrenderer
|
|||
if (renderportal->CurrentPortalInSkybox)
|
||||
return false;
|
||||
|
||||
for (drawseg_t *seg : portaldrawsegs)
|
||||
for (DrawSegment *seg : portaldrawsegs)
|
||||
{
|
||||
// ignore segs from other portals
|
||||
if (seg->CurrentPortalUniq != renderportal->CurrentPortalUniq)
|
||||
|
@ -143,7 +143,7 @@ namespace swrenderer
|
|||
{
|
||||
Clip3DFloors::Instance()->fake3D |= FAKE3D_REFRESHCLIP;
|
||||
}
|
||||
for (drawseg_t *ds = ds_p; ds-- > firstdrawseg; ) // new -- killough
|
||||
for (DrawSegment *ds = ds_p; ds-- > firstdrawseg; ) // new -- killough
|
||||
{
|
||||
// [ZZ] the same as above
|
||||
if (ds->CurrentPortalUniq != renderportal->CurrentPortalUniq)
|
||||
|
|
|
@ -23,7 +23,7 @@ struct FVoxel;
|
|||
namespace swrenderer
|
||||
{
|
||||
class VisibleSprite;
|
||||
struct drawseg_t;
|
||||
struct DrawSegment;
|
||||
|
||||
class RenderTranslucentPass
|
||||
{
|
||||
|
@ -40,6 +40,6 @@ namespace swrenderer
|
|||
static void CollectPortals();
|
||||
static void DrawMaskedSingle(bool renew);
|
||||
|
||||
static TArray<drawseg_t *> portaldrawsegs;
|
||||
static TArray<DrawSegment *> portaldrawsegs;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -45,9 +45,9 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
drawseg_t *firstdrawseg;
|
||||
drawseg_t *ds_p;
|
||||
drawseg_t *drawsegs;
|
||||
DrawSegment *firstdrawseg;
|
||||
DrawSegment *ds_p;
|
||||
DrawSegment *drawsegs;
|
||||
|
||||
size_t FirstInterestingDrawseg;
|
||||
TArray<size_t> InterestingDrawsegs;
|
||||
|
@ -87,20 +87,20 @@ namespace swrenderer
|
|||
if (drawsegs == nullptr)
|
||||
{
|
||||
MaxDrawSegs = 256; // [RH] Default. Increased as needed.
|
||||
firstdrawseg = drawsegs = (drawseg_t *)M_Malloc (MaxDrawSegs * sizeof(drawseg_t));
|
||||
firstdrawseg = drawsegs = (DrawSegment *)M_Malloc (MaxDrawSegs * sizeof(DrawSegment));
|
||||
}
|
||||
FirstInterestingDrawseg = 0;
|
||||
InterestingDrawsegs.Clear ();
|
||||
ds_p = drawsegs;
|
||||
}
|
||||
|
||||
drawseg_t *R_AddDrawSegment()
|
||||
DrawSegment *R_AddDrawSegment()
|
||||
{
|
||||
if (ds_p == &drawsegs[MaxDrawSegs])
|
||||
{ // [RH] Grab some more drawsegs
|
||||
size_t newdrawsegs = MaxDrawSegs ? MaxDrawSegs * 2 : 32;
|
||||
ptrdiff_t firstofs = firstdrawseg - drawsegs;
|
||||
drawsegs = (drawseg_t *)M_Realloc(drawsegs, newdrawsegs * sizeof(drawseg_t));
|
||||
drawsegs = (DrawSegment *)M_Realloc(drawsegs, newdrawsegs * sizeof(DrawSegment));
|
||||
firstdrawseg = drawsegs + firstofs;
|
||||
ds_p = drawsegs + MaxDrawSegs;
|
||||
MaxDrawSegs = newdrawsegs;
|
||||
|
@ -131,7 +131,7 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
void R_GetMaskedWallTopBottom(drawseg_t *ds, double &top, double &bot)
|
||||
void R_GetMaskedWallTopBottom(DrawSegment *ds, double &top, double &bot)
|
||||
{
|
||||
double frontcz1 = ds->curline->frontsector->ceilingplane.ZatPoint(ds->curline->v1);
|
||||
double frontfz1 = ds->curline->frontsector->floorplane.ZatPoint(ds->curline->v1);
|
||||
|
@ -151,7 +151,7 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
void R_RenderMaskedSegRange(drawseg_t *ds, int x1, int x2)
|
||||
void R_RenderMaskedSegRange(DrawSegment *ds, int x1, int x2)
|
||||
{
|
||||
float *MaskedSWall = nullptr, MaskedScaleY = 0, rw_scalestep = 0;
|
||||
fixed_t *maskedtexturecol = nullptr;
|
||||
|
@ -478,7 +478,7 @@ namespace swrenderer
|
|||
}
|
||||
|
||||
// kg3D - render one fake wall
|
||||
void R_RenderFakeWall(drawseg_t *ds, int x1, int x2, F3DFloor *rover, int wallshade, FDynamicColormap *basecolormap)
|
||||
void R_RenderFakeWall(DrawSegment *ds, int x1, int x2, F3DFloor *rover, int wallshade, FDynamicColormap *basecolormap)
|
||||
{
|
||||
int i;
|
||||
double xscale;
|
||||
|
@ -585,7 +585,7 @@ namespace swrenderer
|
|||
}
|
||||
|
||||
// kg3D - walls of fake floors
|
||||
void R_RenderFakeWallRange(drawseg_t *ds, int x1, int x2, int wallshade)
|
||||
void R_RenderFakeWallRange(DrawSegment *ds, int x1, int x2, int wallshade)
|
||||
{
|
||||
FTexture *const DONT_DRAW = ((FTexture*)(intptr_t)-1);
|
||||
int i, j;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
struct drawseg_t
|
||||
struct DrawSegment
|
||||
{
|
||||
seg_t *curline;
|
||||
float light, lightstep;
|
||||
|
@ -47,9 +47,9 @@ namespace swrenderer
|
|||
int CurrentPortalUniq; // [ZZ] to identify the portal that this drawseg is in. used for sprite clipping.
|
||||
};
|
||||
|
||||
extern drawseg_t *firstdrawseg;
|
||||
extern drawseg_t *ds_p;
|
||||
extern drawseg_t *drawsegs;
|
||||
extern DrawSegment *firstdrawseg;
|
||||
extern DrawSegment *ds_p;
|
||||
extern DrawSegment *drawsegs;
|
||||
|
||||
extern TArray<size_t> InterestingDrawsegs; // drawsegs that have something drawn on them
|
||||
extern size_t FirstInterestingDrawseg;
|
||||
|
@ -57,10 +57,10 @@ namespace swrenderer
|
|||
void R_ClearDrawSegs();
|
||||
void R_FreeDrawSegs();
|
||||
|
||||
drawseg_t *R_AddDrawSegment();
|
||||
DrawSegment *R_AddDrawSegment();
|
||||
void ClipMidtex(int x1, int x2);
|
||||
void R_RenderMaskedSegRange(drawseg_t *ds, int x1, int x2);
|
||||
void R_RenderFakeWall(drawseg_t *ds, int x1, int x2, F3DFloor *rover, int wallshade, FDynamicColormap *basecolormap);
|
||||
void R_RenderFakeWallRange(drawseg_t *ds, int x1, int x2, int wallshade);
|
||||
void R_GetMaskedWallTopBottom(drawseg_t *ds, double &top, double &bot);
|
||||
void R_RenderMaskedSegRange(DrawSegment *ds, int x1, int x2);
|
||||
void R_RenderFakeWall(DrawSegment *ds, int x1, int x2, F3DFloor *rover, int wallshade, FDynamicColormap *basecolormap);
|
||||
void R_RenderFakeWallRange(DrawSegment *ds, int x1, int x2, int wallshade);
|
||||
void R_GetMaskedWallTopBottom(DrawSegment *ds, double &top, double &bot);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
void RenderDecal::RenderDecals(side_t *sidedef, drawseg_t *draw_segment, int wallshade, float lightleft, float lightstep, seg_t *curline, const FWallCoords &wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom)
|
||||
void RenderDecal::RenderDecals(side_t *sidedef, DrawSegment *draw_segment, int wallshade, float lightleft, float lightstep, seg_t *curline, const FWallCoords &wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom)
|
||||
{
|
||||
for (DBaseDecal *decal = sidedef->AttachedDecals; decal != NULL; decal = decal->WallNext)
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ namespace swrenderer
|
|||
// = 1: drawing masked textures (including sprites)
|
||||
// Currently, only pass = 0 is done or used
|
||||
|
||||
void RenderDecal::Render(side_t *wall, DBaseDecal *decal, drawseg_t *clipper, int wallshade, float lightleft, float lightstep, seg_t *curline, FWallCoords WallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom, int pass)
|
||||
void RenderDecal::Render(side_t *wall, DBaseDecal *decal, DrawSegment *clipper, int wallshade, float lightleft, float lightstep, seg_t *curline, FWallCoords WallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom, int pass)
|
||||
{
|
||||
DVector2 decal_left, decal_right, decal_pos;
|
||||
int x1, x2;
|
||||
|
|
|
@ -18,16 +18,16 @@ class DBaseDecal;
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
struct drawseg_t;
|
||||
struct DrawSegment;
|
||||
class ProjectedWallTexcoords;
|
||||
|
||||
class RenderDecal
|
||||
{
|
||||
public:
|
||||
static void RenderDecals(side_t *wall, drawseg_t *draw_segment, int wallshade, float lightleft, float lightstep, seg_t *curline, const FWallCoords &wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom);
|
||||
static void RenderDecals(side_t *wall, DrawSegment *draw_segment, int wallshade, float lightleft, float lightstep, seg_t *curline, const FWallCoords &wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom);
|
||||
|
||||
private:
|
||||
static void Render(side_t *wall, DBaseDecal *first, drawseg_t *clipper, int wallshade, float lightleft, float lightstep, seg_t *curline, FWallCoords wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom, int pass);
|
||||
static void Render(side_t *wall, DBaseDecal *first, DrawSegment *clipper, int wallshade, float lightleft, float lightstep, seg_t *curline, FWallCoords wallC, bool foggy, FDynamicColormap *basecolormap, const short *walltop, const short *wallbottom, int pass);
|
||||
static void DrawColumn(int x, FTexture *WallSpriteTile, const ProjectedWallTexcoords &walltexcoords, double texturemid, float maskedScaleY, bool sprflipvert, const short *mfloorclip, const short *mceilingclip);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ namespace swrenderer
|
|||
// particle is drawn, it will be in front of them.
|
||||
for (unsigned int p = InterestingDrawsegs.Size(); p-- > FirstInterestingDrawseg; )
|
||||
{
|
||||
drawseg_t *ds = &drawsegs[InterestingDrawsegs[p]];
|
||||
DrawSegment *ds = &drawsegs[InterestingDrawsegs[p]];
|
||||
// kg3D - no fake segs
|
||||
if (ds->fake) continue;
|
||||
if (ds->x1 >= x2 || ds->x2 <= x1)
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace swrenderer
|
|||
|
||||
VisibleSprite *spr = this;
|
||||
|
||||
drawseg_t *ds;
|
||||
DrawSegment *ds;
|
||||
int i;
|
||||
int x1, x2;
|
||||
int r1, r2;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
namespace swrenderer
|
||||
{
|
||||
struct drawseg_t;
|
||||
struct DrawSegment;
|
||||
class VisibleSprite;
|
||||
|
||||
class VisibleSpriteList
|
||||
|
|
Loading…
Reference in a new issue