DEADSOFTWARE

b48cc3aefa1f1d3d43c4ce8dc090df2d590f7564
[flatwaifu.git] / src / misc.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 #ifndef MISC_H_INCLUDED
24 #define MISC_H_INCLUDED
26 #include "glob.h"
27 #include "view.h" // obj_t
28 #include <stdint.h> // int16_t int32_t
30 #define MAXDIST 2000000L
32 enum {
33 Z_HITWALL = 1,
34 Z_HITCEIL = 2,
35 Z_HITLAND = 4,
36 Z_FALLOUT = 8,
37 Z_INWATER = 16,
38 Z_HITWATER = 32,
39 Z_HITAIR = 64,
40 Z_BLOCK = 128
41 };
43 extern byte z_dot;
44 extern byte z_mon;
46 int Z_sign (int a);
47 int Z_dec (int a, int b);
48 void *Z_getsnd (char n[6]);
49 int Z_sound (void *s, int v);
50 void Z_initst (void);
51 int Z_canstand (int x, int y, int r);
52 int Z_canfit (int x, int y, int r, int h);
53 int Z_istrapped (int x, int y, int r, int h);
54 void Z_set_speed (obj_t *o, int s);
55 int Z_inwater (int x, int y, int r, int h);
56 int Z_getacid (int x, int y, int r, int h);
57 int Z_canbreathe (int x, int y, int r, int h);
58 int Z_overlap (obj_t *a, obj_t *b);
59 int Z_cansee (int x, int y, int xd, int yd);
60 int Z_look (obj_t *a, obj_t *b, int d);
61 int Z_moveobj (obj_t *p);
62 void Z_splash (obj_t *p, int n);
63 void Z_calc_time(dword t, word *h, word *m, word *s);
65 int16_t short2host (int16_t x);
66 int32_t int2host (int32_t x);
68 #endif /* MISC_H_INCLUDED */