DEADSOFTWARE

save: move file access to files.c
[flatwaifu.git] / src / monster.h
1 /* Copyright (C) 1996-1997 Aleksey Volynskov
2 * Copyright (C) 2011 Rambo
3 * Copyright (C) 2020 SovietPony
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License ONLY.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
18 #ifndef MONSTER_H_INLUDED
19 #define MONSTER_H_INLUDED
21 #include "glob.h"
22 #include "view.h" // obj_t
24 #define MAXMN 200
26 enum {
27 MN_NONE, MN_DEMON, MN_IMP, MN_ZOMBY, MN_SERG, MN_CYBER, MN_CGUN,
28 MN_BARON, MN_KNIGHT, MN_CACO, MN_SOUL, MN_PAIN, MN_SPIDER, MN_BSP,
29 MN_MANCUB, MN_SKEL, MN_VILE, MN_FISH, MN_BARREL, MN_ROBO, MN_MAN,
30 MN__LAST,
31 MN_PL_DEAD = 100,
32 MN_PL_MESS
33 };
35 #define MN_TN (MN__LAST-MN_DEMON)
37 typedef struct {
38 obj_t o;
39 byte t, d, st, ftime;
40 int fobj;
41 int s;
42 char *ap;
43 int aim, life, pain, ac, tx, ty, ammo;
44 short atm;
45 } mn_t;
47 extern byte nomon;
48 extern int hit_xv, hit_yv;
49 extern mn_t mn[MAXMN];
50 extern int mnum, gsndt;
52 void setst (int i, int st);
54 void MN_alloc (void);
55 void MN_init (void);
56 int MN_spawn (int x, int y, byte d, int t);
57 int MN_spawn_deadpl (obj_t *o, byte c, int t);
58 int Z_getobjpos (int i, obj_t *o);
59 void MN_act (void);
60 void MN_mark (void);
61 int MN_hit (int n, int d, int o, int t);
62 int Z_gunhit (int x, int y, int o, int xv, int yv);
63 int Z_hit (obj_t *o, int d, int own, int t);
64 void MN_killedp (void);
65 void Z_explode (int x, int y, int rad, int own);
66 void Z_bfg9000 (int x, int y, int own);
67 int Z_chktrap (int t, int d, int o, int ht);
68 void Z_teleobj (int o, int x, int y);
69 void MN_warning (int l, int t, int r, int b);
71 #endif /* MONSTER_H_INLUDED */