DEADSOFTWARE

save: move file access to files.c
[flatwaifu.git] / src / misc.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 MISC_H_INCLUDED
19 #define MISC_H_INCLUDED
21 #include "glob.h"
22 #include "view.h" // obj_t
23 #include <stdint.h> // int16_t int32_t
25 #define MAXDIST 2000000L
27 enum {
28 Z_HITWALL = 1,
29 Z_HITCEIL = 2,
30 Z_HITLAND = 4,
31 Z_FALLOUT = 8,
32 Z_INWATER = 16,
33 Z_HITWATER = 32,
34 Z_HITAIR = 64,
35 Z_BLOCK = 128
36 };
38 extern byte z_dot;
39 extern byte z_mon;
41 int Z_sign (int a);
42 int Z_dec (int a, int b);
43 void *Z_getsnd (char n[6]);
44 int Z_sound (void *s, int v);
45 void Z_initst (void);
46 int Z_canstand (int x, int y, int r);
47 int Z_canfit (int x, int y, int r, int h);
48 int Z_istrapped (int x, int y, int r, int h);
49 void Z_set_speed (obj_t *o, int s);
50 int Z_inwater (int x, int y, int r, int h);
51 int Z_getacid (int x, int y, int r, int h);
52 int Z_canbreathe (int x, int y, int r, int h);
53 int Z_overlap (obj_t *a, obj_t *b);
54 int Z_cansee (int x, int y, int xd, int yd);
55 int Z_look (obj_t *a, obj_t *b, int d);
56 int Z_moveobj (obj_t *p);
57 void Z_splash (obj_t *p, int n);
58 void Z_calc_time(dword t, word *h, word *m, word *s);
60 #endif /* MISC_H_INCLUDED */