DEADSOFTWARE

48c49abd25f7d7b88b53e79b34f9488f8419e6b2
[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
28 #include <stdio.h> // FILE
30 #define PL_DRAWLIFE 1
31 #define PL_DRAWARMOR 2
32 #define PL_DRAWWPN 4
33 #define PL_DRAWFRAG 8
34 #define PL_DRAWAIR 16
35 #define PL_DRAWKEYS 32
36 #define PL_DRAWLIVES 64
38 #define PLK_U 1
39 #define PLK_D 2
40 #define PLK_L 4
41 #define PLK_R 8
42 #define PLK_F 16
43 #define PLK_J 32
44 #define PLK_P 64
45 #define PLK_W 128
46 #define PLK_WL 1
47 #define PLK_WR 2
49 #define PLF_FIRE 1
50 #define PLF_PNSND 2
51 #define PLF_UP 4
52 #define PLF_DOWN 8
54 #define PL_AIR 360
55 #define PL_POWERUP_TIME 546
57 typedef struct {
58 obj_t o;
59 int looky;
60 int st, s;
61 int life, armor, hit, hito;
62 int pain, air;
63 int invl, suit;
64 char d;
65 int frag, ammo, shel, rock, cell, fuel, kills, secrets;
66 byte fire, cwpn, csnd;
67 byte amul;
68 word wpns;
69 char wpn;
70 byte f;
71 byte drawst;
72 byte color;
73 int id;
74 byte keys;
75 char lives;
76 int ku, kd, kl, kr, kf, kj, kwl, kwr, kp;
77 } player_t;
79 extern byte p_immortal;
80 extern byte p_fly;
81 extern int PL_JUMP;
82 extern int PL_RUN;
84 extern player_t pl1;
85 extern player_t pl2;
87 extern byte plr_goanim[];
88 extern byte plr_dieanim[];
89 extern byte plr_slopanim[];
91 void PL_savegame (FILE *h);
92 void PL_loadgame (FILE *h);
93 int PL_isdead (player_t *p);
94 void PL_init (void);
95 void PL_alloc (void);
96 void PL_reset (void);
97 void PL_spawn (player_t *p, int x, int y, char d);
98 int PL_hit (player_t *p, int d, int o, int t);
99 void PL_damage (player_t *p);
100 void PL_cry (player_t *p);
101 int PL_give (player_t *p, int t);
102 void PL_act (player_t *p);
103 void bfg_fly (int x, int y, int o);
105 #endif /* PLAYER_H_INCLUDED */