mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- removed a few pointless or unused macros.
This commit is contained in:
parent
1011f10c0b
commit
826b514571
3 changed files with 16 additions and 34 deletions
|
@ -243,11 +243,6 @@ int StdRandomRange(int range);
|
|||
|
||||
#define DIST(x1, y1, x2, y2) ksqrt( SQ((x1) - (x2)) + SQ((y1) - (y2)) )
|
||||
|
||||
inline int PIC_SIZY(int sn)
|
||||
{
|
||||
return tileHeight(sprite[sn].picnum);
|
||||
}
|
||||
|
||||
inline int PIC_SIZY(spritetype* sp)
|
||||
{
|
||||
return tileHeight(sp->picnum);
|
||||
|
@ -327,19 +322,7 @@ inline int SPRITEp_SIZE_BOS(const spritetype* sp)
|
|||
// two vectors
|
||||
// can determin direction
|
||||
#define DOT_PRODUCT_2D(x1,y1,x2,y2) (MulScale((x1), (x2), 16) + MulScale((y1), (y2), 16))
|
||||
#define DOT_PRODUCT_3D(x1,y1,z1,x2,y2,z2) (MulScale((x1), (x2), 16) + MulScale((y1), (y2), 16) + MulScale((z1), (z2), 16))
|
||||
|
||||
// just determine if the player is moving
|
||||
#define PLAYER_MOVING(pp) ((pp)->xvect|(pp)->yvect)
|
||||
|
||||
#define LOW_TAG(sectnum) ( sector[sectnum].lotag )
|
||||
#define HIGH_TAG(sectnum) ( sector[sectnum].hitag )
|
||||
|
||||
#define LOW_TAG_SPRITE(spnum) ( sprite[(spnum)].lotag )
|
||||
#define HIGH_TAG_SPRITE(spnum) ( sprite[(spnum)].hitag )
|
||||
|
||||
#define LOW_TAG_WALL(wallnum) ( wall[(wallnum)].lotag )
|
||||
#define HIGH_TAG_WALL(wallnum) ( wall[(wallnum)].hitag )
|
||||
|
||||
#define SEC(value) ((value)*120)
|
||||
|
||||
|
@ -2311,6 +2294,13 @@ inline void SetCollision(USER* u, int coll)
|
|||
u->coll.setFromEngine(coll);
|
||||
}
|
||||
|
||||
// just determine if the player is moving
|
||||
inline bool PLAYER_MOVING(PLAYERp pp)
|
||||
{
|
||||
return (pp->xvect | pp->yvect);
|
||||
}
|
||||
|
||||
|
||||
END_SW_NS
|
||||
#endif
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ SectorSetup(void)
|
|||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
tag = LOW_TAG(i);
|
||||
tag = sector[i].lotag;
|
||||
|
||||
// DOH! NOT AGAIN! :(
|
||||
//ASSERT(wall[4568].lotag != 307);
|
||||
|
@ -718,7 +718,7 @@ FindSectorByTag(int x, int y, int tag)
|
|||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
if (LOW_TAG(i) == tag)
|
||||
if (sector[i].lotag == tag)
|
||||
{
|
||||
// get the delta of the door/elevator
|
||||
wallnum = sector[i].wallptr;
|
||||
|
@ -901,7 +901,7 @@ OperateSector(short sectnum, short player_is_operating)
|
|||
//CON_Message("Operating sectnum %d",sectnum);
|
||||
//CON_Message("stag = %d, lock = %d",SectUser[sectnum]->stag,SECT_LOCK_DOOR);
|
||||
|
||||
switch (LOW_TAG(sectnum))
|
||||
switch (sector[sectnum].lotag)
|
||||
{
|
||||
|
||||
case TAG_VATOR:
|
||||
|
@ -923,14 +923,6 @@ OperateSector(short sectnum, short player_is_operating)
|
|||
int
|
||||
OperateWall(short wallnum, short player_is_operating)
|
||||
{
|
||||
WALLp wallp = &wall[wallnum];
|
||||
|
||||
/*
|
||||
switch (LOW_TAG_WALL(wallnum))
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2094,7 +2086,7 @@ OperateTripTrigger(PLAYERp pp)
|
|||
SECTORp sectp = §or[pp->cursectnum];
|
||||
|
||||
// old method
|
||||
switch (LOW_TAG(pp->cursectnum))
|
||||
switch (sector[pp->cursectnum].lotag)
|
||||
{
|
||||
// same tag for sector as for switch
|
||||
case TAG_LEVEL_EXIT_SWITCH:
|
||||
|
@ -2228,7 +2220,7 @@ OperateContinuousTrigger(PLAYERp pp)
|
|||
if (pp->cursectnum < 0)
|
||||
return;
|
||||
|
||||
switch (LOW_TAG(pp->cursectnum))
|
||||
switch (sector[pp->cursectnum].lotag)
|
||||
{
|
||||
case TAG_TRIGGER_MISSILE_TRAP:
|
||||
{
|
||||
|
@ -2624,7 +2616,7 @@ PlayerOperateEnv(PLAYERp pp)
|
|||
// Trigger operations
|
||||
//
|
||||
|
||||
switch (LOW_TAG(pp->cursectnum))
|
||||
switch (sector[pp->cursectnum].lotag)
|
||||
{
|
||||
case TAG_VATOR:
|
||||
DoVatorOperate(pp, pp->cursectnum);
|
||||
|
|
|
@ -624,7 +624,7 @@ TrackSetup(void)
|
|||
StatIterator it(STAT_TRACK + ndx);
|
||||
while ((SpriteNum = it.NextIndex()) >= 0)
|
||||
{
|
||||
if (LOW_TAG_SPRITE(SpriteNum) == TRACK_START)
|
||||
if (sprite[SpriteNum].lotag == TRACK_START)
|
||||
{
|
||||
ASSERT(t->NumPoints == 0);
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ SetupSectorObject(short sectnum, short tag)
|
|||
//sop->zmid = DIV2(sector[sectnum].floorz + sector[sectnum].ceilingz);
|
||||
|
||||
sop->dir = 1;
|
||||
sop->track = HIGH_TAG(sectnum);
|
||||
sop->track = sector[sectnum].hitag;
|
||||
|
||||
// spawn a sprite to make it easier to integrate with sprite routines
|
||||
auto actorNew = SpawnActor(STAT_SO_SP_CHILD, 0, nullptr, sectnum,
|
||||
|
@ -1560,7 +1560,7 @@ PlaceActorsOnTracks(void)
|
|||
sp = User[i]->SpriteP;
|
||||
u = User[i].Data();
|
||||
|
||||
tag = LOW_TAG_SPRITE(i);
|
||||
tag = sp->lotag;
|
||||
|
||||
if (tag < TAG_ACTOR_TRACK_BEGIN || tag > TAG_ACTOR_TRACK_END)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue