1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
6 // Copyright (C) 1993-1996 by id Software, Inc.
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
20 //-----------------------------------------------------------------------------
27 // The player data structure depends on a number
28 // of other structs: items (internal inventory),
29 // animation states (closely tied to the sprites
30 // used to represent them, unfortunately).
34 // In addition, the player is just a special
35 // case of the generic moving object/actor.
38 // Finally, for odd reasons, the player input
39 // is buffered within the player data struct,
40 // as commands per game tick.
49 // Playing or camping.
51 // Dead on the ground, view follows killer.
53 // Ready to restart/respawn???
60 // Player internal flags, for cheats and debug.
64 // No clipping, walk through barriers.
66 // No damage, no health loss.
68 // Not really a cheat, just a debug aid.
75 // Extended player object info: player_t
77 typedef struct player_s
80 playerstate_t playerstate;
84 // including viewpoint bobbing during movement.
85 // Focal origin above r.z
87 // Base height above floor for viewz.
90 fixed_t deltaviewheight;
91 // bounded/scaled total momentum.
94 // This is only used between levels,
95 // mo->health is used during levels.
101 // Power ups. invinc and invis are tic counters.
102 int powers[NUMPOWERS];
103 boolean cards[NUMCARDS];
106 // Frags, kills of other players.
107 int frags[MAXPLAYERS];
108 weapontype_t readyweapon;
110 // Is wp_nochange if not changing.
111 weapontype_t pendingweapon;
113 boolean weaponowned[NUMWEAPONS];
115 int maxammo[NUMAMMO];
117 // True if button down last tic.
121 // Bit flags, for cheats and debug.
122 // See cheat_t, above.
125 // Refired shots are less accurate.
128 // For intermission stats.
136 // For screen flashing (red or bright).
140 // Who did damage (NULL for floors/ceilings).
143 // So gun flashes light up areas.
146 // Current PLAYPAL, ???
147 // can be set to REDCOLORMAP for pain, etc.
150 // Player skin colorshift,
151 // 0-3 for which color to draw player.
154 // Overlay view sprites (gun, etc).
155 pspdef_t psprites[NUMPSPRITES];
157 // True if secret level has been done.
165 // Structure passed e.g. to WI_Start(wb)
169 boolean in; // whether the player is in game
171 // Player stats, kills, collected items etc.
177 int score; // current score on entry, modified on return
183 int epsd; // episode # (0-2)
185 // if true, splash the secret level
188 // previous and next levels, origin 0
200 // index of this player in game
203 wbplayerstruct_t plyr[MAXPLAYERS];
209 //-----------------------------------------------------------------------------
213 //-----------------------------------------------------------------------------