Crossfire Server, Trunk
random_map.h
Go to the documentation of this file.
1 
6 #ifndef _RANDOM_MAP_H
7 #define _RANDOM_MAP_H
8 
9 #define RM_SIZE 512
10 
14 typedef struct RMParms {
73 
74  int Xsize;
75  int Ysize;
76  int expand2x;
79  int symmetry;
88  int origin_y;
89  int origin_x;
93  long unsigned int total_map_hp;
96  struct regiondef *region;
102  int darkness;
103  int outdoor;
104 } RMParms;
105 
106 int load_parameters(FILE *fp, int bufstate, RMParms *RP);
107 
112 #define ONION_LAYOUT 1
113 #define MAZE_LAYOUT 2
114 #define SPIRAL_LAYOUT 3
115 #define ROGUELIKE_LAYOUT 4
116 #define SNAKE_LAYOUT 5
117 #define SQUARE_SPIRAL_LAYOUT 6
118 #define NROFLAYOUTS 6
119 
128 #define OPT_RANDOM 0
129 #define OPT_CENTERED 1
130 #define OPT_LINEAR 2
131 #define OPT_BOTTOM_C 4
132 #define OPT_BOTTOM_R 8
133 #define OPT_IRR_SPACE 16
134 #define OPT_WALL_OFF 32
135 #define OPT_WALLS_ONLY 64
136 #define OPT_NO_DOORS 256
138 
139 
145 #define RANDOM_SYM 0
146 #define NO_SYM 1
147 #define X_SYM 2
148 #define Y_SYM 3
149 #define XY_SYM 4
151 
152 
153 #define MIN_RANDOM_MAP_SIZE 10
154 
158 #define BC_RANDOM(x) ((int) ((RANDOM()%(x)+RANDOM()%(x)+RANDOM()%(x))/3.))
159 
160 int set_random_map_variable(RMParms *rp, const char *buf);
161 
162 #endif
RMParms::layoutstyle
char layoutstyle[RM_SIZE]
Definition: random_map.h:41
RMParms::orientation
int orientation
Definition: random_map.h:87
RMParms::symmetry
int symmetry
Definition: random_map.h:79
RMParms::origin_map
char origin_map[RM_SIZE]
Definition: random_map.h:55
RMParms::difficulty_given
int difficulty_given
Definition: random_map.h:82
RMParms::multiple_floors
int multiple_floors
Definition: random_map.h:101
RMParms::Ysize
int Ysize
Definition: random_map.h:75
RMParms::dungeon_depth
int dungeon_depth
Definition: random_map.h:85
RM_SIZE
#define RM_SIZE
Definition: random_map.h:9
set_random_map_variable
int set_random_map_variable(RMParms *rp, const char *buf)
Definition: reader.c:2579
RMParms::origin_y
int origin_y
Definition: random_map.h:88
RMParms::dungeon_level
int dungeon_level
Definition: random_map.h:84
RMParms
Definition: random_map.h:14
RMParms::wall_name
char wall_name[RM_SIZE]
Definition: random_map.h:24
RMParms::origin_x
int origin_x
Definition: random_map.h:89
load_parameters
int load_parameters(FILE *fp, int bufstate, RMParms *RP)
Definition: reader.c:2545
RMParms::this_map
char this_map[RM_SIZE]
Definition: random_map.h:65
RMParms::decorstyle
char decorstyle[RM_SIZE]
Definition: random_map.h:48
RMParms::darkness
int darkness
Definition: random_map.h:102
RMParms::final_map
char final_map[RM_SIZE]
Definition: random_map.h:57
RMParms::expand2x
int expand2x
Definition: random_map.h:76
RMParms
struct RMParms RMParms
RMParms::region
struct regiondef * region
Definition: random_map.h:96
RMParms::wallstyle
char wallstyle[RM_SIZE]
Definition: random_map.h:19
RMParms::doorstyle
char doorstyle[RM_SIZE]
Definition: random_map.h:43
RMParms::difficulty
int difficulty
Definition: random_map.h:80
RMParms::final_exit_archetype
char final_exit_archetype[RM_SIZE]
Definition: random_map.h:59
RMParms::cheststyle
char cheststyle[RM_SIZE]
Definition: random_map.h:53
RMParms::random_seed
int random_seed
Definition: random_map.h:90
RMParms::outdoor
int outdoor
Definition: random_map.h:103
RMParms::total_map_hp
long unsigned int total_map_hp
Definition: random_map.h:93
RMParms::exit_on_final_map
char exit_on_final_map[RM_SIZE]
Definition: random_map.h:70
RMParms::treasurestyle
char treasurestyle[RM_SIZE]
Definition: random_map.h:39
RMParms::treasureoptions
int treasureoptions
Definition: random_map.h:94
buf
StringBuffer * buf
Definition: readable.c:1606
RMParms::dungeon_name
char dungeon_name[RM_SIZE]
Definition: random_map.h:72
RMParms::floorstyle
char floorstyle[RM_SIZE]
Definition: random_map.h:29
RMParms::map_layout_style
int map_layout_style
Definition: random_map.h:91
RMParms::monsterstyle
char monsterstyle[RM_SIZE]
Definition: random_map.h:34
RMParms::layoutoptions1
int layoutoptions1
Definition: random_map.h:77
RMParms::decoroptions
int decoroptions
Definition: random_map.h:86
RMParms::exitstyle
char exitstyle[RM_SIZE]
Definition: random_map.h:63
RMParms::Xsize
int Xsize
Definition: random_map.h:74
RMParms::layoutoptions2
int layoutoptions2
Definition: random_map.h:78
RMParms::difficulty_increase
float difficulty_increase
Definition: random_map.h:83
RMParms::symmetry_used
int symmetry_used
Definition: random_map.h:95
regiondef
Definition: map.h:275