diff --git a/src/p_map.c b/src/p_map.c index 5cd60127..612f1522 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -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) diff --git a/src/p_maputl.c b/src/p_maputl.c index 82d9bbfe..6bd94362 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -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 } } diff --git a/src/p_mobj.c b/src/p_mobj.c index 2bab28bc..9a33eb65 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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; } diff --git a/src/p_saveg.c b/src/p_saveg.c index e0112bb7..c38a1ebb 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -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) diff --git a/src/p_spec.c b/src/p_spec.c index 76c3484c..a903aa5a 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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++) diff --git a/src/r_main.c b/src/r_main.c index a6b13302..39958305 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -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++) { diff --git a/src/r_segs.c b/src/r_segs.c index 6efac902..fd0bde33 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -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;