DEADSOFTWARE

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