fixed all compiling errors relating to ESLOPE being undefined

This commit is contained in:
Monster Iestyn 2016-04-06 22:19:39 +01:00
parent 93a1e46f1c
commit b1e736242f
7 changed files with 81 additions and 1 deletions

View file

@ -1146,13 +1146,17 @@ static boolean PIT_CheckLine(line_t *ld)
{
tmceilingz = opentop;
ceilingline = ld;
#ifdef ESLOPE
tmceilingslope = opentopslope;
#endif
}
if (openbottom > tmfloorz)
{
tmfloorz = openbottom;
#ifdef ESLOPE
tmfloorslope = openbottomslope;
#endif
}
if (highceiling > tmdrpoffceilz)

View file

@ -527,13 +527,17 @@ void P_LineOpening(line_t *linedef)
{
opentop = frontheight;
highceiling = backheight;
#ifdef ESLOPE
opentopslope = front->c_slope;
#endif
}
else
{
opentop = backheight;
highceiling = frontheight;
#ifdef ESLOPE
opentopslope = back->c_slope;
#endif
}
frontheight = P_GetFloorZ(tmthing, front, tmx, tmy, linedef);
@ -543,13 +547,17 @@ void P_LineOpening(line_t *linedef)
{
openbottom = frontheight;
lowfloor = backheight;
#ifdef ESLOPE
openbottomslope = front->f_slope;
#endif
}
else
{
openbottom = backheight;
lowfloor = frontheight;
#ifdef ESLOPE
openbottomslope = back->f_slope;
#endif
}
}

View file

@ -752,6 +752,7 @@ boolean P_InsideANonSolidFFloor(mobj_t *mobj, ffloor_t *rover)
return true;
}
#ifdef ESLOPE
// P_GetFloorZ (and its ceiling counterpart)
// Gets the floor height (or ceiling height) of the mobj's contact point in sector, assuming object's center if moved to [x, y]
// If line is supplied, it's a divider line on the sector. Set it to NULL if you're not checking for collision with a line
@ -855,10 +856,13 @@ static fixed_t HighestOnLine(fixed_t radius, fixed_t x, fixed_t y, line_t *line,
P_GetZAt(slope, v2.x, v2.y)
);
}
#endif
fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect)
{
#ifdef ESLOPE
I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL);
#ifdef ESLOPE
if (sector->f_slope) {
@ -930,13 +934,23 @@ fixed_t P_MobjFloorZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t
return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the floor height
#else
(void)mobj;
(void)boundsec;
(void)x;
(void)y;
(void)line;
(void)lowest;
(void)perfect;
#endif
return sector->floorheight;
}
fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect)
{
#ifdef ESLOPE
I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL);
#ifdef ESLOPE
if (sector->c_slope) {
@ -1008,6 +1022,14 @@ fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed
return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the ceiling height
#else
(void)mobj;
(void)boundsec;
(void)x;
(void)y;
(void)line;
(void)lowest;
(void)perfect;
#endif
return sector->ceilingheight;
}
@ -1015,7 +1037,9 @@ fixed_t P_MobjCeilingZ(mobj_t *mobj, sector_t *sector, sector_t *boundsec, fixed
// Now do the same as all above, but for cameras because apparently cameras are special?
fixed_t P_CameraFloorZ(camera_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect)
{
#ifdef ESLOPE
I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL);
#ifdef ESLOPE
if (sector->f_slope) {
@ -1087,13 +1111,23 @@ fixed_t P_CameraFloorZ(camera_t *mobj, sector_t *sector, sector_t *boundsec, fix
return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the floor height
#else
(void)mobj;
(void)boundsec;
(void)x;
(void)y;
(void)line;
(void)lowest;
(void)perfect;
#endif
return sector->floorheight;
}
fixed_t P_CameraCeilingZ(camera_t *mobj, sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, line_t *line, boolean lowest, boolean perfect)
{
#ifdef ESLOPE
I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL);
#ifdef ESLOPE
if (sector->c_slope) {
@ -1165,6 +1199,14 @@ fixed_t P_CameraCeilingZ(camera_t *mobj, sector_t *sector, sector_t *boundsec, f
return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the ceiling height
#else
(void)mobj;
(void)boundsec;
(void)x;
(void)y;
(void)line;
(void)lowest;
(void)perfect;
#endif
return sector->ceilingheight;
}

View file

@ -924,8 +924,12 @@ typedef enum
MD2_EXTVAL1 = 1<<5,
MD2_EXTVAL2 = 1<<6,
MD2_HNEXT = 1<<7,
#ifdef ESLOPE
MD2_HPREV = 1<<8,
MD2_SLOPE = 1<<9
#else
MD2_HPREV = 1<<8
#endif
} mobj_diff2_t;
typedef enum
@ -1115,8 +1119,10 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
diff2 |= MD2_HNEXT;
if (mobj->hprev)
diff2 |= MD2_HPREV;
#ifdef ESLOPE
if (mobj->standingslope)
diff2 |= MD2_SLOPE;
#endif
if (diff2 != 0)
diff |= MD_MORE;
@ -1232,8 +1238,10 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
WRITEUINT32(save_p, mobj->hnext->mobjnum);
if (diff2 & MD2_HPREV)
WRITEUINT32(save_p, mobj->hprev->mobjnum);
#ifdef ESLOPE
if (diff2 & MD2_SLOPE)
WRITEUINT16(save_p, mobj->standingslope->id);
#endif
WRITEUINT32(save_p, mobj->mobjnum);
}
@ -2087,8 +2095,10 @@ static void LoadMobjThinker(actionf_p1 thinker)
mobj->hnext = (mobj_t *)(size_t)READUINT32(save_p);
if (diff2 & MD2_HPREV)
mobj->hprev = (mobj_t *)(size_t)READUINT32(save_p);
#ifdef ESLOPE
if (diff2 & MD2_SLOPE)
mobj->standingslope = P_SlopeById(READUINT16(save_p));
#endif
if (diff & MD_REDFLAG)

View file

@ -4672,8 +4672,10 @@ void P_UpdateSpecials(void)
// POINT LIMIT
P_CheckPointLimit();
#ifdef ESLOPE
// Dynamic slopeness
P_RunDynamicSlopes();
#endif
// ANIMATE TEXTURES
for (anim = anims; anim < lastanim; anim++)

View file

@ -517,7 +517,9 @@ static void R_InitTextureMapping(void)
focallength = FixedDiv(centerxfrac,
FINETANGENT(FINEANGLES/4+/*cv_fov.value*/ FIELDOFVIEW/2));
#ifdef ESLOPE
focallengthf = FIXED_TO_FLOAT(focallength);
#endif
for (i = 0; i < FINEANGLES/2; i++)
{

View file

@ -288,7 +288,9 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
line_t *ldef;
sector_t *front, *back;
INT32 times, repeats;
#ifdef ESLOPE
INT32 range;
#endif
// Calculate light table.
// Use different light tables
@ -335,7 +337,9 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
colfunc = fuzzcolfunc;
}
#ifdef ESLOPE
range = max(ds->x2-ds->x1, 1);
#endif
rw_scalestep = ds->scalestep;
spryscale = ds->scale1 + (x1 - ds->x1)*rw_scalestep;
@ -695,7 +699,9 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
fixed_t offsetvalue = 0;
lightlist_t *light;
r_lightlist_t *rlight;
#ifdef ESLOPE
INT32 range;
#endif
#ifndef ESLOPE
fixed_t lheight;
#endif
@ -760,7 +766,9 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
else if (pfloor->flags & FF_FOG)
colfunc = R_DrawFogColumn_8;
#ifdef ESLOPE
range = max(ds->x2-ds->x1, 1);
#endif
//SoM: Moved these up here so they are available for my lightlist calculations
rw_scalestep = ds->scalestep;
spryscale = ds->scale1 + (x1 - ds->x1)*rw_scalestep;
@ -1192,7 +1200,9 @@ static void R_RenderSegLoop (void)
INT32 mid;
fixed_t texturecolumn = 0;
#ifdef ESLOPE
fixed_t oldtexturecolumn = -1;
#endif
INT32 top;
INT32 bottom;
INT32 i;
@ -1548,7 +1558,9 @@ void R_StoreWallRange(INT32 start, INT32 stop)
fixed_t hyp;
fixed_t sineval;
angle_t distangle, offsetangle;
//fixed_t vtop;
#ifndef ESLOPE
fixed_t vtop;
#endif
INT32 lightnum;
INT32 i, p;
lightlist_t *light;