DEADSOFTWARE

e56357c961764f21f3eaeb0a18b380cc904070e2
[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 // Player data and functions
25 #define PL_DRAWLIFE 1
26 #define PL_DRAWARMOR 2
27 #define PL_DRAWWPN 4
28 #define PL_DRAWFRAG 8
29 #define PL_DRAWAIR 16
30 #define PL_DRAWKEYS 32
31 #define PL_DRAWLIVES 64
33 #define PLK_U 1
34 #define PLK_D 2
35 #define PLK_L 4
36 #define PLK_R 8
37 #define PLK_F 16
38 #define PLK_J 32
39 #define PLK_P 64
40 #define PLK_W 128
41 #define PLK_WL 1
42 #define PLK_WR 2
44 #define PLF_FIRE 1
45 #define PLF_PNSND 2
46 #define PLF_UP 4
47 #define PLF_DOWN 8
49 #define PL_POWERUP_TIME 546
51 #pragma pack(1)
52 typedef struct{
53 obj_t o;
54 int looky;
55 int st,s;
56 int life,armor,hit,hito;
57 int pain,air;
58 int invl,suit;
59 char d;
60 //byte ku,kd,kl,kr,kf,kj,kwl,kwr,kp;
61 int frag,ammo,shel,rock,cell,fuel,kills,secrets;
62 byte fire,cwpn,csnd;
63 byte amul;
64 word wpns;
65 char wpn;
66 byte f;
67 byte drawst;
68 byte color;
69 int id;
70 byte keys;
71 char lives;
72 int ku,kd,kl,kr,kf,kj,kwl,kwr,kp;
73 }player_t;
74 #pragma pack()
76 void PL_init(void);
77 void PL_alloc(void);
78 void PL_spawn(player_t *,int,int,char);
79 int PL_hit(player_t *,int,int,int);
80 int PL_isdead(player_t *);
81 void PL_act(player_t *);
82 void PL_draw(player_t *);
83 void PL_drawst(player_t *);
84 void PL_cry(player_t *);
85 void PL_damage(player_t *);
86 int PL_give(player_t *,int);
87 void G_respawn_player(player_t *);
89 void PL_reset(void);
90 void *PL_getspr(int c,int d);
92 extern byte p_immortal;
93 extern player_t pl1,pl2;