/* Emacs style mode select -*- C++ -*-
*-----------------------------------------------------------------------------
*
*
* PrBoom a Doom port merged with LxDoom and LSDLDoom
* based on BOOM, a modified and improved DOOM engine
* Copyright (C) 1999 by
* id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
* Copyright (C) 1999-2000 by
* Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
*
* This program 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.
*
* DESCRIPTION:
* Thing frame/state LUT,
* generated by multigen utilitiy.
* This one is the original DOOM version, preserved.
* BOOM changes include commenting and addition of predefined lumps
* for providing things that aren't in the IWAD without sending a
* separate must-use wad file around with the EXE.
*
*-----------------------------------------------------------------------------
*/
// Data.
#include "sounds.h"
#include "m_fixed.h"
#ifdef __GNUG__
#pragma implementation "info.h"
#endif
#include "info.h"
#include "p_mobj.h"
#include "rockmacros.h"
// ********************************************************************
// Sprite names
// ********************************************************************
// This is the list of sprite 4-character prefixes. They are searched
// through, with a NULL entry terminating the list. In DOOM originally
// this NULL entry was missing, and coincidentally the next thing in
// memory was the dummy state_t[] entry that started with zero bytes.
// killough 1/17/98: add an explicit NULL entry.
// NUMSPRITES is an enum from info.h where all these are listed
// as SPR_xxxx
const char *sprnames[NUMSPRITES+1] = {
"TROO","SHTG","PUNG","PISG","PISF","SHTF","SHT2","CHGG","CHGF","MISG",
"MISF","SAWG","PLSG","PLSF","BFGG","BFGF","BLUD","PUFF","BAL1","BAL2",
"PLSS","PLSE","MISL","BFS1","BFE1","BFE2","TFOG","IFOG","PLAY","POSS",
"SPOS","VILE","FIRE","FATB","FBXP","SKEL","MANF","FATT","CPOS","SARG",
"HEAD","BAL7","BOSS","BOS2","SKUL","SPID","BSPI","APLS","APBX","CYBR",
"PAIN","SSWV","KEEN","BBRN","BOSF","ARM1","ARM2","BAR1","BEXP","FCAN",
"BON1","BON2","BKEY","RKEY","YKEY","BSKU","RSKU","YSKU","STIM","MEDI",
"SOUL","PINV","PSTR","PINS","MEGA","SUIT","PMAP","PVIS","CLIP","AMMO",
"ROCK","BROK","CELL","CELP","SHEL","SBOX","BPAK","BFUG","MGUN","CSAW",
"LAUN","PLAS","SHOT","SGN2","COLU","SMT2","GOR1","POL2","POL5","POL4",
"POL3","POL1","POL6","GOR2","GOR3","GOR4","GOR5","SMIT","COL1","COL2",
"COL3","COL4","CAND","CBRA","COL6","TRE1","TRE2","ELEC","CEYE","FSKU",
"COL5","TBLU","TGRN","TRED","SMBT","SMGT","SMRT","HDB1","HDB2","HDB3",
"HDB4","HDB5","HDB6","POB1","POB2","BRS1","TLMP","TLP2",NULL
};
// ********************************************************************
// Function addresses or Code Pointers
// ********************************************************************
// These function addresses are the Code Pointers that have been
// modified for years by Dehacked enthusiasts. The new BEX format
// allows more extensive changes (see d_deh.c)
// Doesn't work with g++, needs actionf_p1
void A_Light0();
void A_WeaponReady();
void A_Lower();
void A_Raise();
void A_Punch();
void A_ReFire();
void A_FirePistol();
void A_Light1();
void A_FireShotgun();
void A_Light2();
void A_FireShotgun2();
void A_CheckReload();
void A_OpenShotgun2();
void A_LoadShotgun2();
void A_CloseShotgun2();
void A_FireCGun();
void A_GunFlash();
void A_FireMissile();
void A_Saw();
void A_FirePlasma();
void A_BFGsound();
void A_FireBFG();
void A_BFGSpray();
void A_Explode();
void A_Pain();
void A_PlayerScream();
void A_Fall();
void A_XScream();
void A_Look();
void A_Chase();
void A_FaceTarget();
void A_PosAttack();
void A_Scream();
void A_SPosAttack();
void A_VileChase();
void A_VileStart();
void A_VileTarget();
void A_VileAttack();
void A_StartFire();
void A_Fire();
void A_FireCrackle();
void A_Tracer();
void A_SkelWhoosh();
void A_SkelFist();
void A_SkelMissile();
void A_FatRaise();
void A_FatAttack1();
void A_FatAttack2();
void A_FatAttack3();
void A_BossDeath();
void A_CPosAttack();
void A_CPosRefire();
void A_TroopAttack();
void A_SargAttack();
void A_HeadAttack();
void A_BruisAttack();
void A_SkullAttack();
void A_Metal();
void A_SpidRefire();
void A_BabyMetal();
void A_BspiAttack();
void A_Hoof();
void A_CyberAttack();
void A_PainAttack();
void A_PainDie();
void A_KeenDie();
void A_BrainPain();
void A_BrainScream();
void A_BrainDie();
void A_BrainAwake();
void A_BrainSpit();
void A_SpawnSound();
void A_SpawnFly();
void A_BrainExplode();
void A_Die();
void A_Stop();
void A_Detonate(); /* killough 8/9/98: detonate a bomb or other device */
void A_Mushroom(); /* killough 10/98: mushroom effect */
// ********************************************************************
// State or "frame" information
// ********************************************************************
// Each of the states, otherwise known as "frames", is outlined
// here. The data in each element of the array is the way it is
// initialized, with sprite names identified by their enumerator
// value such as SPR_SHTG. These correlate to the above sprite
// array so don't change them around unless you understand what
// you're doing.
//
// The commented name beginning with S_ at the end of each line
// is there to help figure out where the next-frame pointer is
// pointing. These are also additionally identified in info.h
// as enumerated values. From a change-and-recompile point of
// view this is fairly workable, but it adds a lot to the effort
// when trying to change things externally. See also the d_deh.c
// parts where frame rewiring is done for more details and the
// extended way a BEX file can handle this.
state_t states[NUMSTATES] = {
{SPR_TROO,0,-1,NULL,S_NULL,0,0}, // S_NULL
{SPR_SHTG,4,0,A_Light0,S_NULL,0,0}, // S_LIGHTDONE
{SPR_PUNG,0,1,A_WeaponReady,S_PUNCH,0,0}, // S_PUNCH
{SPR_PUNG,0,1,A_Lower,S_PUNCHDOWN,0,0}, // S_PUNCHDOWN
{SPR_PUNG,0,1,A_Raise,S_PUNCHUP,0,0}, // S_PUNCHUP
{SPR_PUNG,1,4,NULL,S_PUNCH2,0,0}, // S_PUNCH1
{SPR_PUNG,2,4,A_Punch,S_PUNCH3,0,0}, // S_PUNCH2
{SPR_PUNG,3,5,NULL,S_PUNCH4,0,0}, // S_PUNCH3
{SPR_PUNG,2,4,NULL,S_PUNCH5,0,0}, // S_PUNCH4
{SPR_PUNG,1,5,A_ReFire,S_PUNCH,0,0}, // S_PUNCH5
{SPR_PISG,0,1,A_WeaponReady,S_PISTOL,0,0},// S_PISTOL
{SPR_PISG,0,1,A_Lower,S_PISTOLDOWN,0,0}, // S_PISTOLDOWN
{SPR_PISG,0,1,A_Raise,S_PISTOLUP,0,0}, // S_PISTOLUP
{SPR_PISG,0,4,NULL,S_PISTOL2,0,0}, // S_PISTOL1
{SPR_PISG,1,6,A_FirePistol,S_PISTOL3,0,0},// S_PISTOL2
{SPR_PISG,2,4,NULL,S_PISTOL4,0,0}, // S_PISTOL3
{SPR_PISG,1,5,A_ReFire,S_PISTOL,0,0}, // S_PISTOL4
{SPR_PISF,32768,7,A_Light1,S_LIGHTDONE,0,0}, // S_PISTOLFLASH
{SPR_SHTG,0,1,A_WeaponReady,S_SGUN,0,0}, // S_SGUN
{SPR_SHTG,0,1,A_Lower,S_SGUNDOWN,0,0}, // S_SGUNDOWN
{SPR_SHTG,0,1,A_Raise,S_SGUNUP,0,0}, // S_SGUNUP
{SPR_SHTG,0,3,NULL,S_SGUN2,0,0}, // S_SGUN1
{SPR_SHTG,0,7,A_FireShotgun,S_SGUN3,0,0}, // S_SGUN2
{SPR_SHTG,1,5,NULL,S_SGUN4,0,0}, // S_SGUN3
{SPR_SHTG,2,5,NULL,S_SGUN5,0,0}, // S_SGUN4
{SPR_SHTG,3,4,NULL,S_SGUN6,0,0}, // S_SGUN5
{SPR_SHTG,2,5,NULL,S_SGUN7,0,0}, // S_SGUN6
{SPR_SHTG,1,5,NULL,S_SGUN8,0,0}, // S_SGUN7
{SPR_SHTG,0,3,NULL,S_SGUN9,0,0}, // S_SGUN8
{SPR_SHTG,0,7,A_ReFire,S_SGUN,0,0}, // S_SGUN9
{SPR_SHTF,32768,4,A_Light1,S_SGUNFLASH2,0,0}, // S_SGUNFLASH1
{SPR_SHTF,32769,3,A_Light2,S_LIGHTDONE,0,0}, // S_SGUNFLASH2
{SPR_SHT2,0,1,A_WeaponReady,S_DSGUN,0,0}, // S_DSGUN
{SPR_SHT2,0,1,A_Lower,S_DSGUNDOWN,0,0}, // S_DSGUNDOWN
{SPR_SHT2,0,1,A_Raise,S_DSGUNUP,0,0}, // S_DSGUNUP
{SPR_SHT2,0,3,NULL,S_DSGUN2,0,0}, // S_DSGUN1
{SPR_SHT2,0,7,A_FireShotgun2,S_DSGUN3,0,0}, // S_DSGUN2
{SPR_SHT2,1,7,NULL,S_DSGUN4,0,0}, // S_DSGUN3
{SPR_SHT2,2,7,A_CheckReload,S_DSGUN5,0,0}, // S_DSGUN4
{SPR_SHT2,3,7,A_OpenShotgun2,S_DSGUN6,0,0}, // S_DSGUN5
{SPR_SHT2,4,7,NULL,S_DSGUN7,0,0}, // S_DSGUN6
{SPR_SHT2,5,7,A_LoadShotgun2,S_DSGUN8,0,0}, // S_DSGUN7
{SPR_SHT2,6,6,NULL,S_DSGUN9,0,0}, // S_DSGUN8
{SPR_SHT2,7,6,A_CloseShotgun2,S_DSGUN10,0,0}, // S_DSGUN9
{SPR_SHT2,0,5,A_ReFire,S_DSGUN,0,0}, // S_DSGUN10
{SPR_SHT2,1,7,NULL,S_DSNR2,0,0}, // S_DSNR1
{SPR_SHT2,0,3,NULL,S_DSGUNDOWN,0,0}, // S_DSNR2
{SPR_SHT2,32776,5,A_Light1,S_DSGUNFLASH2,0,0}, // S_DSGUNFLASH1
{SPR_SHT2,32777,4,A_Light2,S_LIGHTDONE,0,0}, // S_DSGUNFLASH2
{SPR_CHGG,0,1,A_WeaponReady,S_CHAIN,0,0}, // S_CHAIN
{SPR_CHGG,0,1,A_Lower,S_CHAINDOWN,0,0}, // S_CHAINDOWN
{SPR_CHGG,0,1,A_Raise,S_CHAINUP,0,0}, // S_CHAINUP
{SPR_CHGG,0,4,A_FireCGun,S_CHAIN2,0,0}, // S_CHAIN1
{SPR_CHGG,1,4,A_FireCGun,S_CHAIN3,0,0}, // S_CHAIN2
{SPR_CHGG,1,0,A_ReFire,S_CHAIN,0,0}, // S_CHAIN3
{SPR_CHGF,32768,5,A_Light1,S_LIGHTDONE,0,0}, // S_CHAINFLASH1
{SPR_CHGF,32769,5,A_Light2,S_LIGHTDONE,0,0}, // S_CHAINFLASH2
{SPR_MISG,0,1,A_WeaponReady,S_MISSILE,0,0}, // S_MISSILE
{SPR_MISG,0,1,A_Lower,S_MISSILEDOWN,0,0}, // S_MISSILEDOWN
{SPR_MISG,0,1,A_Raise,S_MISSILEUP,0,0}, // S_MISSILEUP
{SPR_MISG,1,8,A_GunFlash,S_MISSILE2,0,0}, // S_MISSILE1
{SPR_MISG,1,12,A_FireMissile,S_MISSILE3,0,0}, // S_MISSILE2
{SPR_MISG,1,0,A_ReFire,S_MISSILE,0,0}, // S_MISSILE3
{SPR_MISF,32768,3,A_Light1,S_MISSILEFLASH2,0,0}, // S_MISSILEFLASH1
{SPR_MISF,32769,4,NULL,S_MISSILEFLASH3,0,0}, // S_MISSILEFLASH2
{SPR_MISF,32770,4,A_Light2,S_MISSILEFLASH4,0,0}, // S_MISSILEFLASH3
{SPR_MISF,32771,4,A_Light2,S_LIGHTDONE,0,0}, // S_MISSILEFLASH4
{SPR_SAWG,2,4,A_WeaponReady,S_SAWB,0,0}, // S_SAW
{SPR_SAWG,3,4,A_WeaponReady,S_SAW,0,0}, // S_SAWB
{SPR_SAWG,2,1,A_Lower,S_SAWDOWN,0,0}, // S_SAWDOWN
{SPR_SAWG,2,1,A_Raise,S_SAWUP,0,0}, // S_SAWUP
{SPR_SAWG,0,4,A_Saw,S_SAW2,0,0}, // S_SAW1
{SPR_SAWG,1,4,A_Saw,S_SAW3,0,0}, // S_SAW2
{SPR_SAWG,1,0,A_ReFire,S_SAW,0,0}, // S_SAW3
{SPR_PLSG,0,1,A_WeaponReady,S_PLASMA,0,0}, // S_PLASMA
{SPR_PLSG,0,1,A_Lower,S_PLASMADOWN,0,0}, // S_PLASMADOWN
{SPR_PLSG,0,1,A_Raise,S_PLASMAUP,0,0}, // S_PLASMAUP
{SPR_PLSG,0,3,A_FirePlasma,S_PLASMA2,0,0}, // S_PLASMA1
{SPR_PLSG,1,20,A_ReFire,S_PLASMA,0,0}, // S_PLASMA2
{SPR_PLSF,32768,4,A_Light1,S_LIGHTDONE,0,0}, // S_PLASMAFLASH1
{SPR_PLSF,32769,4,A_Light1,S_LIGHTDONE,0,0}, // S_PLASMAFLASH2
{SPR_BFGG,0,1,A_WeaponReady,S_BFG,0,0}, // S_BFG
{SPR_BFGG,0,1,A_Lower,S_BFGDOWN,0,0}, // S_BFGDOWN
{SPR_BFGG,0,1,A_Raise,S_BFGUP,0,0}, // S_BFGUP
{SPR_BFGG,0,20,A_BFGsound,S_BFG2,0,0}, // S_BFG1
{SPR_BFGG,1,10,A_GunFlash,S_BFG3,0,0}, // S_BFG2
{SPR_BFGG,1,10,A_FireBFG,S_BFG4,0,0}, // S_BFG3
{SPR_BFGG,1,20,A_ReFire,S_BFG,0,0}, // S_BFG4
{SPR_BFGF,32768,11,A_Light1,S_BFGFLASH2,0,0}, // S_BFGFLASH1
{SPR_BFGF,32769,6,A_Light2,S_LIGHTDONE,0,0}, // S_BFGFLASH2
{SPR_BLUD,2,8,NULL,S_BLOOD2,0,0}, // S_BLOOD1
{SPR_BLUD,1,8,NULL,S_BLOOD3,0,0}, // S_BLOOD2
{SPR_BLUD,0,8,NULL,S_NULL,0,0}, // S_BLOOD3
{SPR_PUFF,32768,4,NULL,S_PUFF2,0,0}, // S_PUFF1
{SPR_PUFF,1,4,NULL,S_PUFF3,0,0}, // S_PUFF2
{SPR_PUFF,2,4,NULL,S_PUFF4,0,0}, // S_PUFF3
{SPR_PUFF,3,4,NULL,S_NULL,0,0}, // S_PUFF4
{SPR_BAL1,32768,4,NULL,S_TBALL2,0,0}, // S_TBALL1
{SPR_BAL1,32769,4,NULL,S_TBALL1,0,0}, // S_TBALL2
{SPR_BAL1,32770,6,NULL,S_TBALLX2,0,0}, // S_TBALLX1
{SPR_BAL1,32771,6,NULL,S_TBALLX3,0,0}, // S_TBALLX2
{SPR_BAL1,32772,6,NULL,S_NULL,0,0}, // S_TBALLX3
{SPR_BAL2,32768,4,NULL,S_RBALL2,0,0}, // S_RBALL1
{SPR_BAL2,32769,4,NULL,S_RBALL1,0,0}, // S_RBALL2
{SPR_BAL2,32770,6,NULL,S_RBALLX2,0,0}, // S_RBALLX1
{SPR_BAL2,32771,6,NULL,S_RBALLX3,0,0}, // S_RBALLX2
{SPR_BAL2,32772,6,NULL,S_NULL,0,0}, // S_RBALLX3
|