p_pspr.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. #ifndef __P_PSPR__
  34. #define __P_PSPR__
  35. /* Basic data types.
  36. * Needs fixed point, and BAM angles. */
  37. #include "m_fixed.h"
  38. #include "tables.h"
  39. /* Needs to include the precompiled sprite animation tables.
  40. *
  41. * Header generated by multigen utility.
  42. * This includes all the data for thing animation,
  43. * i.e. the Thing Atrributes table and the Frame Sequence table.
  44. */
  45. #include "info.h"
  46. /*
  47. * Frame flags:
  48. * handles maximum brightness (torches, muzzle flare, light sources)
  49. */
  50. #define FF_FULLBRIGHT 0x8000 /* flag in thing->frame */
  51. #define FF_FRAMEMASK 0x7fff
  52. /*
  53. * Overlay psprites are scaled shapes
  54. * drawn directly on the view screen,
  55. * coordinates are given for a 320*200 view screen.
  56. */
  57. typedef enum
  58. {
  59. ps_weapon,
  60. ps_flash,
  61. NUMPSPRITES
  62. } psprnum_t;
  63. typedef struct
  64. {
  65. state_t *state; /* a NULL state means not active */
  66. int tics;
  67. fixed_t sx;
  68. fixed_t sy;
  69. } pspdef_t;
  70. extern int weapon_preferences[2][NUMWEAPONS+1]; /* killough 5/2/98 */
  71. int P_WeaponPreferred(int w1, int w2);
  72. struct player_s;
  73. int P_SwitchWeapon(struct player_s *player);
  74. boolean P_CheckAmmo(struct player_s *player);
  75. void P_SetupPsprites(struct player_s *curplayer);
  76. void P_MovePsprites(struct player_s *curplayer);
  77. void P_DropWeapon(struct player_s *player);
  78. void A_Light0();
  79. void A_WeaponReady();
  80. void A_Lower();
  81. void A_Raise();
  82. void A_Punch();
  83. void A_ReFire();
  84. void A_FirePistol();
  85. void A_Light1();
  86. void A_FireShotgun();
  87. void A_Light2();
  88. void A_FireShotgun2();
  89. void A_CheckReload();
  90. void A_OpenShotgun2();
  91. void A_LoadShotgun2();
  92. void A_CloseShotgun2();
  93. void A_FireCGun();
  94. void A_GunFlash();
  95. void A_FireMissile();
  96. void A_Saw();
  97. void A_FirePlasma();
  98. void A_BFGsound();
  99. void A_FireBFG();
  100. void A_BFGSpray();
  101. #endif