-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmap.h
118 lines (94 loc) · 2.66 KB
/
map.h
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
*
* Copyright (c) 1994, 2002, 2003 Johannes Prix
* Copyright (c) 1994, 2002, 2003 Reinhard Prix
*
*
* This file is part of Freedroid
*
* Freedroid 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 2 of the License, or
* (at your option) any later version.
*
* Freedroid 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 Freedroid; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*/
#ifndef _map_h
#define _map_h
/* some defines */
#define OUTER_REFRESH_COUNTER 2
#define INNER_REFRESH_COUNTER 4
#define INNER_PHASES 4
#define MAX_TYPES_ON_LEVEL 30
#define CREW_LINE_LEN MAX_TYPES_ON_LEVEL * 3 + 20
/* Distance, where door opens */
//NORMALISATION #define DOOROPENDIST2 (Block_Rect.h + Block_Rect.w)*(Block_Rect.w + Block_Rect.h)/4
// #define DOOROPENDIST2 (((Block_Rect.h + Block_Rect.w)*(Block_Rect.w + Block_Rect.h)/4)/64.0)
#define DOOROPENDIST2 1
/* Randbreite der Wand */
#define WALLPASS (4.0/64.0)
/* Randbreite der Konsolen */
#define KONSOLEPASS_X 0.5625
#define KONSOLEPASS_Y 0.5625
/* Breite der Tueren freien Raumes vor Tuer*/
#define TUERBREITE (6/64.0)
/* Rand der offenen Tueren */
#define V_RANDSPACE WALLPASS
#define V_RANDBREITE (5/64.0)
#define H_RANDSPACE WALLPASS
#define H_RANDBREITE (5/64.0)
#define WAYPOINT_CHAR 'x'
#define NO_WAYPOINT -1
/* Extensions for Map and Elevator - data */
#define FILENAME_LEN 128
#define SHIP_EXT ".shp"
#define ELEVEXT ".elv"
#define CREWEXT ".crw"
/* string - signs in ship-data files */
#define WHITE_SPACE " \t"
#define MAP_BEGIN_STRING "begin_map"
#define WP_BEGIN_STRING "begin_waypoints"
#define LEVEL_END_STRING "end_level"
#define CONNECTION_STRING "connections: "
typedef struct
{
char ascii; /* the map-symbols in ascii notation */
int intern; /* the map-symbols in internal notation */
}
symtrans;
enum _colornames
{
PD_RED,
PD_YELLOW,
PD_GREEN,
PD_GRAY,
PD_BLUE,
PD_GREENBLUE,
PD_DARK
};
#if (defined _gen_c) || (defined _map_c)
/* Color - names */
const char *ColorNames[] = {
"Red",
"Yellow",
"Green",
"Gray",
"Blue",
"Turquoise",
"Dark"
};
int numLevelColors = NUM_ELEM(ColorNames);
#else
extern char *ColorNames[];
extern int numLevelColors;
#endif
#endif