mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Replace some literal numbers denoting SEs/STs by symbolic enumeration values.
git-svn-id: https://svn.eduke32.com/eduke32@2970 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
41f2535e91
commit
2b58c6de4c
7 changed files with 122 additions and 94 deletions
|
@ -2041,7 +2041,7 @@ DETONATE:
|
||||||
if (actor[j].t_data[0] == 0)
|
if (actor[j].t_data[0] == 0)
|
||||||
actor[j].t_data[0] = 1;
|
actor[j].t_data[0] = 1;
|
||||||
}
|
}
|
||||||
else if (sprite[j].lotag == 21)
|
else if (sprite[j].lotag == SE_21_DROP_FLOOR)
|
||||||
actor[j].t_data[0] = 1;
|
actor[j].t_data[0] = 1;
|
||||||
}
|
}
|
||||||
j = nextspritestat[j];
|
j = nextspritestat[j];
|
||||||
|
@ -2083,10 +2083,10 @@ DETONATE:
|
||||||
switch (sprite[j].lotag)
|
switch (sprite[j].lotag)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
case 21:
|
case SE_21_DROP_FLOOR:
|
||||||
case 31:
|
case SE_31_FLOOR_RISE_FALL:
|
||||||
case 32:
|
case SE_32_CEILING_RISE_FALL:
|
||||||
case 36:
|
case SE_36_PROJ_SHOOTER:
|
||||||
actor[j].t_data[0] = 1;
|
actor[j].t_data[0] = 1;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -5577,7 +5577,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
q = sc->extra>>3;
|
q = sc->extra>>3;
|
||||||
l = 0;
|
l = 0;
|
||||||
|
|
||||||
if (sc->lotag == 30)
|
if (sc->lotag == ST_30_ROTATE_RISE_BRIDGE)
|
||||||
{
|
{
|
||||||
q >>= 2;
|
q >>= 2;
|
||||||
|
|
||||||
|
@ -5990,7 +5990,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 30:
|
case SE_30_TWO_WAY_TRAIN:
|
||||||
if (s->owner == -1)
|
if (s->owner == -1)
|
||||||
{
|
{
|
||||||
t[3] = !t[3];
|
t[3] = !t[3];
|
||||||
|
@ -6458,7 +6458,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
if ((sc->lotag&0xff) != 27)
|
if ((sc->lotag&0xff) != 27)
|
||||||
for (TRAVERSE_CONNECT(p))
|
for (TRAVERSE_CONNECT(p))
|
||||||
if (sc->lotag != 30 && sc->lotag != 31 && sc->lotag != 0)
|
if (sc->lotag != ST_30_ROTATE_RISE_BRIDGE && sc->lotag != ST_31_TWO_WAY_TRAIN && sc->lotag != 0)
|
||||||
if (s->sectnum == sprite[g_player[p].ps->i].sectnum)
|
if (s->sectnum == sprite[g_player[p].ps->i].sectnum)
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
|
@ -6467,10 +6467,10 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
if (t[0] > sh)
|
if (t[0] > sh)
|
||||||
switch (sector[s->sectnum].lotag)
|
switch (sector[s->sectnum].lotag)
|
||||||
{
|
{
|
||||||
case 20:
|
case ST_20_CEILING_DOOR:
|
||||||
case 21:
|
case ST_21_FLOOR_DOOR:
|
||||||
case 22:
|
case ST_22_SPLITTING_DOOR:
|
||||||
case 26:
|
case ST_26_SPLITTING_ST_DOOR:
|
||||||
if (GetAnimationGoal(§or[s->sectnum].ceilingz) >= 0)
|
if (GetAnimationGoal(§or[s->sectnum].ceilingz) >= 0)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -6729,7 +6729,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 16: //Reactor
|
case SE_16_REACTOR: //Reactor
|
||||||
|
|
||||||
t[2]+=32;
|
t[2]+=32;
|
||||||
if (sc->floorz<sc->ceilingz) s->shade=0;
|
if (sc->floorz<sc->ceilingz) s->shade=0;
|
||||||
|
@ -6764,7 +6764,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 17:
|
case SE_17_WARP_ELEVATOR:
|
||||||
{
|
{
|
||||||
q = t[0]*(SP<<2);
|
q = t[0]*(SP<<2);
|
||||||
|
|
||||||
|
@ -6820,7 +6820,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
j = headspritestat[STAT_EFFECTOR];
|
j = headspritestat[STAT_EFFECTOR];
|
||||||
while (j >= 0)
|
while (j >= 0)
|
||||||
{
|
{
|
||||||
if (i != j && (sprite[j].lotag) == 17)
|
if (i != j && (sprite[j].lotag) == SE_17_WARP_ELEVATOR)
|
||||||
if ((sc->hitag-t[0]) ==
|
if ((sc->hitag-t[0]) ==
|
||||||
(sector[sprite[j].sectnum].hitag)
|
(sector[sprite[j].sectnum].hitag)
|
||||||
&& sh == (sprite[j].hitag))
|
&& sh == (sprite[j].hitag))
|
||||||
|
@ -7125,7 +7125,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 21: // Cascading effect
|
case SE_21_DROP_FLOOR: // Cascading effect
|
||||||
{
|
{
|
||||||
int32_t *zptr;
|
int32_t *zptr;
|
||||||
|
|
||||||
|
@ -7165,7 +7165,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24:
|
case SE_24_CONVEYOR:
|
||||||
case 34:
|
case 34:
|
||||||
{
|
{
|
||||||
int32_t p;
|
int32_t p;
|
||||||
|
@ -7291,7 +7291,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 25: //PISTONS
|
case SE_25_PISTON: //PISTONS
|
||||||
if (t[4] == 0) break;
|
if (t[4] == 0) break;
|
||||||
|
|
||||||
if (sc->floorz <= sc->ceilingz)
|
if (sc->floorz <= sc->ceilingz)
|
||||||
|
@ -7314,7 +7314,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 26:
|
case SE_26:
|
||||||
{
|
{
|
||||||
int32_t p;
|
int32_t p;
|
||||||
|
|
||||||
|
@ -7368,7 +7368,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 27:
|
case SE_27_DEMO_CAM:
|
||||||
{
|
{
|
||||||
int32_t p;
|
int32_t p;
|
||||||
DukePlayer_t *ps;
|
DukePlayer_t *ps;
|
||||||
|
@ -7425,7 +7425,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 28:
|
case SE_28_LIGHTNING:
|
||||||
{
|
{
|
||||||
if (t[5] > 0)
|
if (t[5] > 0)
|
||||||
{
|
{
|
||||||
|
@ -7513,13 +7513,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 29:
|
case SE_29_WAVES:
|
||||||
s->hitag += 64;
|
s->hitag += 64;
|
||||||
l = mulscale12((int32_t)s->yvel,sintable[s->hitag&2047]);
|
l = mulscale12((int32_t)s->yvel,sintable[s->hitag&2047]);
|
||||||
sc->floorz = s->z + l;
|
sc->floorz = s->z + l;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31: // True Drop Floor
|
case SE_31_FLOOR_RISE_FALL: // True Drop Floor
|
||||||
if (t[0] == 1)
|
if (t[0] == 1)
|
||||||
{
|
{
|
||||||
// Choose dir
|
// Choose dir
|
||||||
|
@ -7551,7 +7551,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32: // True Drop Ceiling
|
case SE_32_CEILING_RISE_FALL: // True Drop Ceiling
|
||||||
if (t[0] == 1)
|
if (t[0] == 1)
|
||||||
{
|
{
|
||||||
// Choose dir
|
// Choose dir
|
||||||
|
@ -7612,12 +7612,12 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 33:
|
case SE_33_QUAKE_DEBRIS:
|
||||||
if (g_earthquakeTime > 0 && (krand()&7) == 0)
|
if (g_earthquakeTime > 0 && (krand()&7) == 0)
|
||||||
RANDOMSCRAP;
|
RANDOMSCRAP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 36:
|
case SE_36_PROJ_SHOOTER:
|
||||||
if (t[0])
|
if (t[0])
|
||||||
{
|
{
|
||||||
if (t[0] == 1)
|
if (t[0] == 1)
|
||||||
|
@ -7710,7 +7710,7 @@ BOLT:
|
||||||
const spritetype *s = &sprite[i];
|
const spritetype *s = &sprite[i];
|
||||||
sectortype *sc;
|
sectortype *sc;
|
||||||
|
|
||||||
if (s->lotag != 29) continue;
|
if (s->lotag != SE_29_WAVES) continue;
|
||||||
sc = §or[s->sectnum];
|
sc = §or[s->sectnum];
|
||||||
if (sc->wallnum != 4) continue;
|
if (sc->wallnum != 4) continue;
|
||||||
wal = &wall[sc->wallptr+2];
|
wal = &wall[sc->wallptr+2];
|
||||||
|
|
|
@ -5391,7 +5391,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
|
|
||||||
switch (sp->lotag)
|
switch (sp->lotag)
|
||||||
{
|
{
|
||||||
case 28:
|
case SE_28_LIGHTNING:
|
||||||
T6 = 65;// Delay for lightning
|
T6 = 65;// Delay for lightning
|
||||||
break;
|
break;
|
||||||
case 7: // Transporters!!!!
|
case 7: // Transporters!!!!
|
||||||
|
@ -5437,7 +5437,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
case 19:
|
case 19:
|
||||||
sp->owner = -1;
|
sp->owner = -1;
|
||||||
break;
|
break;
|
||||||
case 25: // Pistons
|
case SE_25_PISTON: // Pistons
|
||||||
T4 = sector[sect].ceilingz;
|
T4 = sector[sect].ceilingz;
|
||||||
T5 = 1;
|
T5 = 1;
|
||||||
sector[sect].ceilingz = sp->z;
|
sector[sect].ceilingz = sp->z;
|
||||||
|
@ -5446,7 +5446,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
case 35:
|
case 35:
|
||||||
sector[sect].ceilingz = sp->z;
|
sector[sect].ceilingz = sp->z;
|
||||||
break;
|
break;
|
||||||
case 27:
|
case SE_27_DEMO_CAM:
|
||||||
if (ud.recstat == 1)
|
if (ud.recstat == 1)
|
||||||
{
|
{
|
||||||
sp->xrepeat=sp->yrepeat=64;
|
sp->xrepeat=sp->yrepeat=64;
|
||||||
|
@ -5536,7 +5536,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 17:
|
case SE_17_WARP_ELEVATOR:
|
||||||
|
|
||||||
T3 = sector[sect].floorz; //Stopping loc
|
T3 = sector[sect].floorz; //Stopping loc
|
||||||
|
|
||||||
|
@ -5554,9 +5554,9 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24:
|
case SE_24_CONVEYOR:
|
||||||
sp->yvel <<= 1;
|
sp->yvel <<= 1;
|
||||||
case 36:
|
case SE_36_PROJ_SHOOTER:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
|
@ -5628,7 +5628,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case SE_31_FLOOR_RISE_FALL:
|
||||||
{
|
{
|
||||||
T2 = sector[sect].floorz;
|
T2 = sector[sect].floorz;
|
||||||
// T3 = sp->hitag;
|
// T3 = sp->hitag;
|
||||||
|
@ -5649,7 +5649,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 32:
|
case SE_32_CEILING_RISE_FALL:
|
||||||
{
|
{
|
||||||
T2 = sector[sect].ceilingz;
|
T2 = sector[sect].ceilingz;
|
||||||
T3 = sp->hitag;
|
T3 = sp->hitag;
|
||||||
|
@ -5716,12 +5716,12 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
case 6://Subway
|
case 6://Subway
|
||||||
case 14://Caboos
|
case 14://Caboos
|
||||||
case 15://Subwaytype sliding door
|
case 15://Subwaytype sliding door
|
||||||
case 16://That rotating blocker reactor thing
|
case SE_16_REACTOR://That rotating blocker reactor thing
|
||||||
case 26://ESCELATOR
|
case SE_26://ESCELATOR
|
||||||
case 30://No rotational subways
|
case SE_30_TWO_WAY_TRAIN://No rotational subways
|
||||||
if (sp->lotag == 0)
|
if (sp->lotag == 0)
|
||||||
{
|
{
|
||||||
if (sector[sect].lotag == 30)
|
if (sector[sect].lotag == ST_30_ROTATE_RISE_BRIDGE)
|
||||||
{
|
{
|
||||||
if (sp->pal) sprite[i].clipdist = 1;
|
if (sp->pal) sprite[i].clipdist = 1;
|
||||||
else sprite[i].clipdist = 0;
|
else sprite[i].clipdist = 0;
|
||||||
|
@ -5774,7 +5774,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sp->lotag == 30 || sp->lotag == 6 || sp->lotag == 14 || sp->lotag == 5)
|
if (sp->lotag == SE_30_TWO_WAY_TRAIN || sp->lotag == 6 || sp->lotag == 14 || sp->lotag == 5)
|
||||||
{
|
{
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
int32_t outerwall=-1;
|
int32_t outerwall=-1;
|
||||||
|
@ -5834,14 +5834,14 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
sp->owner = -1;
|
sp->owner = -1;
|
||||||
T1 = s;
|
T1 = s;
|
||||||
|
|
||||||
if (sp->lotag != 30)
|
if (sp->lotag != SE_30_TWO_WAY_TRAIN)
|
||||||
T4 = sp->hitag;
|
T4 = sp->hitag;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (sp->lotag == 16)
|
else if (sp->lotag == SE_16_REACTOR)
|
||||||
T4 = sector[sect].ceilingz;
|
T4 = sector[sect].ceilingz;
|
||||||
|
|
||||||
else if (sp->lotag == 26)
|
else if (sp->lotag == SE_26)
|
||||||
{
|
{
|
||||||
T4 = sp->x;
|
T4 = sp->x;
|
||||||
T5 = sp->y;
|
T5 = sp->y;
|
||||||
|
@ -5866,15 +5866,15 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
||||||
j = A_CallSound(sect,i);
|
j = A_CallSound(sect,i);
|
||||||
if (j == -1) j = SUBWAY;
|
if (j == -1) j = SUBWAY;
|
||||||
actor[i].lastvx = j;
|
actor[i].lastvx = j;
|
||||||
case 30:
|
case SE_30_TWO_WAY_TRAIN:
|
||||||
if (g_netServer || numplayers > 1) break;
|
if (g_netServer || numplayers > 1) break;
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
case 5:
|
case 5:
|
||||||
case 11:
|
case 11:
|
||||||
case 15:
|
case 15:
|
||||||
case 16:
|
case SE_16_REACTOR:
|
||||||
case 26:
|
case SE_26:
|
||||||
Sect_SetInterpolation(sprite[i].sectnum);
|
Sect_SetInterpolation(sprite[i].sectnum);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -6154,7 +6154,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
||||||
if (ror_sprite == -1) ror_sprite = i;
|
if (ror_sprite == -1) ror_sprite = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->lotag == 27 && ud.recstat == 1)
|
if (t->lotag == SE_27_DEMO_CAM && ud.recstat == 1)
|
||||||
{
|
{
|
||||||
t->picnum = 11+((totalclock>>3)&1);
|
t->picnum = 11+((totalclock>>3)&1);
|
||||||
t->cstat |= 128;
|
t->cstat |= 128;
|
||||||
|
|
|
@ -336,4 +336,35 @@ extern char forcegl;
|
||||||
#define Net_EnterText(x, y, t, dalen, c) _EnterText(1,x,y,t,dalen,c)
|
#define Net_EnterText(x, y, t, dalen, c) _EnterText(1,x,y,t,dalen,c)
|
||||||
#define S_StopSound(num) S_StopEnvSound(num, -1)
|
#define S_StopSound(num) S_StopEnvSound(num, -1)
|
||||||
|
|
||||||
|
// sector effector lotags
|
||||||
|
enum {
|
||||||
|
SE_16_REACTOR = 16,
|
||||||
|
SE_17_WARP_ELEVATOR = 17,
|
||||||
|
SE_21_DROP_FLOOR = 21,
|
||||||
|
SE_24_CONVEYOR = 24,
|
||||||
|
SE_25_PISTON = 25,
|
||||||
|
SE_26 = 26,
|
||||||
|
SE_27_DEMO_CAM = 27,
|
||||||
|
SE_28_LIGHTNING = 28,
|
||||||
|
SE_29_WAVES = 29,
|
||||||
|
SE_30_TWO_WAY_TRAIN = 30,
|
||||||
|
SE_31_FLOOR_RISE_FALL = 31,
|
||||||
|
SE_32_CEILING_RISE_FALL = 32,
|
||||||
|
SE_33_QUAKE_DEBRIS = 33,
|
||||||
|
SE_36_PROJ_SHOOTER = 36,
|
||||||
|
};
|
||||||
|
|
||||||
|
// sector lotags
|
||||||
|
enum {
|
||||||
|
ST_15_WARP_ELEVATOR = 15,
|
||||||
|
ST_20_CEILING_DOOR = 20,
|
||||||
|
ST_21_FLOOR_DOOR = 21,
|
||||||
|
ST_22_SPLITTING_DOOR = 22,
|
||||||
|
ST_26_SPLITTING_ST_DOOR = 26,
|
||||||
|
ST_28_DROP_FLOOR = 28,
|
||||||
|
ST_29_TEETH_DOOR = 29,
|
||||||
|
ST_30_ROTATE_RISE_BRIDGE = 30,
|
||||||
|
ST_31_TWO_WAY_TRAIN = 31,
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5361,7 +5361,7 @@ HORIZONLY:
|
||||||
{
|
{
|
||||||
// p->cursectnum = s->sectnum;
|
// p->cursectnum = s->sectnum;
|
||||||
|
|
||||||
if (!ud.noclip && sector[p->cursectnum].lotag == 31)
|
if (!ud.noclip && sector[p->cursectnum].lotag == ST_31_TWO_WAY_TRAIN)
|
||||||
{
|
{
|
||||||
if (sprite[sector[p->cursectnum].hitag].xvel && actor[sector[p->cursectnum].hitag].t_data[0] == 0)
|
if (sprite[sector[p->cursectnum].hitag].xvel && actor[sector[p->cursectnum].hitag].t_data[0] == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1116,8 +1116,8 @@ static inline void prelevel(char g)
|
||||||
|
|
||||||
switch (sector[i].lotag)
|
switch (sector[i].lotag)
|
||||||
{
|
{
|
||||||
case 20:
|
case ST_20_CEILING_DOOR:
|
||||||
case 22:
|
case ST_22_SPLITTING_DOOR:
|
||||||
if (sector[i].floorz > sector[i].ceilingz)
|
if (sector[i].floorz > sector[i].ceilingz)
|
||||||
sector[i].lotag |= 32768;
|
sector[i].lotag |= 32768;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -71,17 +71,14 @@ void G_ResetInterpolations(void)
|
||||||
{
|
{
|
||||||
switch (sprite[k].lotag)
|
switch (sprite[k].lotag)
|
||||||
{
|
{
|
||||||
case 31:
|
case SE_31_FLOOR_RISE_FALL:
|
||||||
G_SetInterpolation(§or[sprite[k].sectnum].floorz);
|
G_SetInterpolation(§or[sprite[k].sectnum].floorz);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case SE_32_CEILING_RISE_FALL:
|
||||||
G_SetInterpolation(§or[sprite[k].sectnum].ceilingz);
|
G_SetInterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||||
break;
|
break;
|
||||||
case 25:
|
case SE_17_WARP_ELEVATOR:
|
||||||
G_SetInterpolation(§or[sprite[k].sectnum].floorz);
|
case SE_25_PISTON:
|
||||||
G_SetInterpolation(§or[sprite[k].sectnum].ceilingz);
|
|
||||||
break;
|
|
||||||
case 17:
|
|
||||||
G_SetInterpolation(§or[sprite[k].sectnum].floorz);
|
G_SetInterpolation(§or[sprite[k].sectnum].floorz);
|
||||||
G_SetInterpolation(§or[sprite[k].sectnum].ceilingz);
|
G_SetInterpolation(§or[sprite[k].sectnum].ceilingz);
|
||||||
break;
|
break;
|
||||||
|
@ -91,9 +88,9 @@ void G_ResetInterpolations(void)
|
||||||
case 11:
|
case 11:
|
||||||
case 14:
|
case 14:
|
||||||
case 15:
|
case 15:
|
||||||
case 16:
|
case SE_16_REACTOR:
|
||||||
case 26:
|
case SE_26:
|
||||||
case 30:
|
case SE_30_TWO_WAY_TRAIN:
|
||||||
Sect_SetInterpolation(sprite[k].sectnum);
|
Sect_SetInterpolation(sprite[k].sectnum);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ int32_t A_CallSound(int32_t sn,int32_t whatsprite)
|
||||||
T6 = whatsprite;
|
T6 = whatsprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sector[SECT].lotag&0xff) != 22)
|
if ((sector[SECT].lotag&0xff) != ST_22_SPLITTING_DOOR)
|
||||||
T1 = 1;
|
T1 = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,13 +102,13 @@ int32_t G_CheckActivatorMotion(int32_t lotag)
|
||||||
switch (sprite[j].lotag)
|
switch (sprite[j].lotag)
|
||||||
{
|
{
|
||||||
case 11:
|
case 11:
|
||||||
case 30:
|
case SE_30_TWO_WAY_TRAIN:
|
||||||
if (actor[j].t_data[4])
|
if (actor[j].t_data[4])
|
||||||
return(1);
|
return(1);
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
case 31:
|
case SE_31_FLOOR_RISE_FALL:
|
||||||
case 32:
|
case SE_32_CEILING_RISE_FALL:
|
||||||
case 18:
|
case 18:
|
||||||
if (actor[j].t_data[0])
|
if (actor[j].t_data[0])
|
||||||
return(1);
|
return(1);
|
||||||
|
@ -163,8 +163,8 @@ int32_t isanunderoperator(int32_t lotag)
|
||||||
case 17:
|
case 17:
|
||||||
case 18:
|
case 18:
|
||||||
case 19:
|
case 19:
|
||||||
case 22:
|
case ST_22_SPLITTING_DOOR:
|
||||||
case 26:
|
case ST_26_SPLITTING_ST_DOOR:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -180,13 +180,13 @@ int32_t isanearoperator(int32_t lotag)
|
||||||
case 17:
|
case 17:
|
||||||
case 18:
|
case 18:
|
||||||
case 19:
|
case 19:
|
||||||
case 20:
|
case ST_20_CEILING_DOOR:
|
||||||
case 21:
|
case ST_21_FLOOR_DOOR:
|
||||||
case 22:
|
case ST_22_SPLITTING_DOOR:
|
||||||
case 23:
|
case 23:
|
||||||
case 25:
|
case 25:
|
||||||
case 26:
|
case ST_26_SPLITTING_ST_DOOR:
|
||||||
case 29://Toothed door
|
case ST_29_TEETH_DOOR://Toothed door
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -290,7 +290,7 @@ void G_DoSectorAnimations(void)
|
||||||
if (animateptr[i] == §or[animatesect[i]].ceilingz)
|
if (animateptr[i] == §or[animatesect[i]].ceilingz)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((sector[dasect].lotag&0xff) != 22)
|
if ((sector[dasect].lotag&0xff) != ST_22_SPLITTING_DOOR)
|
||||||
A_CallSound(dasect,-1);
|
A_CallSound(dasect,-1);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
@ -532,7 +532,7 @@ void G_OperateSectors(int32_t sn, int32_t ii)
|
||||||
switch (sptr->lotag&(0xffff-49152))
|
switch (sptr->lotag&(0xffff-49152))
|
||||||
{
|
{
|
||||||
|
|
||||||
case 30:
|
case ST_30_ROTATE_RISE_BRIDGE:
|
||||||
j = sector[sn].hitag;
|
j = sector[sn].hitag;
|
||||||
if (actor[j].tempang == 0 || actor[j].tempang == 256)
|
if (actor[j].tempang == 0 || actor[j].tempang == 256)
|
||||||
A_CallSound(sn,ii);
|
A_CallSound(sn,ii);
|
||||||
|
@ -541,7 +541,7 @@ void G_OperateSectors(int32_t sn, int32_t ii)
|
||||||
else sprite[j].extra = 1;
|
else sprite[j].extra = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31:
|
case ST_31_TWO_WAY_TRAIN:
|
||||||
|
|
||||||
j = sector[sn].hitag;
|
j = sector[sn].hitag;
|
||||||
if (actor[j].t_data[4] == 0)
|
if (actor[j].t_data[4] == 0)
|
||||||
|
@ -550,18 +550,18 @@ void G_OperateSectors(int32_t sn, int32_t ii)
|
||||||
A_CallSound(sn,ii);
|
A_CallSound(sn,ii);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 26: //The split doors
|
case ST_26_SPLITTING_ST_DOOR: //The split doors
|
||||||
if (GetAnimationGoal(&sptr->ceilingz) == -1) //if the door has stopped
|
if (GetAnimationGoal(&sptr->ceilingz) == -1) //if the door has stopped
|
||||||
{
|
{
|
||||||
g_haltSoundHack = 1;
|
g_haltSoundHack = 1;
|
||||||
sptr->lotag &= 0xff00;
|
sptr->lotag &= 0xff00;
|
||||||
sptr->lotag |= 22;
|
sptr->lotag |= 22; // ST_22_SPLITTING_DOOR?
|
||||||
G_OperateSectors(sn,ii);
|
G_OperateSectors(sn,ii);
|
||||||
sptr->lotag &= 0xff00;
|
sptr->lotag &= 0xff00;
|
||||||
sptr->lotag |= 9;
|
sptr->lotag |= 9;
|
||||||
G_OperateSectors(sn,ii);
|
G_OperateSectors(sn,ii);
|
||||||
sptr->lotag &= 0xff00;
|
sptr->lotag &= 0xff00;
|
||||||
sptr->lotag |= 26;
|
sptr->lotag |= 26; // ST_26_SPLITTING_ST_DOOR?
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ void G_OperateSectors(int32_t sn, int32_t ii)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 15://Warping elevators
|
case ST_15_WARP_ELEVATOR://Warping elevators
|
||||||
|
|
||||||
if (sprite[ii].picnum != APLAYER) return;
|
if (sprite[ii].picnum != APLAYER) return;
|
||||||
// if(ps[sprite[ii].yvel].select_dir == 1) return;
|
// if(ps[sprite[ii].yvel].select_dir == 1) return;
|
||||||
|
@ -726,7 +726,7 @@ void G_OperateSectors(int32_t sn, int32_t ii)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 29:
|
case ST_29_TEETH_DOOR:
|
||||||
|
|
||||||
i = headspritestat[STAT_EFFECTOR]; //Effectors
|
i = headspritestat[STAT_EFFECTOR]; //Effectors
|
||||||
while (i >= 0)
|
while (i >= 0)
|
||||||
|
@ -773,7 +773,7 @@ void G_OperateSectors(int32_t sn, int32_t ii)
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 20:
|
case ST_20_CEILING_DOOR:
|
||||||
|
|
||||||
REDODOOR:
|
REDODOOR:
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ REDODOOR:
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 21:
|
case ST_21_FLOOR_DOOR:
|
||||||
i = GetAnimationGoal(&sptr->floorz);
|
i = GetAnimationGoal(&sptr->floorz);
|
||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
{
|
{
|
||||||
|
@ -833,7 +833,7 @@ REDODOOR:
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 22:
|
case ST_22_SPLITTING_DOOR:
|
||||||
|
|
||||||
// REDODOOR22:
|
// REDODOOR22:
|
||||||
|
|
||||||
|
@ -963,13 +963,13 @@ REDODOOR:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
case 28:
|
case ST_28_DROP_FLOOR:
|
||||||
//activate the rest of them
|
//activate the rest of them
|
||||||
|
|
||||||
j = headspritesect[sn];
|
j = headspritesect[sn];
|
||||||
while (j >= 0)
|
while (j >= 0)
|
||||||
{
|
{
|
||||||
if (sprite[j].statnum==STAT_EFFECTOR && (sprite[j].lotag&0xff)==21)
|
if (sprite[j].statnum==STAT_EFFECTOR && (sprite[j].lotag&0xff)==SE_21_DROP_FLOOR)
|
||||||
break; //Found it
|
break; //Found it
|
||||||
j = nextspritesect[j];
|
j = nextspritesect[j];
|
||||||
}
|
}
|
||||||
|
@ -981,7 +981,7 @@ REDODOOR:
|
||||||
l = headspritestat[STAT_EFFECTOR];
|
l = headspritestat[STAT_EFFECTOR];
|
||||||
while (l >= 0)
|
while (l >= 0)
|
||||||
{
|
{
|
||||||
if ((sprite[l].lotag&0xff)==21 && !actor[l].t_data[0] &&
|
if ((sprite[l].lotag&0xff)==SE_21_DROP_FLOOR && !actor[l].t_data[0] &&
|
||||||
(sprite[l].hitag) == j)
|
(sprite[l].hitag) == j)
|
||||||
actor[l].t_data[0] = 1;
|
actor[l].t_data[0] = 1;
|
||||||
l = nextspritestat[l];
|
l = nextspritestat[l];
|
||||||
|
@ -1085,9 +1085,9 @@ void G_OperateActivators(int32_t low,int32_t snum)
|
||||||
{
|
{
|
||||||
if (sprite[j].statnum == 3) switch (sprite[j].lotag)
|
if (sprite[j].statnum == 3) switch (sprite[j].lotag)
|
||||||
{
|
{
|
||||||
case 36:
|
case SE_36_PROJ_SHOOTER:
|
||||||
case 31:
|
case SE_31_FLOOR_RISE_FALL:
|
||||||
case 32:
|
case SE_32_CEILING_RISE_FALL:
|
||||||
case 18:
|
case 18:
|
||||||
actor[j].t_data[0] = 1-actor[j].t_data[0];
|
actor[j].t_data[0] = 1-actor[j].t_data[0];
|
||||||
A_CallSound(SECT,j);
|
A_CallSound(SECT,j);
|
||||||
|
@ -1097,7 +1097,7 @@ void G_OperateActivators(int32_t low,int32_t snum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k == -1 && (sector[SECT].lotag&0xff) == 22)
|
if (k == -1 && (sector[SECT].lotag&0xff) == ST_22_SPLITTING_DOOR)
|
||||||
k = A_CallSound(SECT,i);
|
k = A_CallSound(SECT,i);
|
||||||
|
|
||||||
G_OperateSectors(SECT,i);
|
G_OperateSectors(SECT,i);
|
||||||
|
@ -1138,7 +1138,7 @@ void G_OperateForceFields(int32_t s, int32_t low)
|
||||||
{
|
{
|
||||||
wall[i].cstat = 0;
|
wall[i].cstat = 0;
|
||||||
|
|
||||||
if (s >= 0 && sprite[s].picnum == SECTOREFFECTOR && sprite[s].lotag == 30)
|
if (s >= 0 && sprite[s].picnum == SECTOREFFECTOR && sprite[s].lotag == SE_30_TWO_WAY_TRAIN)
|
||||||
wall[i].lotag = 0;
|
wall[i].lotag = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1567,15 +1567,15 @@ int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchissprite)
|
||||||
actor[x].t_data[0]++;
|
actor[x].t_data[0]++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 24:
|
case SE_24_CONVEYOR:
|
||||||
case 34:
|
case 34:
|
||||||
case 25:
|
case SE_25_PISTON:
|
||||||
actor[x].t_data[4] = !actor[x].t_data[4];
|
actor[x].t_data[4] = !actor[x].t_data[4];
|
||||||
if (actor[x].t_data[4])
|
if (actor[x].t_data[4])
|
||||||
P_DoQuote(QUOTE_DEACTIVATED,g_player[snum].ps);
|
P_DoQuote(QUOTE_DEACTIVATED,g_player[snum].ps);
|
||||||
else P_DoQuote(QUOTE_ACTIVATED,g_player[snum].ps);
|
else P_DoQuote(QUOTE_ACTIVATED,g_player[snum].ps);
|
||||||
break;
|
break;
|
||||||
case 21:
|
case SE_21_DROP_FLOOR:
|
||||||
P_DoQuote(QUOTE_ACTIVATED,g_player[screenpeek].ps);
|
P_DoQuote(QUOTE_ACTIVATED,g_player[screenpeek].ps);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2443,7 +2443,7 @@ void allignwarpelevators(void)
|
||||||
j = headspritestat[STAT_EFFECTOR];
|
j = headspritestat[STAT_EFFECTOR];
|
||||||
while (j >= 0)
|
while (j >= 0)
|
||||||
{
|
{
|
||||||
if ((sprite[j].lotag) == 17 && i != j &&
|
if ((sprite[j].lotag) == SE_17_WARP_ELEVATOR && i != j &&
|
||||||
(SHT) == (sprite[j].hitag))
|
(SHT) == (sprite[j].hitag))
|
||||||
{
|
{
|
||||||
sector[sprite[j].sectnum].floorz =
|
sector[sprite[j].sectnum].floorz =
|
||||||
|
|
Loading…
Reference in a new issue