Clean up A_InitEnemyFlags() a bit.

git-svn-id: https://svn.eduke32.com/eduke32@4384 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2014-03-22 09:23:55 +00:00
parent 7573f0f09d
commit 057c5c9356

View file

@ -10690,57 +10690,26 @@ static void G_LoadExtraPalettes(void)
Bmemset(&slime_pal[255*3], 0, 3);
}
#define SETBGFLAG(Tilenum) g_tile[Tilenum].flags |= SFLAG_HARDCODED_BADGUY
#define SETNDPFLAG(Tilenum) g_tile[Tilenum].flags |= SFLAG_NODAMAGEPUSH
#define SETFLAG(Tilenum, Flag) g_tile[Tilenum].flags |= Flag
// Has to be after setting the dynamic names (e.g. SHARK).
static void A_InitEnemyFlags(void)
{
int32_t i;
int32_t DukeEnemies[] = { SHARK, RECON, DRONE, LIZTROOPONTOILET, LIZTROOPJUSTSIT, LIZTROOPSTAYPUT, LIZTROOPSHOOT, LIZTROOPJETPACK, LIZTROOPSHOOT, LIZTROOPDUCKING,
LIZTROOPRUNNING, LIZTROOP, OCTABRAIN, COMMANDER, COMMANDERSTAYPUT, PIGCOP, PIGCOPSTAYPUT, PIGCOPDIVE, EGG, LIZMAN, LIZMANSPITTING, LIZMANJUMP, ORGANTIC,
BOSS1, BOSS2, BOSS3, BOSS4, RAT, ROTATEGUN };
int32_t i, SolidEnemies[] = { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN };
for (i=GREENSLIME; i<=GREENSLIME+7; i++)
SETBGFLAG(i);
SETFLAG(i, SFLAG_HARDCODED_BADGUY);
SETBGFLAG(SHARK);
SETBGFLAG(RECON);
SETBGFLAG(DRONE);
SETBGFLAG(LIZTROOPONTOILET);
SETBGFLAG(LIZTROOPJUSTSIT);
SETBGFLAG(LIZTROOPSTAYPUT);
SETBGFLAG(LIZTROOPSHOOT);
SETBGFLAG(LIZTROOPJETPACK);
SETBGFLAG(LIZTROOPDUCKING);
SETBGFLAG(LIZTROOPRUNNING);
SETBGFLAG(LIZTROOP);
SETBGFLAG(OCTABRAIN);
SETBGFLAG(COMMANDER);
SETBGFLAG(COMMANDERSTAYPUT);
SETBGFLAG(PIGCOP);
SETBGFLAG(EGG);
SETBGFLAG(PIGCOPSTAYPUT);
SETBGFLAG(PIGCOPDIVE);
SETBGFLAG(LIZMAN);
SETBGFLAG(LIZMANSPITTING);
SETBGFLAG(LIZMANFEEDING);
SETBGFLAG(LIZMANJUMP);
SETBGFLAG(ORGANTIC);
SETBGFLAG(BOSS1);
SETBGFLAG(BOSS2);
SETBGFLAG(BOSS3);
SETBGFLAG(BOSS4);
SETBGFLAG(RAT);
SETBGFLAG(ROTATEGUN);
for (i=ARRAY_SIZE(DukeEnemies)-1; i>=0; i--)
SETFLAG(DukeEnemies[i], SFLAG_HARDCODED_BADGUY);
SETNDPFLAG(TANK);
SETNDPFLAG(BOSS1);
SETNDPFLAG(BOSS4);
SETNDPFLAG(BOSS2);
SETNDPFLAG(BOSS3);
SETNDPFLAG(RECON);
SETNDPFLAG(ROTATEGUN);
for (i=ARRAY_SIZE(SolidEnemies)-1; i>=0; i--)
SETFLAG(SolidEnemies[i], SFLAG_NODAMAGEPUSH);
}
#undef SETBGFLAG
#undef SETNDPFLAG
#undef SETFLAG
extern int32_t startwin_run(void);
static void G_SetupGameButtons(void);