mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-31 22:00:46 +00:00
- flag setter cleanup.
# Conflicts: # source/games/duke/src/zz_game.cpp
This commit is contained in:
parent
ebb226fdaf
commit
8a0baf3aad
7 changed files with 234 additions and 192 deletions
|
@ -6,6 +6,8 @@ set( PCH_SOURCES
|
||||||
src/actors_lava.cpp
|
src/actors_lava.cpp
|
||||||
src/bowling.cpp
|
src/bowling.cpp
|
||||||
src/dispatch.cpp
|
src/dispatch.cpp
|
||||||
|
src/flags_d.cpp
|
||||||
|
src/flags_r.cpp
|
||||||
src/gamedef.cpp
|
src/gamedef.cpp
|
||||||
src/gameexec.cpp
|
src/gameexec.cpp
|
||||||
src/gamevar.cpp
|
src/gamevar.cpp
|
||||||
|
|
|
@ -198,68 +198,32 @@ enum sflags_t
|
||||||
{
|
{
|
||||||
SFLAG_SHADOW = 0x00000001,
|
SFLAG_SHADOW = 0x00000001,
|
||||||
SFLAG_NVG = 0x00000002,
|
SFLAG_NVG = 0x00000002,
|
||||||
SFLAG_NOSHADE = 0x00000004,
|
|
||||||
SFLAG_PROJECTILE = 0x00000008,
|
|
||||||
SFLAG_DECAL = 0x00000010,
|
|
||||||
SFLAG_BADGUY = 0x00000020,
|
SFLAG_BADGUY = 0x00000020,
|
||||||
SFLAG_NOPAL = 0x00000040,
|
SFLAG_NOPAL = 0x00000040,
|
||||||
SFLAG_NOEVENTCODE = 0x00000080,
|
|
||||||
SFLAG_NOLIGHT = 0x00000100,
|
|
||||||
SFLAG_USEACTIVATOR = 0x00000200,
|
SFLAG_USEACTIVATOR = 0x00000200,
|
||||||
SFLAG_NULL = 0x00000400, // null sprite in multiplayer
|
|
||||||
SFLAG_NOCLIP = 0x00000800, // clipmove it with cliptype 0
|
|
||||||
SFLAG_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked
|
SFLAG_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked
|
||||||
SFLAG_SMOOTHMOVE = 0x00002000,
|
|
||||||
SFLAG_NOTELEPORT = 0x00004000,
|
|
||||||
SFLAG_BADGUYSTAYPUT = 0x00008000,
|
SFLAG_BADGUYSTAYPUT = 0x00008000,
|
||||||
SFLAG_CACHE = 0x00010000,
|
SFLAG_GREENSLIMEFOOD = 0x00800000,
|
||||||
// rotation-fixed wrt a pivot point to prevent position diverging due to
|
|
||||||
// roundoff error accumulation:
|
|
||||||
SFLAG_ROTFIXED = 0x00020000,
|
|
||||||
SFLAG_HARDCODED_BADGUY = 0x00040000,
|
|
||||||
SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily
|
|
||||||
SFLAG_NODAMAGEPUSH = 0x00100000,
|
SFLAG_NODAMAGEPUSH = 0x00100000,
|
||||||
SFLAG_NOWATERDIP = 0x00200000,
|
SFLAG_NOWATERDIP = 0x00200000,
|
||||||
SFLAG_HURTSPAWNBLOOD = 0x00400000,
|
SFLAG_INTERNAL_BADGUY = 0x08000000, // a separate flag is needed for the internal ones because SFLAG_BADGUY has additional semantics.
|
||||||
SFLAG_GREENSLIMEFOOD = 0x00800000,
|
|
||||||
SFLAG_REALCLIPDIST = 0x01000000,
|
|
||||||
SFLAG_WAKEUPBADGUYS = 0x02000000,
|
|
||||||
SFLAG_DAMAGEEVENT = 0x04000000,
|
|
||||||
SFLAG_BADGUY_TILE = 0x08000000,
|
|
||||||
SFLAG_KILLCOUNT = 0x10000000,
|
SFLAG_KILLCOUNT = 0x10000000,
|
||||||
SFLAG_NOCANSEECHECK = 0x20000000,
|
SFLAG_NOCANSEECHECK = 0x20000000,
|
||||||
|
|
||||||
|
//SFLAG_NOSHADE = 0x00000004,
|
||||||
|
//SFLAG_PROJECTILE = 0x00000008,
|
||||||
|
//SFLAG_DECAL = 0x00000010,
|
||||||
|
//SFLAG_NOEVENTCODE = 0x00000080,
|
||||||
|
//SFLAG_NOLIGHT = 0x00000100,
|
||||||
|
//SFLAG_NULL = 0x00000400, // null sprite in multiplayer
|
||||||
|
//SFLAG_NOCLIP = 0x00000800, // clipmove it with cliptype 0
|
||||||
|
//SFLAG_SMOOTHMOVE = 0x00002000,
|
||||||
|
//SFLAG_NOTELEPORT = 0x00004000,
|
||||||
|
//SFLAG_HURTSPAWNBLOOD = 0x00400000,
|
||||||
|
//SFLAG_REALCLIPDIST = 0x01000000,
|
||||||
|
//SFLAG_WAKEUPBADGUYS = 0x02000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Custom projectiles "workslike" flags.
|
|
||||||
// XXX: Currently not predefined from CON.
|
|
||||||
enum pflags_t
|
|
||||||
{
|
|
||||||
PROJECTILE_HITSCAN = 0x00000001,
|
|
||||||
PROJECTILE_RPG = 0x00000002,
|
|
||||||
PROJECTILE_BOUNCESOFFWALLS = 0x00000004,
|
|
||||||
PROJECTILE_BOUNCESOFFMIRRORS = 0x00000008,
|
|
||||||
PROJECTILE_KNEE = 0x00000010,
|
|
||||||
PROJECTILE_WATERBUBBLES = 0x00000020,
|
|
||||||
PROJECTILE_TIMED = 0x00000040,
|
|
||||||
PROJECTILE_BOUNCESOFFSPRITES = 0x00000080,
|
|
||||||
PROJECTILE_SPIT = 0x00000100,
|
|
||||||
PROJECTILE_COOLEXPLOSION1 = 0x00000200,
|
|
||||||
PROJECTILE_BLOOD = 0x00000400,
|
|
||||||
PROJECTILE_LOSESVELOCITY = 0x00000800,
|
|
||||||
PROJECTILE_NOAIM = 0x00001000,
|
|
||||||
PROJECTILE_RANDDECALSIZE = 0x00002000,
|
|
||||||
PROJECTILE_EXPLODEONTIMER = 0x00004000,
|
|
||||||
PROJECTILE_RPG_IMPACT = 0x00008000,
|
|
||||||
PROJECTILE_RADIUS_PICNUM = 0x00010000,
|
|
||||||
PROJECTILE_ACCURATE_AUTOAIM = 0x00020000,
|
|
||||||
PROJECTILE_FORCEIMPACT = 0x00040000,
|
|
||||||
PROJECTILE_REALCLIPDIST = 0x00080000,
|
|
||||||
PROJECTILE_ACCURATE = 0x00100000,
|
|
||||||
PROJECTILE_NOSETOWNERSHADE = 0x00200000,
|
|
||||||
PROJECTILE_RPG_IMPACT_DAMAGE = 0x00400000,
|
|
||||||
PROJECTILE_MOVED = 0x80000000, // internal flag, do not document
|
|
||||||
PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN | PROJECTILE_RPG | PROJECTILE_KNEE | PROJECTILE_BLOOD,
|
|
||||||
};
|
|
||||||
|
|
||||||
extern ActorInfo actorinfo[MAXTILES];
|
extern ActorInfo actorinfo[MAXTILES];
|
||||||
extern actor_t actor[MAXSPRITES];
|
extern actor_t actor[MAXSPRITES];
|
||||||
|
@ -335,7 +299,7 @@ EXTERN_INLINE_HEADER int A_CheckEnemySprite(void const * s);
|
||||||
|
|
||||||
ACTOR_INLINE int A_CheckEnemyTile(int const tileNum)
|
ACTOR_INLINE int A_CheckEnemyTile(int const tileNum)
|
||||||
{
|
{
|
||||||
return ((actorinfo[tileNum].flags & (SFLAG_BADGUY_TILE | SFLAG_BADGUY)) != 0);
|
return ((actorinfo[tileNum].flags & (SFLAG_INTERNAL_BADGUY | SFLAG_BADGUY)) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ssp(short i, unsigned int cliptype); //The set sprite function
|
int ssp(short i, unsigned int cliptype); //The set sprite function
|
||||||
|
|
|
@ -31,6 +31,9 @@ BEGIN_DUKE_NS
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void initactorflags_d();
|
||||||
|
void initactorflags_r();
|
||||||
|
|
||||||
bool isadoorwall_d(int dapic);
|
bool isadoorwall_d(int dapic);
|
||||||
bool isadoorwall_r(int dapic);
|
bool isadoorwall_r(int dapic);
|
||||||
void animatewalls_d(void);
|
void animatewalls_d(void);
|
||||||
|
@ -96,6 +99,7 @@ void SetDispatcher()
|
||||||
if (!isRR())
|
if (!isRR())
|
||||||
{
|
{
|
||||||
fi = {
|
fi = {
|
||||||
|
initactorflags_d,
|
||||||
isadoorwall_d,
|
isadoorwall_d,
|
||||||
animatewalls_d,
|
animatewalls_d,
|
||||||
operaterespawns_d,
|
operaterespawns_d,
|
||||||
|
@ -131,6 +135,7 @@ void SetDispatcher()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fi = {
|
fi = {
|
||||||
|
initactorflags_r,
|
||||||
isadoorwall_r,
|
isadoorwall_r,
|
||||||
animatewalls_r,
|
animatewalls_r,
|
||||||
operaterespawns_r,
|
operaterespawns_r,
|
||||||
|
|
93
source/games/duke/src/flags_d.cpp
Normal file
93
source/games/duke/src/flags_d.cpp
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
||||||
|
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
|
||||||
|
|
||||||
|
This file is part of Enhanced Duke Nukem 3D version 1.5 - Atomic Edition
|
||||||
|
|
||||||
|
Duke Nukem 3D is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
Original Source: 1996 - Todd Replogle
|
||||||
|
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
|
|
||||||
|
EDuke enhancements integrated: 04/13/2003 - Matt Saettler
|
||||||
|
|
||||||
|
Note: EDuke source was in transition. Changes are in-progress in the
|
||||||
|
source as it is released.
|
||||||
|
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "ns.h"
|
||||||
|
#include "global.h"
|
||||||
|
#include "actors.h"
|
||||||
|
#include "names.h"
|
||||||
|
|
||||||
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
void initactorflags_d()
|
||||||
|
{
|
||||||
|
setflag(SFLAG_INTERNAL_BADGUY, {
|
||||||
|
SHARK,
|
||||||
|
RECON,
|
||||||
|
DRONE,
|
||||||
|
LIZTROOPONTOILET,
|
||||||
|
LIZTROOPJUSTSIT,
|
||||||
|
LIZTROOPSTAYPUT,
|
||||||
|
LIZTROOPSHOOT,
|
||||||
|
LIZTROOPJETPACK,
|
||||||
|
LIZTROOPDUCKING,
|
||||||
|
LIZTROOPRUNNING,
|
||||||
|
LIZTROOP,
|
||||||
|
OCTABRAIN,
|
||||||
|
COMMANDER,
|
||||||
|
COMMANDERSTAYPUT,
|
||||||
|
PIGCOP,
|
||||||
|
EGG,
|
||||||
|
PIGCOPSTAYPUT,
|
||||||
|
PIGCOPDIVE,
|
||||||
|
LIZMAN,
|
||||||
|
LIZMANSPITTING,
|
||||||
|
LIZMANFEEDING,
|
||||||
|
LIZMANJUMP,
|
||||||
|
ORGANTIC,
|
||||||
|
BOSS1,
|
||||||
|
BOSS2,
|
||||||
|
BOSS3,
|
||||||
|
BOSS4,
|
||||||
|
GREENSLIME,
|
||||||
|
GREENSLIME+1,
|
||||||
|
GREENSLIME+2,
|
||||||
|
GREENSLIME+3,
|
||||||
|
GREENSLIME+4,
|
||||||
|
GREENSLIME+5,
|
||||||
|
GREENSLIME+6,
|
||||||
|
GREENSLIME+7,
|
||||||
|
RAT,
|
||||||
|
ROTATEGUN });
|
||||||
|
|
||||||
|
// Some flags taken from RedNukem's init code. This is a good start as any to reduce the insane dependency on tile numbers for making decisions in the play code. A lot more will be added here later.
|
||||||
|
setflag(SFLAG_NODAMAGEPUSH, { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN });
|
||||||
|
setflag(SFLAG_NOWATERDIP, { OCTABRAIN, COMMANDER, DRONE });
|
||||||
|
setflag(SFLAG_GREENSLIMEFOOD, { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST });
|
||||||
|
|
||||||
|
if (isWorldTour())
|
||||||
|
{
|
||||||
|
setflag(SFLAG_INTERNAL_BADGUY|SFLAG_NODAMAGEPUSH, { FIREFLY, BOSS5, BOSS5STAYPUT });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
END_DUKE_NS
|
107
source/games/duke/src/flags_r.cpp
Normal file
107
source/games/duke/src/flags_r.cpp
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
/*
|
||||||
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
||||||
|
Copyright (C) 2017-2019 Nuke.YKT
|
||||||
|
|
||||||
|
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
|
||||||
|
|
||||||
|
Duke Nukem 3D is free software, you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation, either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY, without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program, if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
Original Source, 1996 - Todd Replogle
|
||||||
|
Prepared for public release, 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
|
*/
|
||||||
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#include "ns.h"
|
||||||
|
#include "global.h"
|
||||||
|
#include "actors.h"
|
||||||
|
#include "names_rr.h"
|
||||||
|
|
||||||
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
void initactorflags_r()
|
||||||
|
{
|
||||||
|
setflag(SFLAG_INTERNAL_BADGUY|SFLAG_KILLCOUNT, {
|
||||||
|
BOULDER,
|
||||||
|
BOULDER1,
|
||||||
|
EGG,
|
||||||
|
RAT,
|
||||||
|
TORNADO,
|
||||||
|
BILLYCOCK,
|
||||||
|
BILLYRAY,
|
||||||
|
BILLYRAYSTAYPUT,
|
||||||
|
BRAYSNIPER,
|
||||||
|
DOGRUN,
|
||||||
|
LTH,
|
||||||
|
HULKJUMP,
|
||||||
|
BUBBASTAND,
|
||||||
|
HULK,
|
||||||
|
HULKSTAYPUT,
|
||||||
|
HEN,
|
||||||
|
DRONE,
|
||||||
|
PIG,
|
||||||
|
RECON,
|
||||||
|
MINION,
|
||||||
|
MINIONSTAYPUT,
|
||||||
|
COOT,
|
||||||
|
COOTSTAYPUT,
|
||||||
|
SHARK,
|
||||||
|
VIXEN});
|
||||||
|
|
||||||
|
if (isRRRA()) setflag(SFLAG_INTERNAL_BADGUY|SFLAG_KILLCOUNT, {
|
||||||
|
SBSWIPE,
|
||||||
|
BIKERB,
|
||||||
|
BIKERBV2,
|
||||||
|
BIKER,
|
||||||
|
MAKEOUT,
|
||||||
|
CHEERB,
|
||||||
|
CHEER,
|
||||||
|
CHEERSTAYPUT,
|
||||||
|
COOTPLAY,
|
||||||
|
BILLYPLAY,
|
||||||
|
MINIONBOAT,
|
||||||
|
HULKBOAT,
|
||||||
|
CHEERBOAT,
|
||||||
|
RABBIT,
|
||||||
|
MAMA,
|
||||||
|
UFO1_RRRA});
|
||||||
|
else setflag(SFLAG_INTERNAL_BADGUY|SFLAG_KILLCOUNT, {
|
||||||
|
SBMOVE,
|
||||||
|
UFO1_RR,
|
||||||
|
UFO2,
|
||||||
|
UFO3,
|
||||||
|
UFO4,
|
||||||
|
UFO5});
|
||||||
|
|
||||||
|
// Why does the pig count as kill? Let's undo that.
|
||||||
|
actorinfo[PIG].flags &= ~SFLAG_KILLCOUNT;
|
||||||
|
|
||||||
|
actorinfo[DRONE].flags |= SFLAG_NOWATERDIP;
|
||||||
|
actorinfo[VIXEN].flags |= SFLAG_NOCANSEECHECK;
|
||||||
|
if (isRRRA())
|
||||||
|
{
|
||||||
|
setflag(SFLAG_KILLCOUNT, { ROCK, ROCK2 }); //???
|
||||||
|
setflag(SFLAG_NODAMAGEPUSH, { HULK, MAMA, BILLYPLAY, COOTPLAY, MAMACLOUD });
|
||||||
|
setflag(SFLAG_NOCANSEECHECK, { COOT, COOTSTAYPUT, BIKERB, BIKERBV2, CHEER, CHEERB,
|
||||||
|
CHEERSTAYPUT, MINIONBOAT, HULKBOAT, CHEERBOAT, RABBIT, COOTPLAY, BILLYPLAY, MAKEOUT, MAMA });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setflag(SFLAG_NODAMAGEPUSH, { HULK, SBMOVE });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
END_DUKE_NS
|
|
@ -312,6 +312,15 @@ inline int actorfella(int spnum)
|
||||||
{
|
{
|
||||||
return actorflag(spnum, SFLAG_KILLCOUNT);
|
return actorflag(spnum, SFLAG_KILLCOUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void setflag(int flag, const std::initializer_list<short>& types)
|
||||||
|
{
|
||||||
|
for (auto val : types)
|
||||||
|
{
|
||||||
|
actorinfo[val].flags |= flag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// (unsigned)iPicnum check: AMC TC Rusty Nails, bayonet MG alt. fire, iPicnum == -1 (via aplWeaponShoots)
|
// (unsigned)iPicnum check: AMC TC Rusty Nails, bayonet MG alt. fire, iPicnum == -1 (via aplWeaponShoots)
|
||||||
#define A_CheckSpriteTileFlags(iPicnum, iType) (((unsigned)iPicnum < MAXTILES) && (actorinfo[iPicnum].flags & iType) != 0)
|
#define A_CheckSpriteTileFlags(iPicnum, iType) (((unsigned)iPicnum < MAXTILES) && (actorinfo[iPicnum].flags & iType) != 0)
|
||||||
#define S_StopSound(num) S_StopEnvSound(num, -1)
|
#define S_StopSound(num) S_StopEnvSound(num, -1)
|
||||||
|
@ -460,6 +469,7 @@ void spawneffector(int i);
|
||||||
struct Dispatcher
|
struct Dispatcher
|
||||||
{
|
{
|
||||||
// sectors_?.cpp
|
// sectors_?.cpp
|
||||||
|
void (*initactorflags)();
|
||||||
bool (*isadoorwall)(int dapic);
|
bool (*isadoorwall)(int dapic);
|
||||||
void (*animatewalls)();
|
void (*animatewalls)();
|
||||||
void (*operaterespawns)(int low);
|
void (*operaterespawns)(int low);
|
||||||
|
|
|
@ -3554,11 +3554,9 @@ static void G_CompileScripts(void)
|
||||||
{
|
{
|
||||||
label = (char *)&sprite[0]; // V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816
|
label = (char *)&sprite[0]; // V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816
|
||||||
labelcode = (int32_t *)§or[0]; // V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
|
labelcode = (int32_t *)§or[0]; // V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
|
||||||
#if 0
|
|
||||||
labeltype = (int32_t *)&wall[0]; // V8: 16384*32/4 = 131072 V7: 8192*32/4 = 65536
|
|
||||||
#endif
|
|
||||||
|
|
||||||
loadcons(G_ConFile());
|
loadcons(G_ConFile());
|
||||||
|
fi.initactorflags();
|
||||||
|
|
||||||
if ((uint32_t)labelcnt > MAXSPRITES*sizeof(spritetype)/64) // see the arithmetic above for why
|
if ((uint32_t)labelcnt > MAXSPRITES*sizeof(spritetype)/64) // see the arithmetic above for why
|
||||||
G_GameExit("Error: too many labels defined!");
|
G_GameExit("Error: too many labels defined!");
|
||||||
|
@ -3600,146 +3598,9 @@ static inline void G_CheckGametype(void)
|
||||||
ud.m_respawn_items = ud.m_respawn_inventory = 1;
|
ud.m_respawn_items = ud.m_respawn_inventory = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SETFLAG(Tilenum, Flag) actorinfo[Tilenum].flags |= Flag
|
|
||||||
|
|
||||||
// Has to be after setting the dynamic names (e.g. TILE_SHARK).
|
|
||||||
static void A_InitEnemyFlags(void)
|
|
||||||
{
|
|
||||||
if (DEER)
|
|
||||||
{
|
|
||||||
int DukeEnemies[] = {
|
|
||||||
TILE_DOGRUN, TILE_PIG, TILE_VIXEN, TILE_CHEER };
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(DukeEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(DukeEnemies[i], SFLAG_HARDCODED_BADGUY|SFLAG_BADGUY_TILE|SFLAG_KILLCOUNT);
|
|
||||||
}
|
|
||||||
else if (RRRA)
|
|
||||||
{
|
|
||||||
int DukeEnemies[] = {
|
|
||||||
TILE_BOULDER, TILE_BOULDER1, TILE_EGG, TILE_RAT, TILE_TORNADO, TILE_BILLYCOCK, TILE_BILLYRAY, TILE_BILLYRAYSTAYPUT,
|
|
||||||
TILE_BRAYSNIPER, TILE_DOGRUN, TILE_LTH, TILE_HULKJUMP, TILE_BUBBASTAND, TILE_HULK, TILE_HULKSTAYPUT, TILE_HEN,
|
|
||||||
TILE_DRONE, TILE_PIG, TILE_RECON, TILE_MINION, TILE_MINIONSTAYPUT, TILE_UFO1, TILE_COOT, TILE_COOTSTAYPUT, TILE_SHARK,
|
|
||||||
TILE_VIXEN, TILE_SBSWIPE, TILE_BIKERB, TILE_BIKERBV2, TILE_BIKER, TILE_MAKEOUT, TILE_CHEERB, TILE_CHEER, TILE_CHEERSTAYPUT,
|
|
||||||
TILE_COOTPLAY, TILE_BILLYPLAY, TILE_MINIONBOAT, TILE_HULKBOAT, TILE_CHEERBOAT, TILE_RABBIT, TILE_MAMA };
|
|
||||||
|
|
||||||
int DukeEnemiesTile[] = {
|
|
||||||
TILE_BOULDER, TILE_BOULDER1, TILE_EGG, TILE_RAT, TILE_TORNADO, TILE_BILLYCOCK, TILE_BILLYRAY, TILE_BILLYRAYSTAYPUT,
|
|
||||||
TILE_BRAYSNIPER, TILE_DOGRUN, TILE_LTH, TILE_HULKJUMP, TILE_BUBBASTAND, TILE_HULK, TILE_HULKSTAYPUT,
|
|
||||||
TILE_DRONE, TILE_PIG, TILE_RECON, TILE_MINION, TILE_MINIONSTAYPUT, TILE_UFO1, TILE_COOT, TILE_COOTSTAYPUT, TILE_SHARK,
|
|
||||||
TILE_VIXEN, TILE_SBSWIPE, TILE_BIKERB, TILE_BIKERBV2, TILE_BIKER, TILE_MAKEOUT, TILE_CHEERB, TILE_CHEER, TILE_CHEERSTAYPUT,
|
|
||||||
TILE_COOTPLAY, TILE_BILLYPLAY, TILE_MINIONBOAT, TILE_HULKBOAT, TILE_CHEERBOAT, TILE_RABBIT, TILE_MAMA };
|
|
||||||
|
|
||||||
int KillCountEnemies[] = {
|
|
||||||
TILE_BOULDER, TILE_BOULDER1, TILE_EGG, TILE_RAT, TILE_TORNADO, TILE_BILLYCOCK, TILE_BILLYRAY, TILE_BILLYRAYSTAYPUT,
|
|
||||||
TILE_BRAYSNIPER, TILE_DOGRUN, TILE_LTH, TILE_HULKJUMP, TILE_BUBBASTAND, TILE_HULK, TILE_HULKSTAYPUT,
|
|
||||||
TILE_DRONE, TILE_PIG, TILE_RECON, TILE_MINION, TILE_MINIONSTAYPUT, TILE_UFO1, TILE_COOT, TILE_COOTSTAYPUT, TILE_SHARK,
|
|
||||||
TILE_VIXEN, TILE_SBSWIPE, TILE_BIKERB, TILE_BIKERBV2, TILE_BIKER, TILE_MAKEOUT, TILE_CHEERB, TILE_CHEER, TILE_CHEERSTAYPUT,
|
|
||||||
TILE_COOTPLAY, TILE_BILLYPLAY, TILE_MINIONBOAT, TILE_HULKBOAT, TILE_CHEERBOAT, TILE_RABBIT, TILE_MAMA,
|
|
||||||
TILE_ROCK, TILE_ROCK2 };
|
|
||||||
|
|
||||||
int SolidEnemies[] = { TILE_HULK, TILE_MAMA, TILE_BILLYPLAY, TILE_COOTPLAY, TILE_MAMACLOUD };
|
|
||||||
int NoWaterDipEnemies[] = { TILE_DRONE };
|
|
||||||
int NoCanSeeCheck[] = {
|
|
||||||
TILE_COOT, TILE_COOTSTAYPUT, TILE_VIXEN, TILE_BIKERB, TILE_BIKERBV2, TILE_CHEER, TILE_CHEERB,
|
|
||||||
TILE_CHEERSTAYPUT, TILE_MINIONBOAT, TILE_HULKBOAT, TILE_CHEERBOAT, TILE_RABBIT, TILE_COOTPLAY,
|
|
||||||
TILE_BILLYPLAY, TILE_MAKEOUT, TILE_MAMA };
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(DukeEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(DukeEnemies[i], SFLAG_HARDCODED_BADGUY);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(DukeEnemiesTile) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(DukeEnemiesTile[i], SFLAG_BADGUY_TILE);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(KillCountEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(KillCountEnemies[i], SFLAG_KILLCOUNT);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(SolidEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(SolidEnemies[i], SFLAG_NODAMAGEPUSH);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(NoWaterDipEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(NoWaterDipEnemies[i], SFLAG_NOWATERDIP);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(NoCanSeeCheck) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(NoCanSeeCheck[i], SFLAG_NOCANSEECHECK);
|
|
||||||
}
|
|
||||||
else if (RR)
|
|
||||||
{
|
|
||||||
int DukeEnemies[] = {
|
|
||||||
TILE_BOULDER, TILE_BOULDER1, TILE_EGG, TILE_RAT, TILE_TORNADO, TILE_BILLYCOCK, TILE_BILLYRAY, TILE_BILLYRAYSTAYPUT,
|
|
||||||
TILE_BRAYSNIPER, TILE_DOGRUN, TILE_LTH, TILE_HULKJUMP, TILE_BUBBASTAND, TILE_HULK, TILE_HULKSTAYPUT, TILE_HEN,
|
|
||||||
TILE_DRONE, TILE_PIG, TILE_RECON, TILE_SBMOVE, TILE_MINION, TILE_MINIONSTAYPUT, TILE_UFO1, TILE_UFO2, TILE_UFO3, TILE_UFO4, TILE_UFO5,
|
|
||||||
TILE_COOT, TILE_COOTSTAYPUT, TILE_SHARK, TILE_VIXEN };
|
|
||||||
|
|
||||||
int DukeEnemiesTile[] = {
|
|
||||||
TILE_BOULDER, TILE_BOULDER1, TILE_EGG, TILE_RAT, TILE_TORNADO, TILE_BILLYCOCK, TILE_BILLYRAY, TILE_BILLYRAYSTAYPUT,
|
|
||||||
TILE_BRAYSNIPER, TILE_DOGRUN, TILE_LTH, TILE_HULKJUMP, TILE_BUBBASTAND, TILE_HULK, TILE_HULKSTAYPUT,
|
|
||||||
TILE_DRONE, TILE_PIG, TILE_RECON, TILE_SBMOVE, TILE_MINION, TILE_MINIONSTAYPUT, TILE_UFO1, TILE_UFO2, TILE_UFO3, TILE_UFO4, TILE_UFO5,
|
|
||||||
TILE_COOT, TILE_COOTSTAYPUT, TILE_SHARK, TILE_VIXEN };
|
|
||||||
|
|
||||||
int KillCountEnemies[] = {
|
|
||||||
TILE_BOULDER, TILE_BOULDER1, TILE_EGG, TILE_RAT, TILE_TORNADO, TILE_BILLYCOCK, TILE_BILLYRAY, TILE_BILLYRAYSTAYPUT,
|
|
||||||
TILE_BRAYSNIPER, TILE_DOGRUN, TILE_LTH, TILE_HULKJUMP, TILE_BUBBASTAND, TILE_HULK, TILE_HULKSTAYPUT,
|
|
||||||
TILE_DRONE, TILE_PIG, TILE_RECON, TILE_SBMOVE, TILE_MINION, TILE_MINIONSTAYPUT, TILE_UFO1, TILE_UFO2, TILE_UFO3, TILE_UFO4, TILE_UFO5,
|
|
||||||
TILE_COOT, TILE_COOTSTAYPUT, TILE_SHARK, TILE_VIXEN };
|
|
||||||
|
|
||||||
int SolidEnemies[] = { TILE_HULK, TILE_SBMOVE };
|
|
||||||
int NoWaterDipEnemies[] = { TILE_DRONE };
|
|
||||||
int NoCanSeeCheck[] = { TILE_VIXEN };
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(DukeEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(DukeEnemies[i], SFLAG_HARDCODED_BADGUY);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(DukeEnemiesTile) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(DukeEnemiesTile[i], SFLAG_BADGUY_TILE);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(KillCountEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(KillCountEnemies[i], SFLAG_KILLCOUNT);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(SolidEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(SolidEnemies[i], SFLAG_NODAMAGEPUSH);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(NoWaterDipEnemies) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(NoWaterDipEnemies[i], SFLAG_NOWATERDIP);
|
|
||||||
|
|
||||||
for (bssize_t i = ARRAY_SIZE(NoCanSeeCheck) - 1; i >= 0; i--)
|
|
||||||
SETFLAG(NoCanSeeCheck[i], SFLAG_NOCANSEECHECK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int DukeEnemies[] = {
|
|
||||||
TILE_SHARK, TILE_RECON, TILE_DRONE,
|
|
||||||
TILE_LIZTROOPONTOILET, TILE_LIZTROOPJUSTSIT, TILE_LIZTROOPSTAYPUT, TILE_LIZTROOPSHOOT,
|
|
||||||
TILE_LIZTROOPJETPACK, TILE_LIZTROOPDUCKING, TILE_LIZTROOPRUNNING, TILE_LIZTROOP,
|
|
||||||
TILE_OCTABRAIN, TILE_COMMANDER, TILE_COMMANDERSTAYPUT, TILE_PIGCOP, TILE_EGG, TILE_PIGCOPSTAYPUT, TILE_PIGCOPDIVE,
|
|
||||||
TILE_LIZMAN, TILE_LIZMANSPITTING, TILE_LIZMANFEEDING, TILE_LIZMANJUMP, TILE_ORGANTIC,
|
|
||||||
TILE_BOSS1, TILE_BOSS2, TILE_BOSS3, TILE_BOSS4, TILE_RAT, TILE_ROTATEGUN };
|
|
||||||
|
|
||||||
int SolidEnemies[] = { TILE_TANK, TILE_BOSS1, TILE_BOSS2, TILE_BOSS3, TILE_BOSS4, TILE_RECON, TILE_ROTATEGUN };
|
|
||||||
int NoWaterDipEnemies[] = { TILE_OCTABRAIN, TILE_COMMANDER, TILE_DRONE };
|
|
||||||
int GreenSlimeFoodEnemies[] = { TILE_LIZTROOP, TILE_LIZMAN, TILE_PIGCOP, TILE_NEWBEAST };
|
|
||||||
|
|
||||||
for (bssize_t i=TILE_GREENSLIME; i<=TILE_GREENSLIME+7; i++)
|
|
||||||
SETFLAG(i, SFLAG_HARDCODED_BADGUY|SFLAG_BADGUY_TILE);
|
|
||||||
|
|
||||||
for (bssize_t i=ARRAY_SIZE(DukeEnemies)-1; i>=0; i--)
|
|
||||||
SETFLAG(DukeEnemies[i], SFLAG_HARDCODED_BADGUY|SFLAG_BADGUY_TILE);
|
|
||||||
|
|
||||||
for (bssize_t i=ARRAY_SIZE(SolidEnemies)-1; i>=0; i--)
|
|
||||||
SETFLAG(SolidEnemies[i], SFLAG_NODAMAGEPUSH);
|
|
||||||
|
|
||||||
for (bssize_t i=ARRAY_SIZE(NoWaterDipEnemies)-1; i>=0; i--)
|
|
||||||
SETFLAG(NoWaterDipEnemies[i], SFLAG_NOWATERDIP);
|
|
||||||
|
|
||||||
for (bssize_t i=ARRAY_SIZE(GreenSlimeFoodEnemies)-1; i>=0; i--)
|
|
||||||
SETFLAG(GreenSlimeFoodEnemies[i], SFLAG_GREENSLIMEFOOD);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#undef SETFLAG
|
|
||||||
|
|
||||||
void G_PostCreateGameState(void)
|
void G_PostCreateGameState(void)
|
||||||
{
|
{
|
||||||
Net_SendClientInfo();
|
Net_SendClientInfo();
|
||||||
A_InitEnemyFlags();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitFonts();
|
void InitFonts();
|
||||||
|
|
Loading…
Reference in a new issue