1 /* Emacs style mode select -*- C++ -*- 2 *----------------------------------------------------------------------------- 3 * 4 * 5 * PrBoom: a Doom port merged with LxDoom and LSDLDoom 6 * based on BOOM, a modified and improved DOOM engine 7 * Copyright (C) 1999 by 8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman 9 * Copyright (C) 1999-2000 by 10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze 11 * Copyright 2005, 2006 by 12 * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko 13 * 14 * This program is free software; you can redistribute it and/or 15 * modify it under the terms of the GNU General Public License 16 * as published by the Free Software Foundation; either version 2 17 * of the License, or (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU General Public License 25 * along with this program; if not, write to the Free Software 26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 27 * 02111-1307, USA. 28 * 29 * DESCRIPTION: 30 * Sprite animation. 31 * 32 *-----------------------------------------------------------------------------*/ 33 34 #ifndef __P_PSPR__ 35 #define __P_PSPR__ 36 37 /* Basic data types. 38 * Needs fixed point, and BAM angles. */ 39 40 #include "m_fixed.h" 41 #include "tables.h" 42 43 /* Needs to include the precompiled sprite animation tables. 44 * 45 * Header generated by multigen utility. 46 * This includes all the data for thing animation, 47 * i.e. the Thing Atrributes table and the Frame Sequence table. 48 */ 49 50 #include "info.h" 51 52 /* 53 * Frame flags: 54 * handles maximum brightness (torches, muzzle flare, light sources) 55 */ 56 57 #define FF_FULLBRIGHT 0x8000 /* flag in thing->frame */ 58 #define FF_FRAMEMASK 0x7fff 59 60 /* 61 * Overlay psprites are scaled shapes 62 * drawn directly on the view screen, 63 * coordinates are given for a 320*200 view screen. 64 */ 65 66 typedef enum 67 { 68 ps_weapon, 69 ps_flash, 70 NUMPSPRITES 71 } psprnum_t; 72 73 typedef struct 74 { 75 state_t *state; /* a NULL state means not active */ 76 int tics; 77 fixed_t sx; 78 fixed_t sy; 79 } pspdef_t; 80 81 extern int weapon_preferences[2][NUMWEAPONS+1]; /* killough 5/2/98 */ 82 int P_WeaponPreferred(int w1, int w2); 83 84 struct player_s; 85 int P_SwitchWeapon(struct player_s *player); 86 int P_GetAmmoLevel(struct player_s *player, weapontype_t weapon); 87 dbool P_CheckAmmo(struct player_s *player); 88 void P_SetupPsprites(struct player_s *curplayer); 89 void P_MovePsprites(struct player_s *curplayer); 90 void P_DropWeapon(struct player_s *player); 91 92 void A_Light0(); 93 void A_WeaponReady(); 94 void A_Lower(); 95 void A_Raise(); 96 void A_Punch(); 97 void A_ReFire(); 98 void A_FirePistol(); 99 void A_Light1(); 100 void A_FireShotgun(); 101 void A_Light2(); 102 void A_FireShotgun2(); 103 void A_CheckReload(); 104 void A_OpenShotgun2(); 105 void A_LoadShotgun2(); 106 void A_CloseShotgun2(); 107 void A_FireCGun(); 108 void A_GunFlash(); 109 void A_FireMissile(); 110 void A_Saw(); 111 void A_FirePlasma(); 112 void A_BFGsound(); 113 void A_FireBFG(); 114 void A_BFGSpray(); 115 void A_FireOldBFG(); 116 117 #endif 118