mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Replace some more literal SE numbers, rename a couple of functions.
git-svn-id: https://svn.eduke32.com/eduke32@3010 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
15d1c94d03
commit
8f6d9c0986
7 changed files with 26 additions and 29 deletions
|
@ -4895,11 +4895,11 @@ ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5
|
|||
Bmemcpy(&actor[i].bposx, s, sizeof(vec3_t));
|
||||
|
||||
switchpicnum = s->picnum;
|
||||
if ((s->picnum > NUKEBUTTON)&&(s->picnum <= NUKEBUTTON+3))
|
||||
if (s->picnum > NUKEBUTTON && s->picnum <= NUKEBUTTON+3)
|
||||
{
|
||||
switchpicnum = NUKEBUTTON;
|
||||
}
|
||||
if ((s->picnum > GLASSPIECES)&&(s->picnum <= GLASSPIECES+2))
|
||||
if (s->picnum > GLASSPIECES && s->picnum <= GLASSPIECES+2)
|
||||
{
|
||||
switchpicnum = GLASSPIECES;
|
||||
}
|
||||
|
|
|
@ -5612,7 +5612,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT:
|
||||
|
||||
T4=sector[sect].floorshade;
|
||||
|
||||
|
@ -5678,7 +5678,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
}
|
||||
break;
|
||||
|
||||
case 4: //Flashing lights
|
||||
case SE_4_RANDOM_LIGHTS: //Flashing lights
|
||||
|
||||
T3 = sector[sect].floorshade;
|
||||
|
||||
|
@ -6008,7 +6008,7 @@ SPAWN_END:
|
|||
return i;
|
||||
}
|
||||
|
||||
static int32_t maybe_take_on_pal_of_floor(spritetype *datspr, int32_t sect)
|
||||
static int32_t G_MaybeTakeOnFloorPal(spritetype *datspr, int32_t sect)
|
||||
{
|
||||
int32_t dapal = sector[sect].floorpal;
|
||||
|
||||
|
@ -6050,7 +6050,7 @@ static int32_t getofs_viewtype7(const spritetype *s, spritetype *t, int32_t a)
|
|||
return k;
|
||||
}
|
||||
|
||||
static int32_t adult_tile_p(int32_t pic)
|
||||
static int32_t G_CheckAdultTile(int32_t pic)
|
||||
{
|
||||
switch (pic)
|
||||
{
|
||||
|
@ -6279,7 +6279,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
i = t->owner;
|
||||
s = (i < 0 ? &tsprite[j] : &sprite[i]);
|
||||
|
||||
if (ud.lockout && adult_tile_p(DYNAMICTILEMAP(s->picnum)))
|
||||
if (ud.lockout && G_CheckAdultTile(DYNAMICTILEMAP(s->picnum)))
|
||||
{
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
continue;
|
||||
|
@ -6619,7 +6619,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
t->pal = g_player[p].ps->palookup;
|
||||
}
|
||||
PALONLY:
|
||||
maybe_take_on_pal_of_floor(t, sect);
|
||||
G_MaybeTakeOnFloorPal(t, sect);
|
||||
|
||||
if (s->owner == -1) continue;
|
||||
|
||||
|
@ -6659,7 +6659,7 @@ PALONLY:
|
|||
else t->picnum += T1;
|
||||
t->shade -= 6;
|
||||
|
||||
maybe_take_on_pal_of_floor(t, sect);
|
||||
G_MaybeTakeOnFloorPal(t, sect);
|
||||
break;
|
||||
|
||||
case WATERBUBBLE__STATIC:
|
||||
|
@ -6669,7 +6669,7 @@ PALONLY:
|
|||
break;
|
||||
}
|
||||
default:
|
||||
maybe_take_on_pal_of_floor(t, sect);
|
||||
G_MaybeTakeOnFloorPal(t, sect);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -6924,7 +6924,7 @@ skip:
|
|||
t->picnum = actor[i].t_data[1];
|
||||
else t->picnum = actor[s->owner].dispicnum;
|
||||
|
||||
if (!maybe_take_on_pal_of_floor(t, sect))
|
||||
if (!G_MaybeTakeOnFloorPal(t, sect))
|
||||
t->pal = sprite[s->owner].pal;
|
||||
|
||||
t->shade = sprite[s->owner].shade;
|
||||
|
|
|
@ -3570,7 +3570,7 @@ nullquote:
|
|||
insptr++;
|
||||
|
||||
index=Gv_GetVarX(*insptr++);
|
||||
if ((index < aGameArrays[lVarID].size)&&(index>=0))
|
||||
if (index>=0 && index < aGameArrays[lVarID].size)
|
||||
{
|
||||
OSD_Printf(OSDTEXT_GREEN "%s: L=%d %s[%d] =%d\n", keyw[g_tw], g_errorLineNum,
|
||||
aGameArrays[lVarID].szLabel, index,
|
||||
|
|
|
@ -3514,7 +3514,7 @@ void P_CheckTouchDamage(DukePlayer_t *p, int32_t obj)
|
|||
else if (wall[obj].cstat&85)
|
||||
{
|
||||
int32_t switchpicnum = wall[obj].overpicnum;
|
||||
if ((switchpicnum>W_FORCEFIELD)&&(switchpicnum<=W_FORCEFIELD+2))
|
||||
if (switchpicnum>W_FORCEFIELD && switchpicnum<=W_FORCEFIELD+2)
|
||||
switchpicnum=W_FORCEFIELD;
|
||||
|
||||
switch (DYNAMICTILEMAP(switchpicnum))
|
||||
|
|
|
@ -1094,7 +1094,7 @@ static inline void prelevel(char g)
|
|||
int32_t i, nexti, j, startwall, endwall;
|
||||
int32_t switchpicnum;
|
||||
|
||||
uint8_t tagbitmap[65536>>3];
|
||||
uint8_t tagbitmap[65536>>3]; // XXX: allocating 8k on the stack isn't that great
|
||||
Bmemset(tagbitmap, 0, sizeof(tagbitmap));
|
||||
|
||||
Bmemset(show2dsector, 0, sizeof(show2dsector));
|
||||
|
@ -1295,8 +1295,9 @@ static inline void prelevel(char g)
|
|||
|
||||
animwall[g_numAnimWalls].tag = 0;
|
||||
animwall[g_numAnimWalls].wallnum = 0;
|
||||
|
||||
switchpicnum = wal->overpicnum;
|
||||
if ((wal->overpicnum > W_FORCEFIELD)&&(wal->overpicnum <= W_FORCEFIELD+2))
|
||||
if (wal->overpicnum > W_FORCEFIELD && wal->overpicnum <= W_FORCEFIELD+2)
|
||||
{
|
||||
switchpicnum = W_FORCEFIELD;
|
||||
}
|
||||
|
@ -1326,7 +1327,6 @@ static inline void prelevel(char g)
|
|||
wal->lotag;
|
||||
|
||||
case BIGFORCE__STATIC:
|
||||
|
||||
animwall[g_numAnimWalls].wallnum = i;
|
||||
g_numAnimWalls++;
|
||||
|
||||
|
@ -1368,7 +1368,6 @@ static inline void prelevel(char g)
|
|||
case FEMPIC1__STATIC:
|
||||
case FEMPIC2__STATIC:
|
||||
case FEMPIC3__STATIC:
|
||||
|
||||
wal->extra = wal->picnum;
|
||||
animwall[g_numAnimWalls].tag = -1;
|
||||
if (ud.lockout)
|
||||
|
@ -1388,7 +1387,7 @@ static inline void prelevel(char g)
|
|||
case SCREENBREAK3__STATIC:
|
||||
case SCREENBREAK4__STATIC:
|
||||
case SCREENBREAK5__STATIC:
|
||||
|
||||
//
|
||||
case SCREENBREAK9__STATIC:
|
||||
case SCREENBREAK10__STATIC:
|
||||
case SCREENBREAK11__STATIC:
|
||||
|
@ -1400,7 +1399,6 @@ static inline void prelevel(char g)
|
|||
case SCREENBREAK17__STATIC:
|
||||
case SCREENBREAK18__STATIC:
|
||||
case SCREENBREAK19__STATIC:
|
||||
|
||||
animwall[g_numAnimWalls].wallnum = i;
|
||||
animwall[g_numAnimWalls].tag = wal->picnum;
|
||||
g_numAnimWalls++;
|
||||
|
@ -1994,7 +1992,7 @@ int32_t G_EnterLevel(int32_t g)
|
|||
|
||||
prelevel(g);
|
||||
|
||||
allignwarpelevators();
|
||||
G_AlignWarpElevators();
|
||||
resetpspritevars(g);
|
||||
|
||||
// automapping = 0;
|
||||
|
|
|
@ -464,9 +464,8 @@ void G_AnimateWalls(void)
|
|||
}
|
||||
|
||||
if (wall[i].cstat&16)
|
||||
if ((wall[i].overpicnum >= W_FORCEFIELD)&&(wall[i].overpicnum <= W_FORCEFIELD+2))
|
||||
if (wall[i].overpicnum >= W_FORCEFIELD && wall[i].overpicnum <= W_FORCEFIELD+2)
|
||||
{
|
||||
|
||||
t = animwall[p].tag;
|
||||
|
||||
if (wall[i].cstat&254)
|
||||
|
@ -1211,7 +1210,7 @@ int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchissprite)
|
|||
{
|
||||
switchpicnum--;
|
||||
}
|
||||
if ((picnum > MULTISWITCH)&&(picnum <= MULTISWITCH+3))
|
||||
if (picnum > MULTISWITCH && picnum <= MULTISWITCH+3)
|
||||
{
|
||||
switchpicnum = MULTISWITCH;
|
||||
}
|
||||
|
@ -1489,7 +1488,7 @@ int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchissprite)
|
|||
{
|
||||
switchpicnum--;
|
||||
}
|
||||
if ((picnum > MULTISWITCH)&&(picnum <= MULTISWITCH+3))
|
||||
if (picnum > MULTISWITCH && picnum <= MULTISWITCH+3)
|
||||
{
|
||||
switchpicnum = MULTISWITCH;
|
||||
}
|
||||
|
@ -1689,7 +1688,7 @@ void A_DamageWall(int32_t spr,int32_t dawallnum,const vec3_t *pos,int32_t atwith
|
|||
if (sector[wal->nextsector].floorz-sector[wal->nextsector].ceilingz)
|
||||
{
|
||||
int32_t switchpicnum = wal->overpicnum;
|
||||
if ((switchpicnum > W_FORCEFIELD)&&(switchpicnum <= W_FORCEFIELD+2))
|
||||
if (switchpicnum > W_FORCEFIELD && switchpicnum <= W_FORCEFIELD+2)
|
||||
switchpicnum = W_FORCEFIELD;
|
||||
switch (DYNAMICTILEMAP(switchpicnum))
|
||||
{
|
||||
|
@ -1993,7 +1992,7 @@ void A_DamageObject(int32_t i,int32_t sn)
|
|||
rpg = 1;
|
||||
/*
|
||||
switchpicnum = PN;
|
||||
if ((PN > WATERFOUNTAIN)&&(PN < WATERFOUNTAIN+3))
|
||||
if (PN > WATERFOUNTAIN && PN < WATERFOUNTAIN+3)
|
||||
{
|
||||
switchpicnum = WATERFOUNTAIN;
|
||||
}
|
||||
|
@ -2439,7 +2438,7 @@ void A_DamageObject(int32_t i,int32_t sn)
|
|||
}
|
||||
}
|
||||
|
||||
void allignwarpelevators(void)
|
||||
void G_AlignWarpElevators(void)
|
||||
{
|
||||
int32_t j, i = headspritestat[STAT_EFFECTOR];
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ int32_t A_CheckHitSprite(int32_t i,int16_t *hitsp);
|
|||
void A_DamageObject(int32_t i,int32_t sn);
|
||||
void A_DamageWall(int32_t spr,int32_t dawallnum,const vec3_t *pos,int32_t atwith);
|
||||
int32_t __fastcall A_FindPlayer(const spritetype *s,int32_t *d);
|
||||
void allignwarpelevators(void);
|
||||
void G_AlignWarpElevators(void);
|
||||
int32_t CheckDoorTile(int32_t dapic);
|
||||
void G_AnimateCamSprite(void);
|
||||
void G_AnimateWalls(void);
|
||||
|
|
Loading…
Reference in a new issue