Crossfire Server, Trunk  R22010
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 } RMParms;
103 
104 int load_parameters(FILE *fp, int bufstate, RMParms *RP);
105 
110 #define ONION_LAYOUT 1
111 #define MAZE_LAYOUT 2
112 #define SPIRAL_LAYOUT 3
113 #define ROGUELIKE_LAYOUT 4
114 #define SNAKE_LAYOUT 5
115 #define SQUARE_SPIRAL_LAYOUT 6
116 #define NROFLAYOUTS 6
117 
126 #define OPT_RANDOM 0
127 #define OPT_CENTERED 1
128 #define OPT_LINEAR 2
129 #define OPT_BOTTOM_C 4
130 #define OPT_BOTTOM_R 8
131 #define OPT_IRR_SPACE 16
132 #define OPT_WALL_OFF 32
133 #define OPT_WALLS_ONLY 64
134 #define OPT_NO_DOORS 256
136 
137 
143 #define RANDOM_SYM 0
144 #define NO_SYM 1
145 #define X_SYM 2
146 #define Y_SYM 3
147 #define XY_SYM 4
149 
150 
151 #define MIN_RANDOM_MAP_SIZE 10
152 
156 #define BC_RANDOM(x) ((int) ((RANDOM()%(x)+RANDOM()%(x)+RANDOM()%(x))/3.))
157 
158 int set_random_map_variable(RMParms *rp, const char *buf);
159 
160 #endif
char final_exit_archetype[RM_SIZE]
Definition: random_map.h:59
int decoroptions
Definition: random_map.h:86
StringBuffer * buf
Definition: readable.c:1591
char floorstyle[RM_SIZE]
Definition: random_map.h:29
char final_map[RM_SIZE]
Definition: random_map.h:57
char exit_on_final_map[RM_SIZE]
Definition: random_map.h:70
int difficulty_given
Definition: random_map.h:82
char doorstyle[RM_SIZE]
Definition: random_map.h:43
#define RM_SIZE
Definition: random_map.h:9
int random_seed
Definition: random_map.h:90
struct RMParms RMParms
int multiple_floors
Definition: random_map.h:101
int expand2x
Definition: random_map.h:76
int map_layout_style
Definition: random_map.h:91
int layoutoptions2
Definition: random_map.h:78
int symmetry
Definition: random_map.h:79
long unsigned int total_map_hp
Definition: random_map.h:93
char monsterstyle[RM_SIZE]
Definition: random_map.h:34
Definition: map.h:276
int layoutoptions1
Definition: random_map.h:77
int orientation
Definition: random_map.h:87
int treasureoptions
Definition: random_map.h:94
char dungeon_name[RM_SIZE]
Definition: random_map.h:72
int dungeon_level
Definition: random_map.h:84
char exitstyle[RM_SIZE]
Definition: random_map.h:63
char layoutstyle[RM_SIZE]
Definition: random_map.h:41
int symmetry_used
Definition: random_map.h:95
int Ysize
Definition: random_map.h:75
int Xsize
Definition: random_map.h:74
char origin_map[RM_SIZE]
Definition: random_map.h:55
char wall_name[RM_SIZE]
Definition: random_map.h:24
float difficulty_increase
Definition: random_map.h:83
int load_parameters(FILE *fp, int bufstate, RMParms *RP)
int set_random_map_variable(RMParms *rp, const char *buf)
int origin_y
Definition: random_map.h:88
int dungeon_depth
Definition: random_map.h:85
char this_map[RM_SIZE]
Definition: random_map.h:65
struct regiondef * region
Definition: random_map.h:96
char cheststyle[RM_SIZE]
Definition: random_map.h:53
int difficulty
Definition: random_map.h:80
char treasurestyle[RM_SIZE]
Definition: random_map.h:39
char decorstyle[RM_SIZE]
Definition: random_map.h:48
int origin_x
Definition: random_map.h:89
char wallstyle[RM_SIZE]
Definition: random_map.h:19