d_items.cpp 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /*
  2. ===========================================================================
  3. Doom 3 BFG Edition GPL Source Code
  4. Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
  6. Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. #include "Precompiled.h"
  21. #include "globaldata.h"
  22. // We are referring to sprite numbers.
  23. #include "info.h"
  24. #ifdef __GNUG__
  25. #pragma implementation "d_items.h"
  26. #endif
  27. #include "d_items.h"
  28. //
  29. // PSPRITE ACTIONS for waepons.
  30. // This struct controls the weapon animations.
  31. //
  32. // Each entry is:
  33. // ammo/amunition type
  34. // upstate
  35. // downstate
  36. // readystate
  37. // atkstate, i.e. attack/fire/hit frame
  38. // flashstate, muzzle flash
  39. //
  40. const weaponinfo_t weaponinfo[NUMWEAPONS] =
  41. {
  42. {
  43. // fist
  44. am_noammo,
  45. S_PUNCHUP,
  46. S_PUNCHDOWN,
  47. S_PUNCH,
  48. S_PUNCH1,
  49. S_NULL
  50. },
  51. {
  52. // pistol
  53. am_clip,
  54. S_PISTOLUP,
  55. S_PISTOLDOWN,
  56. S_PISTOL,
  57. S_PISTOL1,
  58. S_PISTOLFLASH
  59. },
  60. {
  61. // shotgun
  62. am_shell,
  63. S_SGUNUP,
  64. S_SGUNDOWN,
  65. S_SGUN,
  66. S_SGUN1,
  67. S_SGUNFLASH1
  68. },
  69. {
  70. // chaingun
  71. am_clip,
  72. S_CHAINUP,
  73. S_CHAINDOWN,
  74. S_CHAIN,
  75. S_CHAIN1,
  76. S_CHAINFLASH1
  77. },
  78. {
  79. // missile launcher
  80. am_misl,
  81. S_MISSILEUP,
  82. S_MISSILEDOWN,
  83. S_MISSILE,
  84. S_MISSILE1,
  85. S_MISSILEFLASH1
  86. },
  87. {
  88. // plasma rifle
  89. am_cell,
  90. S_PLASMAUP,
  91. S_PLASMADOWN,
  92. S_PLASMA,
  93. S_PLASMA1,
  94. S_PLASMAFLASH1
  95. },
  96. {
  97. // bfg 9000
  98. am_cell,
  99. S_BFGUP,
  100. S_BFGDOWN,
  101. S_BFG,
  102. S_BFG1,
  103. S_BFGFLASH1
  104. },
  105. {
  106. // chainsaw
  107. am_noammo,
  108. S_SAWUP,
  109. S_SAWDOWN,
  110. S_SAW,
  111. S_SAW1,
  112. S_NULL
  113. },
  114. {
  115. // super shotgun
  116. am_shell,
  117. S_DSGUNUP,
  118. S_DSGUNDOWN,
  119. S_DSGUN,
  120. S_DSGUN1,
  121. S_DSGUNFLASH1
  122. },
  123. };