DEADSOFTWARE

menu: remove data field from menu_t
[flatwaifu.git] / src / player.h
1 /*
2 Copyright (C) Prikol Software 1996-1997
3 Copyright (C) Aleksey Volynskov 1996-1997
4 Copyright (C) <ARembo@gmail.com> 2011
6 This file is part of the Doom2D:Rembo project.
8 Doom2D:Rembo is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 2 as
10 published by the Free Software Foundation.
12 Doom2D:Rembo is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, see <http://www.gnu.org/licenses/> or
19 write to the Free Software Foundation, Inc.,
20 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
23 #ifndef PLAYER_H_INCLUDED
24 #define PLAYER_H_INCLUDED
26 #include "glob.h"
27 #include "view.h" // obj_t
29 #define PL_DRAWLIFE 1
30 #define PL_DRAWARMOR 2
31 #define PL_DRAWWPN 4
32 #define PL_DRAWFRAG 8
33 #define PL_DRAWAIR 16
34 #define PL_DRAWKEYS 32
35 #define PL_DRAWLIVES 64
37 #define PLK_U 1
38 #define PLK_D 2
39 #define PLK_L 4
40 #define PLK_R 8
41 #define PLK_F 16
42 #define PLK_J 32
43 #define PLK_P 64
44 #define PLK_W 128
45 #define PLK_WL 1
46 #define PLK_WR 2
48 #define PLF_FIRE 1
49 #define PLF_PNSND 2
50 #define PLF_UP 4
51 #define PLF_DOWN 8
53 #define PL_AIR 360
54 #define PL_POWERUP_TIME 546
56 typedef struct {
57 obj_t o;
58 int looky;
59 int st, s;
60 int life, armor, hit, hito;
61 int pain, air;
62 int invl, suit;
63 char d;
64 int frag, ammo, shel, rock, cell, fuel, kills, secrets;
65 byte fire, cwpn, csnd;
66 byte amul;
67 word wpns;
68 char wpn;
69 byte f;
70 byte drawst;
71 byte color;
72 int id;
73 byte keys;
74 char lives;
75 int ku, kd, kl, kr, kf, kj, kwl, kwr, kp;
76 } player_t;
78 extern byte p_immortal;
79 extern byte p_fly;
80 extern int PL_JUMP;
81 extern int PL_RUN;
83 extern player_t pl1;
84 extern player_t pl2;
86 extern byte plr_goanim[];
87 extern byte plr_dieanim[];
88 extern byte plr_slopanim[];
90 int PL_isdead (player_t *p);
91 void PL_init (void);
92 void PL_alloc (void);
93 void PL_reset (void);
94 void PL_spawn (player_t *p, int x, int y, char d);
95 int PL_hit (player_t *p, int d, int o, int t);
96 void PL_damage (player_t *p);
97 void PL_cry (player_t *p);
98 int PL_give (player_t *p, int t);
99 void PL_act (player_t *p);
100 void bfg_fly (int x, int y, int o);
102 #endif /* PLAYER_H_INCLUDED */