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