DEADSOFTWARE

headers describes that c-files implements
[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 #pragma pack(1)
58 typedef struct {
59 obj_t o;
60 int looky;
61 int st, s;
62 int life, armor, hit, hito;
63 int pain, air;
64 int invl, suit;
65 char d;
66 int frag, ammo, shel, rock, cell, fuel, kills, secrets;
67 byte fire, cwpn, csnd;
68 byte amul;
69 word wpns;
70 char wpn;
71 byte f;
72 byte drawst;
73 byte color;
74 int id;
75 byte keys;
76 char lives;
77 int ku, kd, kl, kr, kf, kj, kwl, kwr, kp;
78 } player_t;
79 #pragma pack()
81 extern byte p_immortal;
82 extern byte p_fly;
83 extern int PL_JUMP;
84 extern int PL_RUN;
86 extern player_t pl1;
87 extern player_t pl2;
89 extern byte plr_goanim[];
90 extern byte plr_dieanim[];
91 extern byte plr_slopanim[];
93 void PL_savegame (FILE *h);
94 void PL_loadgame (FILE *h);
95 int PL_isdead (player_t *p);
96 void PL_init (void);
97 void PL_alloc (void);
98 void PL_reset (void);
99 void PL_spawn (player_t *p, int x, int y, char d);
100 int PL_hit (player_t *p, int d, int o, int t);
101 void PL_damage (player_t *p);
102 void PL_cry (player_t *p);
103 int PL_give (player_t *p, int t);
104 void PL_act (player_t *p);
105 void bfg_fly (int x, int y, int o);
107 #endif /* PLAYER_H_INCLUDED */