DEADSOFTWARE

2ddb96f9e9b67e3c48fb39821e14029a531f92a2
[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_AIR 360
50 #define PL_POWERUP_TIME 546
52 #pragma pack(1)
53 typedef struct{
54 obj_t o;
55 int looky;
56 int st,s;
57 int life,armor,hit,hito;
58 int pain,air;
59 int invl,suit;
60 char d;
61 //byte ku,kd,kl,kr,kf,kj,kwl,kwr,kp;
62 int frag,ammo,shel,rock,cell,fuel,kills,secrets;
63 byte fire,cwpn,csnd;
64 byte amul;
65 word wpns;
66 char wpn;
67 byte f;
68 byte drawst;
69 byte color;
70 int id;
71 byte keys;
72 char lives;
73 int ku,kd,kl,kr,kf,kj,kwl,kwr,kp;
74 }player_t;
75 #pragma pack()
77 extern byte plr_goanim[], plr_dieanim[], plr_slopanim[];
79 extern byte p_immortal;
80 extern player_t pl1, pl2;
82 void PL_init(void);
83 void PL_alloc(void);
84 void PL_spawn(player_t *,int,int,char);
85 int PL_hit(player_t *,int,int,int);
86 int PL_isdead(player_t *);
87 void PL_act(player_t *);
88 void PL_cry(player_t *);
89 void PL_damage(player_t *);
90 int PL_give(player_t *,int);
91 void G_respawn_player(player_t *);
93 void PL_reset(void);