summaryrefslogtreecommitdiff
path: root/global.h
blob: 185f227c300f2105c0729de5ebb180fa9183d4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/****************************************************************************\
*    																	*
*    Copyright by Casimo, 2013												*
*    																	*
*    This file is part of fxMaze.												*
*    																	*
*    fxMaze is free software: you can redistribute it and/or modify						*
*    it under the terms of the GNU General Public License as published by					*
*    the Free Software Foundation, either version 3 of the License, or					*
*    (at your option) any later version.											*
*    																	*
*    fxMaze is distributed in the hope that it will be useful,							*
*    but WITHOUT ANY WARRANTY; without even the implied warranty of				*
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the				*
*    GNU General Public License for more details.									*
*    																	*
*    You should have received a copy of the GNU General Public License					*
*    along with fxMaze.  If not, see <http://www.gnu.org/licenses/>.					*
*    																	*
\****************************************************************************/

#ifndef _GLOBAL_H_
#define _GLOBAL_H_

#define MAPSIZE 21

#define ENEMYCNT 10

#define TYPE_ENEMY 1
#define TYPE_PACK 2

#define UNSOLID 0
#define SOLID 1
#define SPRITE 2

#define SPACE 0
#define WALL 1
#define DOOR 2

#define CHECKED 5

#define GUN 1
#define KNIFE 2

#define WEAPON_OVERFLOW 3

#define NORTH 0
#define EAST 1
#define SOUTH 2
#define WEST 3

#define TRUE 0xFF
#define FALSE 0

#define NULL (void *) 0

typedef unsigned short int usint;
typedef unsigned short ushort;
typedef unsigned char uchar;
typedef unsigned int uint;
typedef short int sint;
typedef unsigned char bool;

extern uint map[MAPSIZE][MAPSIZE];
extern int heights[MAPSIZE][MAPSIZE];
extern uint solids[MAPSIZE][MAPSIZE];

extern int output;
extern int exit;
extern int demo;

extern int contrast;
extern int contradd;

extern int gundir;

extern const uint sizex, sizey;

extern struct st_player{float dirX, dirY, planeX, planeY, x, y; int weapon, gunpos, health;} player;
extern struct st_sprite{float x, y; int type, effect; struct{int *ptr; uint width, height;} texture;} *sprites;

extern uint spritecnt;

void error(void);

extern const char *status;
extern unsigned int statustimer;

#endif