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
42 extern int hit_xv
,hit_yv
;
51 #define PL_AQUA_AIR 1091
53 byte p_immortal
=0,p_fly
=0;
55 int PL_JUMP
=10,PL_RUN
=8;
57 int wp_it
[11]={0,I_CSAW
,0,I_SGUN
,I_SGUN2
,I_MGUN
,I_LAUN
,I_PLAS
,I_BFG
,I_GUN2
,0};
59 enum{STAND
,GO
,DIE
,SLOP
,DEAD
,MESS
,OUT
,FALL
};
61 typedef void fire_f(int,int,int,int,int);
65 static void *aisnd
[3];
66 static void *pdsnd
[5];
68 static void *spr
[27*2],*snd
[11];
69 static char sprd
[27*2];
70 static void *wpn
[11][6];
71 static byte goanim
[]="BDACDA",
72 dieanim
[]="HHHHIIIIJJJJKKKKLLLLMMMM",
73 slopanim
[]="OOPPQQRRSSTTUUVVWW";
78 int ku
,kd
,kl
,kr
,kf
,kj
,kwl
,kwr
,kp
;
82 void PL_savegame(FILE* h
) {
83 myfwrite(&pl1
,1,sizeof(pl1
)-sizeof(_keys
),h
);//myfwrite(&pl1,1,sizeof(pl1),h);
84 if(_2pl
) myfwrite(&pl2
,1,sizeof(pl2
)-sizeof(_keys
),h
);//myfwrite(&pl2,1,sizeof(pl2),h);
85 myfwrite(&PL_JUMP
,1,4,h
);myfwrite(&PL_RUN
,1,4,h
);myfwrite(&p_immortal
,1,1,h
);
88 void PL_loadgame(FILE* h
) {
89 myfread(&pl1
,1,sizeof(pl1
)-sizeof(_keys
),h
);//myfread(&pl1,1,sizeof(pl1),h);
90 if(_2pl
) myfread(&pl2
,1,sizeof(pl2
)-sizeof(_keys
),h
);//myfread(&pl2,1,sizeof(pl2),h);
91 myfread(&PL_JUMP
,1,4,h
);myfread(&PL_RUN
,1,4,h
);myfread(&p_immortal
,1,1,h
);
94 static int nonz(int a
) {return (a
)?a
:1;}
96 static int firediry(player_t
*p
) {
97 if(p
->f
&PLF_UP
) return -42;
98 if(p
->f
&PLF_DOWN
) return 19;
102 static void fire(player_t
*p
) {
103 static fire_f
*ff
[11]={
104 WP_pistol
,WP_pistol
,WP_pistol
,WP_shotgun
,WP_dshotgun
,
105 WP_mgun
,WP_rocket
,WP_plasma
,WP_bfgshot
,WP_shotgun
,WP_pistol
};
106 static int ft
[11]={5,2,6,18,36,2,12,2,0,2,1};
111 if(keys
[p
->kf
] && p
->cell
>=40)
112 {Z_sound(snd
[5],128);p
->fire
=21;p
->cell
-=40;p
->drawst
|=PL_DRAWWPN
;return;}
114 if(p
->fire
==1) p
->cwpn
=12;
116 }else if(p
->wpn
==1) {
118 if(!keys
[p
->kf
]) {Z_sound(snd
[7],128);p
->csnd
=13;return;}
120 if(keys
[p
->kf
] && !p
->fire
) {
122 WP_chainsaw(p
->o
.x
+((p
->d
)?4:-4),p
->o
.y
,(g_dm
)?9:3,p
->id
);
123 if(!p
->csnd
) {Z_sound(snd
[8],128);p
->csnd
=29;}
125 }else if(p
->fire
) return;
126 if(keys
[p
->kf
] || p
->wpn
==8) {
130 --p
->ammo
;p
->drawst
|=PL_DRAWWPN
;break;
133 --p
->shel
;p
->drawst
|=PL_DRAWWPN
;break;
135 if(p
->shel
<2) return;
136 p
->shel
-=2;p
->drawst
|=PL_DRAWWPN
;break;
139 --p
->rock
;p
->drawst
|=PL_DRAWWPN
;break;
142 --p
->cell
;p
->drawst
|=PL_DRAWWPN
;break;
145 --p
->fuel
;p
->drawst
|=PL_DRAWWPN
;break;
148 WP_ognemet(p
->o
.x
,p
->o
.y
-15,p
->o
.x
+((p
->d
)?30:-30),p
->o
.y
-15+firediry(p
),
149 p
->o
.xv
+p
->o
.vx
,p
->o
.yv
+p
->o
.vy
,p
->id
);
150 else if(p
->wpn
>=1) ff
[p
->wpn
] (p
->o
.x
,p
->o
.y
-15,p
->o
.x
+((p
->d
)?30:-30),
151 p
->o
.y
-15+firediry(p
),p
->id
);
152 else WP_punch(p
->o
.x
+((p
->d
)?4:-4),p
->o
.y
,3,p
->id
);
154 if(p
->wpn
>=2) p
->f
|=PLF_FIRE
;
158 static void chgwpn(player_t
*p
) {
160 if(p
->fire
&& p
->wpn
!=1) return;
162 do{ if(--p
->wpn
<0) p
->wpn
=10; }while(!(p
->wpns
&(1<<p
->wpn
)));
164 }else if(keys
[p
->kwr
]) {
165 do{ if(++p
->wpn
>10) p
->wpn
=0; }while(!(p
->wpns
&(1<<p
->wpn
)));
169 p
->drawst
|=PL_DRAWWPN
;p
->fire
=0;
170 if(p
->wpn
==1) Z_sound(snd
[6],128);
174 static void jump(player_t
*p
,int st
) {
175 if(Z_canbreathe(p
->o
.x
,p
->o
.y
,p
->o
.r
,p
->o
.h
)) {
176 if(p
->air
<PL_AIR
) {p
->air
=PL_AIR
;p
->drawst
|=PL_DRAWAIR
;}
180 PL_hit(p
,10,-3,HIT_WATER
);
181 }else if((p
->air
&31)==0) {
182 FX_bubble(p
->o
.x
,p
->o
.y
-20,0,0,5);
184 p
->drawst
|=PL_DRAWAIR
;
190 if(Z_canstand(p
->o
.x
,p
->o
.y
,p
->o
.r
)) p
->o
.yv
=-PL_JUMP
;
191 else if(st
&Z_INWATER
) p
->o
.yv
=-PL_SWUP
;
196 int PL_isdead(player_t
*p
) {
198 case DEAD
: case MESS
:
211 void PL_alloc(void) {
213 static char nm
[][6]={
229 spr
[i
*2]=Z_getspr("PLAY",i
,1,sprd
+i
*2);
230 spr
[i
*2+1]=Z_getspr("PLAY",i
,2,sprd
+i
*2+1);
234 s
[3]=((i
<10)?'0':('A'-10))+i
;
235 for(j
=0;j
<6;++j
) wpn
[i
][j
]=Z_getspr(s
,j
,1,NULL
);
237 for(i
=0;i
<11;++i
) snd
[i
]=Z_getsnd(nm
[i
]);
241 aisnd
[i
]=Z_getsnd(s
);
243 memcpy(s
,"PLDTHx",6);
246 pdsnd
[i
]=Z_getsnd(s
);
250 void PL_restore(player_t
*p
) {
251 p
->o
.xv
=p
->o
.yv
=p
->o
.vx
=p
->o
.vy
=0;
252 p
->o
.r
=PL_RAD
;p
->o
.h
=PL_HT
;
256 case DEAD
: case MESS
: case OUT
:
257 case DIE
: case SLOP
: case FALL
:
258 p
->life
=100;p
->armor
=0;p
->air
=PL_AIR
;
261 p
->ammo
=50;p
->fuel
=p
->shel
=p
->rock
=p
->cell
=0;
265 p
->fire
=p
->cwpn
=p
->csnd
=0;
269 p
->keys
=(g_dm
)?0x70:0;
272 void PL_reset(void) {
277 void PL_spawn(player_t
*p
,int x
,int y
,char d
) {
279 p
->o
.x
=x
;p
->o
.y
=y
;p
->d
=d
;
280 p
->kills
=p
->secrets
=0;
283 int PL_hit(player_t
*p
,int d
,int o
,int t
) {
287 case DEAD
: case MESS
:
291 if(t
==HIT_TRAP
) {if(!p_immortal
) {p
->armor
=0;p
->life
=-100;}}
292 else if(t
!=HIT_ROCKET
&& t
!=HIT_ELECTRO
) {
293 if(p
->id
==-1) {if(o
==-1) return 0;}
294 else if(o
==-2) return 0;
296 if(t
!=HIT_WATER
&& t
!=HIT_ELECTRO
)
297 DOT_blood(p
->o
.x
,p
->o
.y
-15,hit_xv
,hit_yv
,d
*2);
298 else if(t
==HIT_WATER
) FX_bubble(p
->o
.x
,p
->o
.y
-20,0,0,d
/2);
299 if(p_immortal
|| p
->invl
) return 1;
305 void PL_damage(player_t
*p
) {
308 if(!p
->hit
&& p
->life
>0) return;
311 case DEAD
: case MESS
:
315 i
=p
->hit
*p
->life
/nonz(p
->armor
*3/4+p
->life
);
317 p
->drawst
|=PL_DRAWLIFE
|PL_DRAWARMOR
;
318 if((p
->armor
-=p
->hit
-i
)<0) {p
->life
+=p
->armor
;p
->armor
=0;}
319 if((p
->life
-=i
)<=0) {
320 if(p
->life
>-30) {p
->st
=DIE
;p
->s
=0;Z_sound(pdsnd
[rand()%5
],128);}
321 else {p
->st
=SLOP
;p
->s
=0;Z_sound(snd
[3],128);}
322 if(p
->amul
>1) IT_spawn(p
->o
.x
,p
->o
.y
,I_BPACK
);
324 if(p
->keys
&16) IT_spawn(p
->o
.x
,p
->o
.y
,I_KEYR
);
325 if(p
->keys
&32) IT_spawn(p
->o
.x
,p
->o
.y
,I_KEYG
);
326 if(p
->keys
&64) IT_spawn(p
->o
.x
,p
->o
.y
,I_KEYB
);
328 for(i
=1,p
->wpns
>>=1;i
<11;++i
,p
->wpns
>>=1)
329 if(i
!=2) if(p
->wpns
&1) IT_spawn(p
->o
.x
,p
->o
.y
,wp_it
[i
]);
332 p
->drawst
|=PL_DRAWWPN
;
335 if(p
->hito
==-2) {++pl2
.kills
;++pl2
.frag
;}
336 else if(p
->hito
==-1) --pl1
.frag
;
338 if(p
->hito
==-1) {++pl1
.kills
;++pl1
.frag
;}
339 else if(p
->hito
==-2) --pl2
.frag
;
341 pl1
.drawst
|=PL_DRAWFRAG
;
342 if(_2pl
) pl2
.drawst
|=PL_DRAWFRAG
;
349 void PL_cry(player_t
*p
) {
350 Z_sound(snd
[(p
->pain
>20)?1:0],128);
354 int PL_give(player_t
*p
,int t
) {
359 case DEAD
: case MESS
: case OUT
:
363 case I_STIM
: case I_MEDI
:
364 if(p
->life
>=100) return 0;
365 if((p
->life
+=((t
==I_MEDI
)?25:10))>100) p
->life
=100;
366 p
->drawst
|=PL_DRAWLIFE
;return 1;
368 if(p
->ammo
>=200*p
->amul
) return 0;
369 if((p
->ammo
+=10)>200*p
->amul
) p
->ammo
=200*p
->amul
;
370 p
->drawst
|=PL_DRAWWPN
;return 1;
372 if(p
->ammo
>=200*p
->amul
) return 0;
373 if((p
->ammo
+=50)>200*p
->amul
) p
->ammo
=200*p
->amul
;
374 p
->drawst
|=PL_DRAWWPN
;return 1;
376 if(p
->shel
>=50*p
->amul
) return 0;
377 if((p
->shel
+=4)>50*p
->amul
) p
->shel
=50*p
->amul
;
378 p
->drawst
|=PL_DRAWWPN
;return 1;
380 if(p
->shel
>=50*p
->amul
) return 0;
381 if((p
->shel
+=25)>50*p
->amul
) p
->shel
=50*p
->amul
;
382 p
->drawst
|=PL_DRAWWPN
;return 1;
384 if(p
->rock
>=50*p
->amul
) return 0;
385 if((++p
->rock
)>50*p
->amul
) p
->rock
=50*p
->amul
;
386 p
->drawst
|=PL_DRAWWPN
;return 1;
388 if(p
->rock
>=50*p
->amul
) return 0;
389 if((p
->rock
+=5)>50*p
->amul
) p
->rock
=50*p
->amul
;
390 p
->drawst
|=PL_DRAWWPN
;return 1;
392 if(p
->cell
>=300*p
->amul
) return 0;
393 if((p
->cell
+=40)>300*p
->amul
) p
->cell
=300*p
->amul
;
394 p
->drawst
|=PL_DRAWWPN
;return 1;
396 if(p
->cell
>=300*p
->amul
) return 0;
397 if((p
->cell
+=100)>300*p
->amul
) p
->cell
=300*p
->amul
;
398 p
->drawst
|=PL_DRAWWPN
;return 1;
400 if(p
->amul
==1) {p
->amul
=2;i
=1;} else i
=0;
401 i
|=PL_give(p
,I_CLIP
);
402 i
|=PL_give(p
,I_SHEL
);
403 i
|=PL_give(p
,I_ROCKET
);
404 i
|=PL_give(p
,I_CELL
);
407 if(!(p
->wpns
&2)) {p
->wpns
|=2;p
->drawst
|=PL_DRAWWPN
;return 1;}
411 if(!(p
->wpns
&512)) {p
->wpns
|=512;i
=1;}
412 p
->drawst
|=PL_DRAWWPN
;return i
;
415 if(!(p
->wpns
&8)) {p
->wpns
|=8;i
=1;}
416 p
->drawst
|=PL_DRAWWPN
;return i
;
419 if(!(p
->wpns
&16)) {p
->wpns
|=16;i
=1;}
420 p
->drawst
|=PL_DRAWWPN
;return i
;
423 if(!(p
->wpns
&32)) {p
->wpns
|=32;i
=1;}
424 p
->drawst
|=PL_DRAWWPN
;return i
;
426 i
=PL_give(p
,I_ROCKET
);
427 i
|=PL_give(p
,I_ROCKET
);
428 if(!(p
->wpns
&64)) {p
->wpns
|=64;i
=1;}
429 p
->drawst
|=PL_DRAWWPN
;return i
;
432 if(!(p
->wpns
&128)) {p
->wpns
|=128;i
=1;}
433 p
->drawst
|=PL_DRAWWPN
;return i
;
436 if(!(p
->wpns
&256)) {p
->wpns
|=256;i
=1;}
437 p
->drawst
|=PL_DRAWWPN
;return i
;
439 if(p
->armor
>=100) return 0;
440 p
->armor
=100;p
->drawst
|=PL_DRAWARMOR
;return 1;
442 if(p
->armor
>=200) return 0;
443 p
->armor
=200;p
->drawst
|=PL_DRAWARMOR
;return 1;
446 if(p
->life
<200) {p
->life
=200;p
->drawst
|=PL_DRAWLIFE
;i
=1;}
447 if(p
->armor
<200) {p
->armor
=200;p
->drawst
|=PL_DRAWARMOR
;i
=1;}
450 if(p
->life
<200) {p
->life
=min(p
->life
+100,200);p
->drawst
|=PL_DRAWLIFE
;return 1;}
453 p
->invl
=PL_POWERUP_TIME
;
456 p
->suit
=PL_POWERUP_TIME
;
459 if(p
->air
>= PL_AQUA_AIR
) return 0;
460 p
->air
=PL_AQUA_AIR
;p
->drawst
|=PL_DRAWAIR
;
463 if(p
->keys
&16) return 0;
464 p
->keys
|=16;p
->drawst
|=PL_DRAWKEYS
;return 1;
466 if(p
->keys
&32) return 0;
467 p
->keys
|=32;p
->drawst
|=PL_DRAWKEYS
;return 1;
469 if(p
->keys
&64) return 0;
470 p
->keys
|=64;p
->drawst
|=PL_DRAWKEYS
;return 1;
476 void PL_act(player_t
*p
) {
479 if(--aitime
<0) aitime
=0;
480 SW_press(p
->o
.x
,p
->o
.y
,p
->o
.r
,p
->o
.h
,4|p
->keys
,p
->id
);
481 if(!p
->suit
) if((g_time
&15)==0)
482 PL_hit(p
,Z_getacid(p
->o
.x
,p
->o
.y
,p
->o
.r
,p
->o
.h
),-3,HIT_SOME
);
483 if(p
->st
!=FALL
&& p
->st
!=OUT
) {
484 if(((st
=Z_moveobj(&p
->o
))&Z_FALLOUT
) && p
->o
.y
>=FLDH
*CELH
+50) {
486 case DEAD
: case MESS
: case DIE
: case SLOP
:
489 p
->s
=Z_sound(snd
[10],128);
494 if(st
&Z_HITWATER
) Z_splash(&p
->o
,PL_RAD
+PL_HT
);
495 if(p
->f
&PLF_FIRE
) if(p
->fire
!=2) p
->f
-=PLF_FIRE
;
496 if(keys
[p
->ku
]) {p
->f
|=PLF_UP
;p
->looky
-=5;}
500 {p
->f
|=PLF_DOWN
;p
->looky
+=5;}
501 else {p
->f
&=0xFFFF-PLF_DOWN
;p
->looky
=Z_dec(p
->looky
,5);}
503 if(keys
[p
->kp
]) SW_press(p
->o
.x
,p
->o
.y
,p
->o
.r
,p
->o
.h
,1|p
->keys
,p
->id
);
504 if(p
->fire
) --p
->fire
;
505 if(p
->cwpn
) --p
->cwpn
;
506 if(p
->csnd
) --p
->csnd
;
507 if(p
->invl
) --p
->invl
;
508 if(p
->suit
) --p
->suit
;
512 if(!dieanim
[++p
->s
]) {p
->st
=DEAD
;MN_killedp();}
513 p
->o
.xv
=Z_dec(p
->o
.xv
,1);
517 if(!slopanim
[++p
->s
]) {p
->st
=MESS
;MN_killedp();}
518 p
->o
.xv
=Z_dec(p
->o
.xv
,1);
521 chgwpn(p
);fire(p
);jump(p
,st
);
523 SMK_gas(p
->o
.x
,p
->o
.y
-2,2,3,p
->o
.xv
+p
->o
.vx
,p
->o
.yv
+p
->o
.vy
,128);
524 if((p
->s
+=abs(p
->o
.xv
)/2) >= 24) p
->s
%=24;
525 if(!keys
[p
->kl
] && !keys
[p
->kr
]) {
526 if(p
->o
.xv
) p
->o
.xv
=Z_dec(p
->o
.xv
,1);
530 if(p
->o
.xv
<PL_RUN
&& keys
[p
->kr
]) {p
->o
.xv
+=PL_RUN
>>3;p
->d
=1;}
532 SMK_gas(p
->o
.x
,p
->o
.y
-2,2,3,p
->o
.xv
+p
->o
.vx
,p
->o
.yv
+p
->o
.vy
,32);
533 if(p
->o
.xv
>-PL_RUN
&& keys
[p
->kl
]) {p
->o
.xv
-=PL_RUN
>>3;p
->d
=0;}
535 SMK_gas(p
->o
.x
,p
->o
.y
-2,2,3,p
->o
.xv
+p
->o
.vx
,p
->o
.yv
+p
->o
.vy
,32);
538 chgwpn(p
);fire(p
);jump(p
,st
);
540 SMK_gas(p
->o
.x
,p
->o
.y
-2,2,3,p
->o
.xv
+p
->o
.vx
,p
->o
.yv
+p
->o
.vy
,128);
541 if(keys
[p
->kl
]) {p
->st
=GO
;p
->s
=0;p
->d
=0;}
542 else if(keys
[p
->kr
]) {p
->st
=GO
;p
->s
=0;p
->d
=1;}
547 p
->o
.xv
=Z_dec(p
->o
.xv
,1);
548 if(keys
[p
->ku
] || keys
[p
->kd
] || keys
[p
->kl
] || keys
[p
->kr
] ||
549 keys
[p
->kf
] || keys
[p
->kj
] || keys
[p
->kp
] || keys
[p
->kwl
] || keys
[p
->kwr
]) {
550 if(p
->st
!=OUT
) MN_spawn_deadpl(&p
->o
,p
->color
,(p
->st
==MESS
)?1:0);
552 if(g_dm
) {G_respawn_player(p
);break;}
554 if(--p
->lives
==0) {G_start();break;}
555 else{p
->o
.x
=dm_pos
[0].x
;p
->o
.y
=dm_pos
[0].y
;p
->d
=dm_pos
[0].d
;}
556 p
->drawst
|=PL_DRAWLIVES
;
559 {p
->o
.x
=dm_pos
[0].x
;p
->o
.y
=dm_pos
[0].y
;p
->d
=dm_pos
[0].d
;}
560 else {p
->o
.x
=dm_pos
[1].x
;p
->o
.y
=dm_pos
[1].y
;p
->d
=dm_pos
[1].d
;}
563 if(--p
->s
<=0) p
->st
=OUT
;
568 static int standspr(player_t
*p
) {
569 if(p
->f
&PLF_UP
) return 'X';
570 if(p
->f
&PLF_DOWN
) return 'Z';
574 static int wpnspr(player_t
*p
) {
575 if(p
->f
&PLF_UP
) return 'C';
576 if(p
->f
&PLF_DOWN
) return 'E';
580 void PL_draw(player_t
*p
) {
582 static int wytab
[]={-1,-2,-1,0};
587 if(p
->f
&PLF_FIRE
) {s
=standspr(p
)+1;w
=wpnspr(p
)+1;}
588 else if(p
->pain
) {s
='G';w
='A';wx
=p
->d
?2:-2;wy
=1;}
589 else {s
=standspr(p
);w
=wpnspr(p
);}
596 if(p
->pain
) {s
='G';w
='A';wx
=p
->d
?2:-2;wy
=1;}
598 s
=goanim
[p
->s
/8];w
=(p
->f
&PLF_FIRE
)?'B':'A';
599 wx
=p
->d
?2:-2;wy
=1+wytab
[s
-'A'];
603 s
=dieanim
[p
->s
];break;
605 s
=slopanim
[p
->s
];break;
610 if(w
) Z_drawspr(p
->o
.x
+wx
,p
->o
.y
+wy
,wpn
[p
->wpn
][w
-'A'],p
->d
);
611 if(s
) Z_drawmanspr(p
->o
.x
,p
->o
.y
,spr
[(s
-'A')*2+p
->d
],sprd
[(s
-'A')*2+p
->d
],p
->color
);
614 void *PL_getspr(int s
,int d
) {
615 return spr
[(s
-'A')*2+d
];
618 static void chk_bfg(player_t
*p
,int x
,int y
) {
623 case DIE
: case SLOP
: case FALL
:
624 case DEAD
: case MESS
: case OUT
:
627 dx
=p
->o
.x
-x
;dy
=p
->o
.y
-p
->o
.h
/2-y
;
628 if(dx
*dx
+dy
*dy
<=1600) {
629 aitime
=Z_sound(aisnd
[rand()%3
],128)*4;
633 void bfg_fly(int x
,int y
,int o
) {
635 if(o
!=-1) chk_bfg(&pl1
,x
,y
);
636 if(_2pl
) if(o
!=-2) chk_bfg(&pl2
,x
,y
);
637 if(o
==-1 || o
==-2) MN_warning(x
-50,y
-50,x
+50,y
+50);
640 void PL_drawst(player_t
*p
) {
641 V_setrect(WD
,120,w_o
,HT
);Z_clrst();
644 if(p
->drawst
&PL_DRAWAIR
)
647 if(p
->drawst
&PL_DRAWLIFE
)
648 Z_drawstprcnt(0,p
->life
);
649 if(p
->drawst
&PL_DRAWARMOR
)
650 Z_drawstprcnt(1,p
->armor
);
651 if(p
->drawst
&PL_DRAWWPN
) {
655 case 3: case 4: case 9:
664 Z_drawstwpn(p
->wpn
,i
);
666 if(p
->drawst
&PL_DRAWFRAG
) Z_drawstnum(p
->frag
);
667 if(p
->drawst
&PL_DRAWKEYS
) Z_drawstkeys(p
->keys
);
668 if(!_2pl
) if(p
->drawst
&PL_DRAWLIVES
) Z_drawstlives(p
->lives
);