p_pspr.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. #ifdef __GNUG__
  47. #pragma interface
  48. #endif
  49. /*
  50. * Frame flags:
  51. * handles maximum brightness (torches, muzzle flare, light sources)
  52. */
  53. #define FF_FULLBRIGHT 0x8000 /* flag in thing->frame */
  54. #define FF_FRAMEMASK 0x7fff
  55. /*
  56. * Overlay psprites are scaled shapes
  57. * drawn directly on the view screen,
  58. * coordinates are given for a 320*200 view screen.
  59. */
  60. typedef enum
  61. {
  62. ps_weapon,
  63. ps_flash,
  64. NUMPSPRITES
  65. } psprnum_t;
  66. typedef struct
  67. {
  68. const state_t *state; /* a NULL state means not active */
  69. int tics;
  70. fixed_t sx;
  71. fixed_t sy;
  72. } pspdef_t;
  73. extern const int weapon_preferences[NUMWEAPONS+1]; /* killough 5/2/98 */
  74. int P_WeaponPreferred(int w1, int w2);
  75. struct player_s;
  76. int P_SwitchWeapon(struct player_s *player);
  77. boolean P_CheckAmmo(struct player_s *player);
  78. void P_SetupPsprites(struct player_s *curplayer);
  79. void P_MovePsprites(struct player_s *curplayer);
  80. void P_DropWeapon(struct player_s *player);
  81. int P_WeaponCycleUp(struct player_s *player);
  82. int P_WeaponCycleDown(struct player_s *player);
  83. void A_Light0();
  84. void A_WeaponReady();
  85. void A_Lower();
  86. void A_Raise();
  87. void A_Punch();
  88. void A_ReFire();
  89. void A_FirePistol();
  90. void A_Light1();
  91. void A_FireShotgun();
  92. void A_Light2();
  93. void A_FireShotgun2();
  94. void A_CheckReload();
  95. void A_OpenShotgun2();
  96. void A_LoadShotgun2();
  97. void A_CloseShotgun2();
  98. void A_FireCGun();
  99. void A_GunFlash();
  100. void A_FireMissile();
  101. void A_Saw();
  102. void A_FirePlasma();
  103. void A_BFGsound();
  104. void A_FireBFG();
  105. void A_BFGSpray();
  106. #endif