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; tmceilingz = opentop;
ceilingline = ld; ceilingline = ld;
#ifdef ESLOPE
tmceilingslope = opentopslope; tmceilingslope = opentopslope;
#endif
} }
if (openbottom > tmfloorz) if (openbottom > tmfloorz)
{ {
tmfloorz = openbottom; tmfloorz = openbottom;
#ifdef ESLOPE
tmfloorslope = openbottomslope; tmfloorslope = openbottomslope;
#endif
} }
if (highceiling > tmdrpoffceilz) if (highceiling > tmdrpoffceilz)

View file

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

View file

@ -752,6 +752,7 @@ boolean P_InsideANonSolidFFloor(mobj_t *mobj, ffloor_t *rover)
return true; return true;
} }
#ifdef ESLOPE
// P_GetFloorZ (and its ceiling counterpart) // 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] // 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 // 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) 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) 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); I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL); I_Assert(sector != NULL);
#ifdef ESLOPE #ifdef ESLOPE
if (sector->f_slope) { 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); return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the floor height } 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 #endif
return sector->floorheight; 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) 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); I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL); I_Assert(sector != NULL);
#ifdef ESLOPE #ifdef ESLOPE
if (sector->c_slope) { 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); return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the ceiling height } 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 #endif
return sector->ceilingheight; 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? // 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) 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); I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL); I_Assert(sector != NULL);
#ifdef ESLOPE #ifdef ESLOPE
if (sector->f_slope) { 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); return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the floor height } 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 #endif
return sector->floorheight; 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) 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); I_Assert(mobj != NULL);
#endif
I_Assert(sector != NULL); I_Assert(sector != NULL);
#ifdef ESLOPE #ifdef ESLOPE
if (sector->c_slope) { 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); return HighestOnLine(mobj->radius, x, y, line, slope, lowest);
} else // Well, that makes it easy. Just get the ceiling height } 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 #endif
return sector->ceilingheight; return sector->ceilingheight;
} }

View file

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

View file

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

View file

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