mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 21:31:32 +00:00
Remove POLYOBJECTS POLYOBJECTS_PLANES #ifdefs(backport from srb2 2.2)
This commit is contained in:
parent
00137ef4ea
commit
c09cb6d762
18 changed files with 0 additions and 145 deletions
|
@ -79,9 +79,7 @@ static UINT8 lib_searchBlockmap_Lines(lua_State *L, INT32 x, INT32 y, mobj_t *th
|
||||||
{
|
{
|
||||||
INT32 offset;
|
INT32 offset;
|
||||||
const INT32 *list; // Big blockmap
|
const INT32 *list; // Big blockmap
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
polymaplink_t *plink; // haleyjd 02/22/06
|
polymaplink_t *plink; // haleyjd 02/22/06
|
||||||
#endif
|
|
||||||
line_t *ld;
|
line_t *ld;
|
||||||
|
|
||||||
if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight)
|
if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight)
|
||||||
|
@ -89,7 +87,6 @@ static UINT8 lib_searchBlockmap_Lines(lua_State *L, INT32 x, INT32 y, mobj_t *th
|
||||||
|
|
||||||
offset = y*bmapwidth + x;
|
offset = y*bmapwidth + x;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 02/22/06: consider polyobject lines
|
// haleyjd 02/22/06: consider polyobject lines
|
||||||
plink = polyblocklinks[offset];
|
plink = polyblocklinks[offset];
|
||||||
|
|
||||||
|
@ -132,7 +129,6 @@ static UINT8 lib_searchBlockmap_Lines(lua_State *L, INT32 x, INT32 y, mobj_t *th
|
||||||
}
|
}
|
||||||
plink = (polymaplink_t *)(plink->link.next);
|
plink = (polymaplink_t *)(plink->link.next);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
offset = *(blockmap + offset); // offset = blockmap[y*bmapwidth+x];
|
offset = *(blockmap + offset); // offset = blockmap[y*bmapwidth+x];
|
||||||
|
|
||||||
|
|
|
@ -2139,7 +2139,6 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
|
||||||
|
|
||||||
BMBOUNDFIX(xl, xh, yl, yh);
|
BMBOUNDFIX(xl, xh, yl, yh);
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// Check polyobjects and see if tmfloorz/tmceilingz need to be altered
|
// Check polyobjects and see if tmfloorz/tmceilingz need to be altered
|
||||||
{
|
{
|
||||||
validcount++;
|
validcount++;
|
||||||
|
@ -2209,7 +2208,6 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// tmfloorthing is set when tmfloorz comes from a thing's top
|
// tmfloorthing is set when tmfloorz comes from a thing's top
|
||||||
tmfloorthing = NULL;
|
tmfloorthing = NULL;
|
||||||
|
@ -2367,7 +2365,6 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam)
|
||||||
|
|
||||||
BMBOUNDFIX(xl, xh, yl, yh);
|
BMBOUNDFIX(xl, xh, yl, yh);
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// Check polyobjects and see if tmfloorz/tmceilingz need to be altered
|
// Check polyobjects and see if tmfloorz/tmceilingz need to be altered
|
||||||
{
|
{
|
||||||
validcount++;
|
validcount++;
|
||||||
|
@ -2438,7 +2435,6 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// check lines
|
// check lines
|
||||||
for (bx = xl; bx <= xh; bx++)
|
for (bx = xl; bx <= xh; bx++)
|
||||||
|
|
|
@ -491,14 +491,12 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Treat polyobjects kind of like 3D Floors
|
// Treat polyobjects kind of like 3D Floors
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT))
|
if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT))
|
||||||
{
|
{
|
||||||
front = linedef->frontsector;
|
front = linedef->frontsector;
|
||||||
back = linedef->frontsector;
|
back = linedef->frontsector;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
front = linedef->frontsector;
|
front = linedef->frontsector;
|
||||||
back = linedef->backsector;
|
back = linedef->backsector;
|
||||||
|
@ -607,9 +605,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
|
|
||||||
// Check for fake floors in the sector.
|
// Check for fake floors in the sector.
|
||||||
if (front->ffloors || back->ffloors
|
if (front->ffloors || back->ffloors
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
|| linedef->polyobj
|
|| linedef->polyobj
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ffloor_t *rover;
|
ffloor_t *rover;
|
||||||
|
@ -702,7 +698,6 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// Treat polyobj's backsector like a 3D Floor
|
// Treat polyobj's backsector like a 3D Floor
|
||||||
if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT))
|
if (linedef->polyobj && (linedef->polyobj->flags & POF_TESTHEIGHT))
|
||||||
{
|
{
|
||||||
|
@ -724,7 +719,6 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
else if (polysec->ceilingheight > lowestfloor && delta1 < delta2)
|
else if (polysec->ceilingheight > lowestfloor && delta1 < delta2)
|
||||||
lowestfloor = polysec->ceilingheight;
|
lowestfloor = polysec->ceilingheight;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (highestceiling < highceiling)
|
if (highestceiling < highceiling)
|
||||||
highceiling = highestceiling;
|
highceiling = highestceiling;
|
||||||
|
|
||||||
|
@ -987,9 +981,7 @@ boolean P_BlockLinesIterator(INT32 x, INT32 y, boolean (*func)(line_t *))
|
||||||
{
|
{
|
||||||
INT32 offset;
|
INT32 offset;
|
||||||
const INT32 *list; // Big blockmap
|
const INT32 *list; // Big blockmap
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
polymaplink_t *plink; // haleyjd 02/22/06
|
polymaplink_t *plink; // haleyjd 02/22/06
|
||||||
#endif
|
|
||||||
line_t *ld;
|
line_t *ld;
|
||||||
|
|
||||||
if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight)
|
if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight)
|
||||||
|
@ -997,7 +989,6 @@ boolean P_BlockLinesIterator(INT32 x, INT32 y, boolean (*func)(line_t *))
|
||||||
|
|
||||||
offset = y*bmapwidth + x;
|
offset = y*bmapwidth + x;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 02/22/06: consider polyobject lines
|
// haleyjd 02/22/06: consider polyobject lines
|
||||||
plink = polyblocklinks[offset];
|
plink = polyblocklinks[offset];
|
||||||
|
|
||||||
|
@ -1021,7 +1012,6 @@ boolean P_BlockLinesIterator(INT32 x, INT32 y, boolean (*func)(line_t *))
|
||||||
}
|
}
|
||||||
plink = (polymaplink_t *)(plink->link.next);
|
plink = (polymaplink_t *)(plink->link.next);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
offset = *(blockmap + offset); // offset = blockmap[y*bmapwidth+x];
|
offset = *(blockmap + offset); // offset = blockmap[y*bmapwidth+x];
|
||||||
|
|
||||||
|
|
|
@ -2652,7 +2652,6 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
|
|
||||||
if (mo->eflags & MFE_JUSTHITFLOOR)
|
if (mo->eflags & MFE_JUSTHITFLOOR)
|
||||||
{
|
{
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// Check if we're on a polyobject
|
// Check if we're on a polyobject
|
||||||
// that triggers a linedef executor.
|
// that triggers a linedef executor.
|
||||||
msecnode_t *node;
|
msecnode_t *node;
|
||||||
|
@ -2712,7 +2711,6 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stopmovecut)
|
if (!stopmovecut)
|
||||||
#endif
|
|
||||||
|
|
||||||
// Cut momentum in half when you hit the ground and
|
// Cut momentum in half when you hit the ground and
|
||||||
// aren't pressing any controls.
|
// aren't pressing any controls.
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
#include "r_defs.h"
|
#include "r_defs.h"
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Theory behind Polyobjects:
|
Theory behind Polyobjects:
|
||||||
|
@ -2864,6 +2863,5 @@ INT32 EV_DoPolyObjFlag(line_t *pfdata)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
// EOF
|
// EOF
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include "r_defs.h"
|
#include "r_defs.h"
|
||||||
|
|
||||||
// haleyjd: temporary define
|
// haleyjd: temporary define
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
//
|
//
|
||||||
// Defines
|
// Defines
|
||||||
//
|
//
|
||||||
|
@ -303,7 +302,6 @@ extern polyobj_t *PolyObjects;
|
||||||
extern INT32 numPolyObjects;
|
extern INT32 numPolyObjects;
|
||||||
extern polymaplink_t **polyblocklinks; // polyobject blockmap
|
extern polymaplink_t **polyblocklinks; // polyobject blockmap
|
||||||
|
|
||||||
#endif // ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -981,7 +981,6 @@ typedef enum
|
||||||
tc_noenemies,
|
tc_noenemies,
|
||||||
tc_eachtime,
|
tc_eachtime,
|
||||||
tc_disappear,
|
tc_disappear,
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
tc_polyrotate, // haleyjd 03/26/06: polyobjects
|
tc_polyrotate, // haleyjd 03/26/06: polyobjects
|
||||||
tc_polymove,
|
tc_polymove,
|
||||||
tc_polywaypoint,
|
tc_polywaypoint,
|
||||||
|
@ -989,7 +988,6 @@ typedef enum
|
||||||
tc_polyswingdoor,
|
tc_polyswingdoor,
|
||||||
tc_polyflag,
|
tc_polyflag,
|
||||||
tc_polydisplace,
|
tc_polydisplace,
|
||||||
#endif
|
|
||||||
tc_end
|
tc_end
|
||||||
} specials_e;
|
} specials_e;
|
||||||
|
|
||||||
|
@ -1544,7 +1542,6 @@ static void SaveDisappearThinker(const thinker_t *th, const UINT8 type)
|
||||||
WRITEINT32(save_p, ht->exists);
|
WRITEINT32(save_p, ht->exists);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// SavePolyrotateThinker
|
// SavePolyrotateThinker
|
||||||
|
@ -1654,7 +1651,6 @@ static void SavePolydisplaceThinker(const thinker_t *th, const UINT8 type)
|
||||||
WRITEFIXED(save_p, ht->oldHeights);
|
WRITEFIXED(save_p, ht->oldHeights);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
//
|
//
|
||||||
// SaveWhatThinker
|
// SaveWhatThinker
|
||||||
|
@ -1834,7 +1830,6 @@ static void P_NetArchiveThinkers(void)
|
||||||
SaveDisappearThinker(th, tc_disappear);
|
SaveDisappearThinker(th, tc_disappear);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
else if (th->function.acp1 == (actionf_p1)T_PolyObjRotate)
|
else if (th->function.acp1 == (actionf_p1)T_PolyObjRotate)
|
||||||
{
|
{
|
||||||
SavePolyrotatetThinker(th, tc_polyrotate);
|
SavePolyrotatetThinker(th, tc_polyrotate);
|
||||||
|
@ -1870,7 +1865,6 @@ static void P_NetArchiveThinkers(void)
|
||||||
SavePolydisplaceThinker(th, tc_polydisplace);
|
SavePolydisplaceThinker(th, tc_polydisplace);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
else if (th->function.acv != P_RemoveThinkerDelayed) // wait garbage collection
|
else if (th->function.acv != P_RemoveThinkerDelayed) // wait garbage collection
|
||||||
I_Error("unknown thinker type %p", th->function.acp1);
|
I_Error("unknown thinker type %p", th->function.acp1);
|
||||||
|
@ -2507,7 +2501,6 @@ static inline void LoadDisappearThinker(actionf_p1 thinker)
|
||||||
P_AddThinker(&ht->thinker);
|
P_AddThinker(&ht->thinker);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// LoadPolyrotateThinker
|
// LoadPolyrotateThinker
|
||||||
|
@ -2627,7 +2620,6 @@ static inline void LoadPolydisplaceThinker(actionf_p1 thinker)
|
||||||
ht->oldHeights = READFIXED(save_p);
|
ht->oldHeights = READFIXED(save_p);
|
||||||
P_AddThinker(&ht->thinker);
|
P_AddThinker(&ht->thinker);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//
|
//
|
||||||
|
@ -2796,7 +2788,6 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
case tc_disappear:
|
case tc_disappear:
|
||||||
LoadDisappearThinker((actionf_p1)T_Disappear);
|
LoadDisappearThinker((actionf_p1)T_Disappear);
|
||||||
break;
|
break;
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
case tc_polyrotate:
|
case tc_polyrotate:
|
||||||
LoadPolyrotatetThinker((actionf_p1)T_PolyObjRotate);
|
LoadPolyrotatetThinker((actionf_p1)T_PolyObjRotate);
|
||||||
break;
|
break;
|
||||||
|
@ -2824,7 +2815,6 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
case tc_polydisplace:
|
case tc_polydisplace:
|
||||||
LoadPolydisplaceThinker((actionf_p1)T_PolyObjDisplace);
|
LoadPolydisplaceThinker((actionf_p1)T_PolyObjDisplace);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case tc_scroll:
|
case tc_scroll:
|
||||||
LoadScrollThinker((actionf_p1)T_Scroll);
|
LoadScrollThinker((actionf_p1)T_Scroll);
|
||||||
break;
|
break;
|
||||||
|
@ -2865,7 +2855,6 @@ static void P_NetUnArchiveThinkers(void)
|
||||||
//
|
//
|
||||||
// haleyjd 03/26/06: PolyObject saving code
|
// haleyjd 03/26/06: PolyObject saving code
|
||||||
//
|
//
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
#define PD_FLAGS 0x01
|
#define PD_FLAGS 0x01
|
||||||
#define PD_TRANS 0x02
|
#define PD_TRANS 0x02
|
||||||
|
|
||||||
|
@ -2954,7 +2943,6 @@ static inline void P_UnArchivePolyObjects(void)
|
||||||
for (i = 0; i < numSavedPolys; ++i)
|
for (i = 0; i < numSavedPolys; ++i)
|
||||||
P_UnArchivePolyObj(&PolyObjects[i]);
|
P_UnArchivePolyObj(&PolyObjects[i]);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
//
|
//
|
||||||
// P_FinishMobjs
|
// P_FinishMobjs
|
||||||
//
|
//
|
||||||
|
@ -3435,9 +3423,7 @@ void P_SaveNetGame(void)
|
||||||
if (gamestate == GS_LEVEL)
|
if (gamestate == GS_LEVEL)
|
||||||
{
|
{
|
||||||
P_NetArchiveWorld();
|
P_NetArchiveWorld();
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
P_ArchivePolyObjects();
|
P_ArchivePolyObjects();
|
||||||
#endif
|
|
||||||
P_NetArchiveThinkers();
|
P_NetArchiveThinkers();
|
||||||
P_NetArchiveSpecials();
|
P_NetArchiveSpecials();
|
||||||
}
|
}
|
||||||
|
@ -3479,9 +3465,7 @@ boolean P_LoadNetGame(void)
|
||||||
if (gamestate == GS_LEVEL)
|
if (gamestate == GS_LEVEL)
|
||||||
{
|
{
|
||||||
P_NetUnArchiveWorld();
|
P_NetUnArchiveWorld();
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
P_UnArchivePolyObjects();
|
P_UnArchivePolyObjects();
|
||||||
#endif
|
|
||||||
P_NetUnArchiveThinkers();
|
P_NetUnArchiveThinkers();
|
||||||
P_NetUnArchiveSpecials();
|
P_NetUnArchiveSpecials();
|
||||||
P_RelinkPointers();
|
P_RelinkPointers();
|
||||||
|
|
|
@ -1273,9 +1273,7 @@ static void P_LoadRawLineDefs(UINT8 *data, size_t i)
|
||||||
if (ld->sidenum[1] != 0xffff && ld->special)
|
if (ld->sidenum[1] != 0xffff && ld->special)
|
||||||
sides[ld->sidenum[1]].special = ld->special;
|
sides[ld->sidenum[1]].special = ld->special;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
ld->polyobj = NULL;
|
ld->polyobj = NULL;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1945,11 +1943,9 @@ static void P_CreateBlockMap(void)
|
||||||
blocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
blocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
||||||
blockmap = blockmaplump + 4;
|
blockmap = blockmaplump + 4;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 2/22/06: setup polyobject blockmap
|
// haleyjd 2/22/06: setup polyobject blockmap
|
||||||
count = sizeof(*polyblocklinks) * bmapwidth * bmapheight;
|
count = sizeof(*polyblocklinks) * bmapwidth * bmapheight;
|
||||||
polyblocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
polyblocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2022,11 +2018,9 @@ static boolean P_LoadBlockMap(lumpnum_t lumpnum)
|
||||||
blocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
blocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
||||||
blockmap = blockmaplump+4;
|
blockmap = blockmaplump+4;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 2/22/06: setup polyobject blockmap
|
// haleyjd 2/22/06: setup polyobject blockmap
|
||||||
count = sizeof(*polyblocklinks) * bmapwidth * bmapheight;
|
count = sizeof(*polyblocklinks) * bmapwidth * bmapheight;
|
||||||
polyblocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
polyblocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
/* Original
|
/* Original
|
||||||
blockmaplump = W_CacheLumpNum(lump, PU_LEVEL);
|
blockmaplump = W_CacheLumpNum(lump, PU_LEVEL);
|
||||||
|
@ -2088,11 +2082,9 @@ static boolean P_LoadRawBlockMap(UINT8 *data, size_t count, const char *lumpname
|
||||||
blocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
blocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
||||||
blockmap = blockmaplump+4;
|
blockmap = blockmaplump+4;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 2/22/06: setup polyobject blockmap
|
// haleyjd 2/22/06: setup polyobject blockmap
|
||||||
count = sizeof(*polyblocklinks) * bmapwidth * bmapheight;
|
count = sizeof(*polyblocklinks) * bmapwidth * bmapheight;
|
||||||
polyblocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
polyblocklinks = Z_Calloc(count, PU_LEVEL, NULL);
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,6 @@ static fixed_t P_InterceptVector2(divline_t *v2, divline_t *v1)
|
||||||
return frac;
|
return frac;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
static boolean P_CrossSubsecPolyObj(polyobj_t *po, register los_t *los)
|
static boolean P_CrossSubsecPolyObj(polyobj_t *po, register los_t *los)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -145,7 +144,6 @@ static boolean P_CrossSubsecPolyObj(polyobj_t *po, register los_t *los)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_CrossSubsector
|
// P_CrossSubsector
|
||||||
|
@ -156,9 +154,7 @@ static boolean P_CrossSubsector(size_t num, register los_t *los)
|
||||||
{
|
{
|
||||||
seg_t *seg;
|
seg_t *seg;
|
||||||
INT32 count;
|
INT32 count;
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
polyobj_t *po; // haleyjd 02/23/06
|
polyobj_t *po; // haleyjd 02/23/06
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RANGECHECK
|
#ifdef RANGECHECK
|
||||||
if (num >= numsubsectors)
|
if (num >= numsubsectors)
|
||||||
|
@ -168,7 +164,6 @@ static boolean P_CrossSubsector(size_t num, register los_t *los)
|
||||||
// haleyjd 02/23/06: this assignment should be after the above check
|
// haleyjd 02/23/06: this assignment should be after the above check
|
||||||
seg = segs + subsectors[num].firstline;
|
seg = segs + subsectors[num].firstline;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 02/23/06: check polyobject lines
|
// haleyjd 02/23/06: check polyobject lines
|
||||||
if ((po = subsectors[num].polyList))
|
if ((po = subsectors[num].polyList))
|
||||||
{
|
{
|
||||||
|
@ -183,7 +178,6 @@ static boolean P_CrossSubsector(size_t num, register los_t *los)
|
||||||
po = (polyobj_t *)(po->link.next);
|
po = (polyobj_t *)(po->link.next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
for (count = subsectors[num].numlines; --count >= 0; seg++) // check lines
|
for (count = subsectors[num].numlines; --count >= 0; seg++) // check lines
|
||||||
{
|
{
|
||||||
|
@ -334,15 +328,10 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2)
|
||||||
|
|
||||||
// killough 11/98: shortcut for melee situations
|
// killough 11/98: shortcut for melee situations
|
||||||
// same subsector? obviously visible
|
// same subsector? obviously visible
|
||||||
#ifndef POLYOBJECTS
|
|
||||||
if (t1->subsector == t2->subsector)
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
// haleyjd 02/23/06: can't do this if there are polyobjects in the subsec
|
// haleyjd 02/23/06: can't do this if there are polyobjects in the subsec
|
||||||
if (!t1->subsector->polyList &&
|
if (!t1->subsector->polyList &&
|
||||||
t1->subsector == t2->subsector)
|
t1->subsector == t2->subsector)
|
||||||
return true;
|
return true;
|
||||||
#endif
|
|
||||||
|
|
||||||
// An unobstructed LOS is possible.
|
// An unobstructed LOS is possible.
|
||||||
// Now look from eyes of t1 to any part of t2.
|
// Now look from eyes of t1 to any part of t2.
|
||||||
|
|
|
@ -1242,7 +1242,6 @@ INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start)
|
||||||
}
|
}
|
||||||
|
|
||||||
// haleyjd: temporary define
|
// haleyjd: temporary define
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// PolyDoor
|
// PolyDoor
|
||||||
|
@ -1451,7 +1450,6 @@ static boolean PolyDisplace(line_t *line)
|
||||||
return EV_DoPolyObjDisplace(&pdd);
|
return EV_DoPolyObjDisplace(&pdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
/** Changes a sector's tag.
|
/** Changes a sector's tag.
|
||||||
* Used by the linedef executor tag changer and by crumblers.
|
* Used by the linedef executor tag changer and by crumblers.
|
||||||
|
@ -3200,7 +3198,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
case 480: // Polyobj_DoorSlide
|
case 480: // Polyobj_DoorSlide
|
||||||
case 481: // Polyobj_DoorSwing
|
case 481: // Polyobj_DoorSwing
|
||||||
PolyDoor(line);
|
PolyDoor(line);
|
||||||
|
@ -3227,7 +3224,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
case 491:
|
case 491:
|
||||||
PolyTranslucency(line);
|
PolyTranslucency(line);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -6698,7 +6694,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
||||||
|
|
||||||
Z_Free(secthinkers);
|
Z_Free(secthinkers);
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 02/20/06: spawn polyobjects
|
// haleyjd 02/20/06: spawn polyobjects
|
||||||
Polyobj_InitLevel();
|
Polyobj_InitLevel();
|
||||||
|
|
||||||
|
@ -6715,7 +6710,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
P_RunLevelLoadExecutors();
|
P_RunLevelLoadExecutors();
|
||||||
}
|
}
|
||||||
|
|
14
src/p_user.c
14
src/p_user.c
|
@ -3138,7 +3138,6 @@ static void P_DoTeeter(player_t *player) // SRB2kart - unused.
|
||||||
BMBOUNDFIX(xl, xh, yl, yh);
|
BMBOUNDFIX(xl, xh, yl, yh);
|
||||||
|
|
||||||
// Polyobjects
|
// Polyobjects
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
for (by = yl; by <= yh; by++)
|
for (by = yl; by <= yh; by++)
|
||||||
|
@ -3232,7 +3231,6 @@ static void P_DoTeeter(player_t *player) // SRB2kart - unused.
|
||||||
plink = (polymaplink_t *)(plink->link.next);
|
plink = (polymaplink_t *)(plink->link.next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (teeter) // only bother with objects as a last resort if you were already teetering
|
if (teeter) // only bother with objects as a last resort if you were already teetering
|
||||||
{
|
{
|
||||||
mobj_t *oldtmthing = tmthing;
|
mobj_t *oldtmthing = tmthing;
|
||||||
|
@ -3809,9 +3807,7 @@ static void P_2dMovement(player_t *player)
|
||||||
else if (player->onconveyor == 4 && !P_IsObjectOnGround(player->mo)) // Actual conveyor belt
|
else if (player->onconveyor == 4 && !P_IsObjectOnGround(player->mo)) // Actual conveyor belt
|
||||||
player->cmomx = player->cmomy = 0;
|
player->cmomx = player->cmomy = 0;
|
||||||
else if (player->onconveyor != 2 && player->onconveyor != 4
|
else if (player->onconveyor != 2 && player->onconveyor != 4
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
&& player->onconveyor != 1
|
&& player->onconveyor != 1
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
player->cmomx = player->cmomy = 0;
|
player->cmomx = player->cmomy = 0;
|
||||||
|
|
||||||
|
@ -4006,9 +4002,7 @@ static void P_3dMovement(player_t *player)
|
||||||
else if (player->onconveyor == 4 && !P_IsObjectOnGround(player->mo)) // Actual conveyor belt
|
else if (player->onconveyor == 4 && !P_IsObjectOnGround(player->mo)) // Actual conveyor belt
|
||||||
player->cmomx = player->cmomy = 0;
|
player->cmomx = player->cmomy = 0;
|
||||||
else if (player->onconveyor != 2 && player->onconveyor != 4
|
else if (player->onconveyor != 2 && player->onconveyor != 4
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
&& player->onconveyor != 1
|
&& player->onconveyor != 1
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
player->cmomx = player->cmomy = 0;
|
player->cmomx = player->cmomy = 0;
|
||||||
|
|
||||||
|
@ -7767,7 +7761,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// Check polyobjects and see if floorz/ceilingz need to be altered
|
// Check polyobjects and see if floorz/ceilingz need to be altered
|
||||||
{
|
{
|
||||||
INT32 xl, xh, yl, yh, bx, by;
|
INT32 xl, xh, yl, yh, bx, by;
|
||||||
|
@ -7846,7 +7839,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// crushed camera
|
// crushed camera
|
||||||
if (myceilingz <= myfloorz + thiscam->height && !resetcalled && !cameranoclip)
|
if (myceilingz <= myfloorz + thiscam->height && !resetcalled && !cameranoclip)
|
||||||
|
@ -8425,9 +8417,7 @@ void P_PlayerThink(player_t *player)
|
||||||
P_MobjCheckWater(player->mo);
|
P_MobjCheckWater(player->mo);
|
||||||
|
|
||||||
#ifndef SECTORSPECIALSAFTERTHINK
|
#ifndef SECTORSPECIALSAFTERTHINK
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
|
if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
|
||||||
#endif
|
|
||||||
player->onconveyor = 0;
|
player->onconveyor = 0;
|
||||||
// check special sectors : damage & secrets
|
// check special sectors : damage & secrets
|
||||||
|
|
||||||
|
@ -8585,10 +8575,8 @@ void P_PlayerThink(player_t *player)
|
||||||
// it lasts for one tic.
|
// it lasts for one tic.
|
||||||
player->pflags &= ~PF_FULLSTASIS;
|
player->pflags &= ~PF_FULLSTASIS;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
if (player->onconveyor == 1)
|
if (player->onconveyor == 1)
|
||||||
player->cmomy = player->cmomx = 0;
|
player->cmomy = player->cmomx = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
//P_DoSuperStuff(player);
|
//P_DoSuperStuff(player);
|
||||||
//P_CheckSneakerAndLivesTimer(player);
|
//P_CheckSneakerAndLivesTimer(player);
|
||||||
|
@ -8836,9 +8824,7 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
cmd = &player->cmd;
|
cmd = &player->cmd;
|
||||||
|
|
||||||
#ifdef SECTORSPECIALSAFTERTHINK
|
#ifdef SECTORSPECIALSAFTERTHINK
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
|
if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
|
||||||
#endif
|
|
||||||
player->onconveyor = 0;
|
player->onconveyor = 0;
|
||||||
// check special sectors : damage & secrets
|
// check special sectors : damage & secrets
|
||||||
|
|
||||||
|
|
18
src/r_bsp.c
18
src/r_bsp.c
|
@ -371,9 +371,7 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||||
boolean R_IsEmptyLine(seg_t *line, sector_t *front, sector_t *back)
|
boolean R_IsEmptyLine(seg_t *line, sector_t *front, sector_t *back)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
!line->polyseg &&
|
!line->polyseg &&
|
||||||
#endif
|
|
||||||
back->ceilingpic == front->ceilingpic
|
back->ceilingpic == front->ceilingpic
|
||||||
&& back->floorpic == front->floorpic
|
&& back->floorpic == front->floorpic
|
||||||
&& back->f_slope == front->f_slope
|
&& back->f_slope == front->f_slope
|
||||||
|
@ -650,7 +648,6 @@ static boolean R_CheckBBox(const fixed_t *bspcoord)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
|
|
||||||
size_t numpolys; // number of polyobjects in current subsector
|
size_t numpolys; // number of polyobjects in current subsector
|
||||||
size_t num_po_ptrs; // number of polyobject pointers allocated
|
size_t num_po_ptrs; // number of polyobject pointers allocated
|
||||||
|
@ -815,7 +812,6 @@ static void R_AddPolyObjects(subsector_t *sub)
|
||||||
R_AddLine(po_ptrs[i]->segs[j]);
|
R_AddLine(po_ptrs[i]->segs[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// R_Subsector
|
// R_Subsector
|
||||||
|
@ -894,9 +890,7 @@ static void R_Subsector(size_t num)
|
||||||
{
|
{
|
||||||
floorplane = R_FindPlane(frontsector->floorheight, frontsector->floorpic, floorlightlevel,
|
floorplane = R_FindPlane(frontsector->floorheight, frontsector->floorpic, floorlightlevel,
|
||||||
frontsector->floor_xoffs, frontsector->floor_yoffs, frontsector->floorpic_angle, floorcolormap, NULL
|
frontsector->floor_xoffs, frontsector->floor_yoffs, frontsector->floorpic_angle, floorcolormap, NULL
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, NULL
|
, NULL
|
||||||
#endif
|
|
||||||
, frontsector->f_slope
|
, frontsector->f_slope
|
||||||
, R_NoEncore(frontsector, false));
|
, R_NoEncore(frontsector, false));
|
||||||
}
|
}
|
||||||
|
@ -912,9 +906,7 @@ static void R_Subsector(size_t num)
|
||||||
ceilingplane = R_FindPlane(frontsector->ceilingheight, frontsector->ceilingpic,
|
ceilingplane = R_FindPlane(frontsector->ceilingheight, frontsector->ceilingpic,
|
||||||
ceilinglightlevel, frontsector->ceiling_xoffs, frontsector->ceiling_yoffs, frontsector->ceilingpic_angle,
|
ceilinglightlevel, frontsector->ceiling_xoffs, frontsector->ceiling_yoffs, frontsector->ceilingpic_angle,
|
||||||
ceilingcolormap, NULL
|
ceilingcolormap, NULL
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, NULL
|
, NULL
|
||||||
#endif
|
|
||||||
, frontsector->c_slope
|
, frontsector->c_slope
|
||||||
, R_NoEncore(frontsector, true));
|
, R_NoEncore(frontsector, true));
|
||||||
}
|
}
|
||||||
|
@ -965,9 +957,7 @@ static void R_Subsector(size_t num)
|
||||||
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
ffloor[numffloors].plane = R_FindPlane(*rover->bottomheight, *rover->bottompic,
|
||||||
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
*frontsector->lightlist[light].lightlevel, *rover->bottomxoffs,
|
||||||
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
*rover->bottomyoffs, *rover->bottomangle, frontsector->lightlist[light].extra_colormap, rover
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, NULL
|
, NULL
|
||||||
#endif
|
|
||||||
, *rover->b_slope
|
, *rover->b_slope
|
||||||
, R_NoEncore(rover->master->frontsector, true));
|
, R_NoEncore(rover->master->frontsector, true));
|
||||||
|
|
||||||
|
@ -1003,9 +993,7 @@ static void R_Subsector(size_t num)
|
||||||
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
ffloor[numffloors].plane = R_FindPlane(*rover->topheight, *rover->toppic,
|
||||||
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
*frontsector->lightlist[light].lightlevel, *rover->topxoffs, *rover->topyoffs, *rover->topangle,
|
||||||
frontsector->lightlist[light].extra_colormap, rover
|
frontsector->lightlist[light].extra_colormap, rover
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, NULL
|
, NULL
|
||||||
#endif
|
|
||||||
, *rover->t_slope
|
, *rover->t_slope
|
||||||
, R_NoEncore(rover->master->frontsector, false));
|
, R_NoEncore(rover->master->frontsector, false));
|
||||||
|
|
||||||
|
@ -1022,7 +1010,6 @@ static void R_Subsector(size_t num)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
// Polyobjects have planes, too!
|
// Polyobjects have planes, too!
|
||||||
if (sub->polyList)
|
if (sub->polyList)
|
||||||
{
|
{
|
||||||
|
@ -1091,7 +1078,6 @@ static void R_Subsector(size_t num)
|
||||||
po = (polyobj_t *)(po->link.next);
|
po = (polyobj_t *)(po->link.next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FLOORSPLATS
|
#ifdef FLOORSPLATS
|
||||||
if (sub->splats)
|
if (sub->splats)
|
||||||
|
@ -1114,18 +1100,14 @@ static void R_Subsector(size_t num)
|
||||||
|
|
||||||
firstseg = NULL;
|
firstseg = NULL;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
// haleyjd 02/19/06: draw polyobjects before static lines
|
// haleyjd 02/19/06: draw polyobjects before static lines
|
||||||
if (sub->polyList)
|
if (sub->polyList)
|
||||||
R_AddPolyObjects(sub);
|
R_AddPolyObjects(sub);
|
||||||
#endif
|
|
||||||
|
|
||||||
while (count--)
|
while (count--)
|
||||||
{
|
{
|
||||||
// CONS_Debug(DBG_GAMELOGIC, "Adding normal line %d...(%d)\n", line->linedef-lines, leveltime);
|
// CONS_Debug(DBG_GAMELOGIC, "Adding normal line %d...(%d)\n", line->linedef-lines, leveltime);
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
if (!line->polyseg) // ignore segs that belong to polyobjects
|
if (!line->polyseg) // ignore segs that belong to polyobjects
|
||||||
#endif
|
|
||||||
R_AddLine(line);
|
R_AddLine(line);
|
||||||
line++;
|
line++;
|
||||||
curline = NULL; /* cph 2001/11/18 - must clear curline now we're done with it, so stuff doesn't try using it for other things */
|
curline = NULL; /* cph 2001/11/18 - must clear curline now we're done with it, so stuff doesn't try using it for other things */
|
||||||
|
|
|
@ -44,13 +44,11 @@ void R_AddPortal(INT32 line1, INT32 line2, INT32 x1, INT32 x2);
|
||||||
// no longer a static since this is used for encore in hw_main.c as well now:
|
// no longer a static since this is used for encore in hw_main.c as well now:
|
||||||
boolean R_NoEncore(sector_t *sector, boolean ceiling);
|
boolean R_NoEncore(sector_t *sector, boolean ceiling);
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
void R_SortPolyObjects(subsector_t *sub);
|
void R_SortPolyObjects(subsector_t *sub);
|
||||||
|
|
||||||
extern size_t numpolys; // number of polyobjects in current subsector
|
extern size_t numpolys; // number of polyobjects in current subsector
|
||||||
extern size_t num_po_ptrs; // number of polyobject pointers allocated
|
extern size_t num_po_ptrs; // number of polyobject pointers allocated
|
||||||
extern polyobj_t **po_ptrs; // temp ptr array to sort polyobject pointers
|
extern polyobj_t **po_ptrs; // temp ptr array to sort polyobject pointers
|
||||||
#endif
|
|
||||||
|
|
||||||
sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
||||||
INT32 *ceilinglightlevel, boolean back);
|
INT32 *ceilinglightlevel, boolean back);
|
||||||
|
|
|
@ -91,9 +91,7 @@ typedef struct
|
||||||
fixed_t z; ///< Z coordinate.
|
fixed_t z; ///< Z coordinate.
|
||||||
} degenmobj_t;
|
} degenmobj_t;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
#include "p_polyobj.h"
|
#include "p_polyobj.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
// Store fake planes in a resizable array insted of just by
|
// Store fake planes in a resizable array insted of just by
|
||||||
// heightsec. Allows for multiple fake planes.
|
// heightsec. Allows for multiple fake planes.
|
||||||
|
@ -429,9 +427,7 @@ typedef struct line_s
|
||||||
void *splats; // wallsplat_t list
|
void *splats; // wallsplat_t list
|
||||||
#endif
|
#endif
|
||||||
INT32 firsttag, nexttag; // improves searches for tags.
|
INT32 firsttag, nexttag; // improves searches for tags.
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
polyobj_t *polyobj; // Belongs to a polyobject?
|
polyobj_t *polyobj; // Belongs to a polyobject?
|
||||||
#endif
|
|
||||||
|
|
||||||
char *text; // a concatination of all front and back texture names, for linedef specials that require a string.
|
char *text; // a concatination of all front and back texture names, for linedef specials that require a string.
|
||||||
INT16 callcount; // no. of calls left before triggering, for the "X calls" linedef specials, defaults to 0
|
INT16 callcount; // no. of calls left before triggering, for the "X calls" linedef specials, defaults to 0
|
||||||
|
@ -473,9 +469,7 @@ typedef struct subsector_s
|
||||||
sector_t *sector;
|
sector_t *sector;
|
||||||
INT16 numlines;
|
INT16 numlines;
|
||||||
UINT16 firstline;
|
UINT16 firstline;
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
struct polyobj_s *polyList; // haleyjd 02/19/06: list of polyobjects
|
struct polyobj_s *polyList; // haleyjd 02/19/06: list of polyobjects
|
||||||
#endif
|
|
||||||
#if 1//#ifdef FLOORSPLATS
|
#if 1//#ifdef FLOORSPLATS
|
||||||
void *splats; // floorsplat_t list
|
void *splats; // floorsplat_t list
|
||||||
#endif
|
#endif
|
||||||
|
@ -551,10 +545,8 @@ typedef struct seg_s
|
||||||
// Why slow things down by calculating lightlists for every thick side?
|
// Why slow things down by calculating lightlists for every thick side?
|
||||||
size_t numlights;
|
size_t numlights;
|
||||||
r_lightlist_t *rlights;
|
r_lightlist_t *rlights;
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
polyobj_t *polyseg;
|
polyobj_t *polyseg;
|
||||||
boolean dontrenderme;
|
boolean dontrenderme;
|
||||||
#endif
|
|
||||||
} seg_t;
|
} seg_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -422,9 +422,7 @@ static visplane_t *new_visplane(unsigned hash)
|
||||||
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
fixed_t xoff, fixed_t yoff, angle_t plangle, extracolormap_t *planecolormap,
|
fixed_t xoff, fixed_t yoff, angle_t plangle, extracolormap_t *planecolormap,
|
||||||
ffloor_t *pfloor
|
ffloor_t *pfloor
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, polyobj_t *polyobj
|
, polyobj_t *polyobj
|
||||||
#endif
|
|
||||||
, pslope_t *slope
|
, pslope_t *slope
|
||||||
, boolean noencore)
|
, boolean noencore)
|
||||||
{
|
{
|
||||||
|
@ -446,7 +444,6 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
if (polyobj)
|
if (polyobj)
|
||||||
{
|
{
|
||||||
if (polyobj->angle != 0)
|
if (polyobj->angle != 0)
|
||||||
|
@ -461,7 +458,6 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
yoff += polyobj->centerPt.y;
|
yoff += polyobj->centerPt.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// This appears to fix the Nimbus Ruins sky bug.
|
// This appears to fix the Nimbus Ruins sky bug.
|
||||||
if (picnum == skyflatnum && pfloor)
|
if (picnum == skyflatnum && pfloor)
|
||||||
|
@ -475,12 +471,10 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
|
|
||||||
for (check = visplanes[hash]; check; check = check->next)
|
for (check = visplanes[hash]; check; check = check->next)
|
||||||
{
|
{
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
if (check->polyobj && pfloor)
|
if (check->polyobj && pfloor)
|
||||||
continue;
|
continue;
|
||||||
if (polyobj != check->polyobj)
|
if (polyobj != check->polyobj)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
|
||||||
if (height == check->height && picnum == check->picnum
|
if (height == check->height && picnum == check->picnum
|
||||||
&& lightlevel == check->lightlevel
|
&& lightlevel == check->lightlevel
|
||||||
&& xoff == check->xoffs && yoff == check->yoffs
|
&& xoff == check->xoffs && yoff == check->yoffs
|
||||||
|
@ -512,9 +506,7 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
check->viewz = viewz;
|
check->viewz = viewz;
|
||||||
check->viewangle = viewangle;
|
check->viewangle = viewangle;
|
||||||
check->plangle = plangle;
|
check->plangle = plangle;
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
check->polyobj = polyobj;
|
check->polyobj = polyobj;
|
||||||
#endif
|
|
||||||
check->slope = slope;
|
check->slope = slope;
|
||||||
check->noencore = noencore;
|
check->noencore = noencore;
|
||||||
|
|
||||||
|
@ -583,9 +575,7 @@ visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop)
|
||||||
new_pl->viewz = pl->viewz;
|
new_pl->viewz = pl->viewz;
|
||||||
new_pl->viewangle = pl->viewangle;
|
new_pl->viewangle = pl->viewangle;
|
||||||
new_pl->plangle = pl->plangle;
|
new_pl->plangle = pl->plangle;
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
new_pl->polyobj = pl->polyobj;
|
new_pl->polyobj = pl->polyobj;
|
||||||
#endif
|
|
||||||
new_pl->slope = pl->slope;
|
new_pl->slope = pl->slope;
|
||||||
new_pl->noencore = pl->noencore;
|
new_pl->noencore = pl->noencore;
|
||||||
pl = new_pl;
|
pl = new_pl;
|
||||||
|
@ -611,11 +601,9 @@ void R_ExpandPlane(visplane_t *pl, INT32 start, INT32 stop)
|
||||||
INT32 unionl, unionh;
|
INT32 unionl, unionh;
|
||||||
// INT32 x;
|
// INT32 x;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
// Don't expand polyobject planes here - we do that on our own.
|
// Don't expand polyobject planes here - we do that on our own.
|
||||||
if (pl->polyobj)
|
if (pl->polyobj)
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (start < pl->minx)
|
if (start < pl->minx)
|
||||||
{
|
{
|
||||||
|
@ -730,9 +718,7 @@ void R_DrawPlanes(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl->ffloor != NULL
|
if (pl->ffloor != NULL
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
|| pl->polyobj != NULL
|
|| pl->polyobj != NULL
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -761,7 +747,6 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
#endif
|
#endif
|
||||||
spanfunc = basespanfunc;
|
spanfunc = basespanfunc;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
if (pl->polyobj && pl->polyobj->translucency != 0) {
|
if (pl->polyobj && pl->polyobj->translucency != 0) {
|
||||||
spanfunc = R_DrawTranslucentSpan_8;
|
spanfunc = R_DrawTranslucentSpan_8;
|
||||||
|
|
||||||
|
@ -783,7 +768,6 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
light = LIGHTLEVELS-1;
|
light = LIGHTLEVELS-1;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
if (pl->ffloor)
|
if (pl->ffloor)
|
||||||
{
|
{
|
||||||
// Don't draw planes that shouldn't be drawn.
|
// Don't draw planes that shouldn't be drawn.
|
||||||
|
|
|
@ -45,9 +45,7 @@ typedef struct visplane_s
|
||||||
fixed_t xoffs, yoffs; // Scrolling flats.
|
fixed_t xoffs, yoffs; // Scrolling flats.
|
||||||
|
|
||||||
struct ffloor_s *ffloor;
|
struct ffloor_s *ffloor;
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
polyobj_t *polyobj;
|
polyobj_t *polyobj;
|
||||||
#endif
|
|
||||||
pslope_t *slope;
|
pslope_t *slope;
|
||||||
|
|
||||||
boolean noencore;
|
boolean noencore;
|
||||||
|
@ -81,9 +79,7 @@ void R_MakeSpans(INT32 x, INT32 t1, INT32 b1, INT32 t2, INT32 b2);
|
||||||
void R_DrawPlanes(void);
|
void R_DrawPlanes(void);
|
||||||
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, fixed_t xoff, fixed_t yoff, angle_t plangle,
|
visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel, fixed_t xoff, fixed_t yoff, angle_t plangle,
|
||||||
extracolormap_t *planecolormap, ffloor_t *ffloor
|
extracolormap_t *planecolormap, ffloor_t *ffloor
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
, polyobj_t *polyobj
|
, polyobj_t *polyobj
|
||||||
#endif
|
|
||||||
, pslope_t *slope
|
, pslope_t *slope
|
||||||
, boolean noencore);
|
, boolean noencore);
|
||||||
visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop);
|
visplane_t *R_CheckPlane(visplane_t *pl, INT32 start, INT32 stop);
|
||||||
|
@ -111,9 +107,7 @@ typedef struct planemgr_s
|
||||||
struct pslope_s *slope;
|
struct pslope_s *slope;
|
||||||
|
|
||||||
struct ffloor_s *ffloor;
|
struct ffloor_s *ffloor;
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
polyobj_t *polyobj;
|
polyobj_t *polyobj;
|
||||||
#endif
|
|
||||||
} visffloor_t;
|
} visffloor_t;
|
||||||
|
|
||||||
extern visffloor_t ffloor[MAXFFLOORS];
|
extern visffloor_t ffloor[MAXFFLOORS];
|
||||||
|
|
12
src/r_segs.c
12
src/r_segs.c
|
@ -1297,7 +1297,6 @@ static void R_RenderSegLoop (void)
|
||||||
|
|
||||||
for (i = 0; i < numffloors; i++)
|
for (i = 0; i < numffloors; i++)
|
||||||
{
|
{
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
if (ffloor[i].polyobj && (!curline->polyseg || ffloor[i].polyobj != curline->polyseg))
|
if (ffloor[i].polyobj && (!curline->polyseg || ffloor[i].polyobj != curline->polyseg))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1308,7 +1307,6 @@ static void R_RenderSegLoop (void)
|
||||||
else if (ffloor[i].plane->maxx < rw_x)
|
else if (ffloor[i].plane->maxx < rw_x)
|
||||||
ffloor[i].plane->maxx = rw_x;
|
ffloor[i].plane->maxx = rw_x;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ffloor[i].height < viewz)
|
if (ffloor[i].height < viewz)
|
||||||
{
|
{
|
||||||
|
@ -1321,12 +1319,10 @@ static void R_RenderSegLoop (void)
|
||||||
if (bottom_w > bottom)
|
if (bottom_w > bottom)
|
||||||
bottom_w = bottom;
|
bottom_w = bottom;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
// Polyobject-specific hack to fix plane leaking -Red
|
// Polyobject-specific hack to fix plane leaking -Red
|
||||||
if (curline->polyseg && ffloor[i].polyobj && ffloor[i].polyobj == curline->polyseg && top_w >= bottom_w) {
|
if (curline->polyseg && ffloor[i].polyobj && ffloor[i].polyobj == curline->polyseg && top_w >= bottom_w) {
|
||||||
ffloor[i].plane->top[rw_x] = ffloor[i].plane->bottom[rw_x] = 0xFFFF;
|
ffloor[i].plane->top[rw_x] = ffloor[i].plane->bottom[rw_x] = 0xFFFF;
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
|
|
||||||
if (top_w <= bottom_w)
|
if (top_w <= bottom_w)
|
||||||
{
|
{
|
||||||
|
@ -1345,12 +1341,10 @@ static void R_RenderSegLoop (void)
|
||||||
if (bottom_w > bottom)
|
if (bottom_w > bottom)
|
||||||
bottom_w = bottom;
|
bottom_w = bottom;
|
||||||
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
// Polyobject-specific hack to fix plane leaking -Red
|
// Polyobject-specific hack to fix plane leaking -Red
|
||||||
if (curline->polyseg && ffloor[i].polyobj && ffloor[i].polyobj == curline->polyseg && top_w >= bottom_w) {
|
if (curline->polyseg && ffloor[i].polyobj && ffloor[i].polyobj == curline->polyseg && top_w >= bottom_w) {
|
||||||
ffloor[i].plane->top[rw_x] = ffloor[i].plane->bottom[rw_x] = 0xFFFF;
|
ffloor[i].plane->top[rw_x] = ffloor[i].plane->bottom[rw_x] = 0xFFFF;
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
|
|
||||||
if (top_w <= bottom_w)
|
if (top_w <= bottom_w)
|
||||||
{
|
{
|
||||||
|
@ -1810,10 +1804,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
{
|
{
|
||||||
for (i = 0; i < numffloors; i++)
|
for (i = 0; i < numffloors; i++)
|
||||||
{
|
{
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
if (ffloor[i].polyobj && (!ds_p->curline->polyseg || ffloor[i].polyobj != ds_p->curline->polyseg))
|
if (ffloor[i].polyobj && (!ds_p->curline->polyseg || ffloor[i].polyobj != ds_p->curline->polyseg))
|
||||||
continue;
|
continue;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (ffloor[i].slope) {
|
if (ffloor[i].slope) {
|
||||||
ffloor[i].f_pos = P_GetZAt(ffloor[i].slope, segleft.x, segleft.y) - viewz;
|
ffloor[i].f_pos = P_GetZAt(ffloor[i].slope, segleft.x, segleft.y) - viewz;
|
||||||
|
@ -2334,7 +2326,6 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
|
|
||||||
maskedtextureheight = ds_p->maskedtextureheight; // note to red, this == &(ds_p->maskedtextureheight[0])
|
maskedtextureheight = ds_p->maskedtextureheight; // note to red, this == &(ds_p->maskedtextureheight[0])
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
|
||||||
if (curline->polyseg) { // use REAL front and back floors please, so midtexture rendering isn't mucked up
|
if (curline->polyseg) { // use REAL front and back floors please, so midtexture rendering isn't mucked up
|
||||||
rw_midtextureslide = rw_midtexturebackslide = 0;
|
rw_midtextureslide = rw_midtexturebackslide = 0;
|
||||||
if (!!(linedef->flags & ML_DONTPEGBOTTOM) ^ !!(linedef->flags & ML_EFFECT3))
|
if (!!(linedef->flags & ML_DONTPEGBOTTOM) ^ !!(linedef->flags & ML_EFFECT3))
|
||||||
|
@ -2363,7 +2354,6 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
}
|
}
|
||||||
rw_midtexturemid += sidedef->rowoffset;
|
rw_midtexturemid += sidedef->rowoffset;
|
||||||
rw_midtextureback += sidedef->rowoffset;
|
rw_midtextureback += sidedef->rowoffset;
|
||||||
#endif
|
|
||||||
|
|
||||||
maskedtexture = true;
|
maskedtexture = true;
|
||||||
}
|
}
|
||||||
|
@ -2710,7 +2700,6 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
if (curline->polyseg && frontsector && (curline->polyseg->flags & POF_RENDERPLANES))
|
if (curline->polyseg && frontsector && (curline->polyseg->flags & POF_RENDERPLANES))
|
||||||
{
|
{
|
||||||
while (i < numffloors && ffloor[i].polyobj != curline->polyseg) i++;
|
while (i < numffloors && ffloor[i].polyobj != curline->polyseg) i++;
|
||||||
|
@ -2749,7 +2738,6 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
numbackffloors = i;
|
numbackffloors = i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1941,7 +1941,6 @@ static void R_CreateDrawNodes(void)
|
||||||
entry->ffloor = ds->thicksides[i];
|
entry->ffloor = ds->thicksides[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
// Check for a polyobject plane, but only if this is a front line
|
// Check for a polyobject plane, but only if this is a front line
|
||||||
if (ds->curline->polyseg && ds->curline->polyseg->visplane && !ds->curline->side) {
|
if (ds->curline->polyseg && ds->curline->polyseg->visplane && !ds->curline->side) {
|
||||||
plane = ds->curline->polyseg->visplane;
|
plane = ds->curline->polyseg->visplane;
|
||||||
|
@ -1957,7 +1956,6 @@ static void R_CreateDrawNodes(void)
|
||||||
}
|
}
|
||||||
ds->curline->polyseg->visplane = NULL;
|
ds->curline->polyseg->visplane = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (ds->maskedtexturecol)
|
if (ds->maskedtexturecol)
|
||||||
{
|
{
|
||||||
entry = R_CreateDrawNode(&nodehead);
|
entry = R_CreateDrawNode(&nodehead);
|
||||||
|
@ -2002,7 +2000,6 @@ static void R_CreateDrawNodes(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
// find all the remaining polyobject planes and add them on the end of the list
|
// find all the remaining polyobject planes and add them on the end of the list
|
||||||
// probably this is a terrible idea if we wanted them to be sorted properly
|
// probably this is a terrible idea if we wanted them to be sorted properly
|
||||||
// but it works getting them in for now
|
// but it works getting them in for now
|
||||||
|
@ -2023,7 +2020,6 @@ static void R_CreateDrawNodes(void)
|
||||||
// note: no seg is set, for what should be obvious reasons
|
// note: no seg is set, for what should be obvious reasons
|
||||||
PolyObjects[i].visplane = NULL;
|
PolyObjects[i].visplane = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (visspritecount == 0)
|
if (visspritecount == 0)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue