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 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 region *region;
102  int darkness;
103  int outdoor;
105 };
106 
107 int load_parameters(FILE *fp, int bufstate, RMParms *RP);
108 
113 #define ONION_LAYOUT 1
114 #define MAZE_LAYOUT 2
115 #define SPIRAL_LAYOUT 3
116 #define ROGUELIKE_LAYOUT 4
117 #define SNAKE_LAYOUT 5
118 #define SQUARE_SPIRAL_LAYOUT 6
119 #define NROFLAYOUTS 6
120 
129 #define OPT_RANDOM 0
130 #define OPT_CENTERED 1
131 #define OPT_LINEAR 2
132 #define OPT_BOTTOM_C 4
133 #define OPT_BOTTOM_R 8
134 #define OPT_IRR_SPACE 16
135 #define OPT_WALL_OFF 32
136 #define OPT_WALLS_ONLY 64
137 #define OPT_NO_DOORS 256
139 
140 
146 #define RANDOM_SYM 0
147 #define NO_SYM 1
148 #define X_SYM 2
149 #define Y_SYM 3
150 #define XY_SYM 4
152 
153 
154 #define MIN_RANDOM_MAP_SIZE 10
155 
159 #define BC_RANDOM(x) ((int) ((RANDOM()%(x)+RANDOM()%(x)+RANDOM()%(x))/3.))
160 
161 int set_random_map_variable(RMParms *rp, const char *buf);
162 
163 #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.cpp:2526
RMParms::origin_y
int origin_y
Definition: random_map.h:88
RMParms::dungeon_level
int dungeon_level
Definition: random_map.h:84
buf
StringBuffer * buf
Definition: readable.cpp:1565
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.cpp:2492
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::wallstyle
char wallstyle[RM_SIZE]
Definition: random_map.h:19
RMParms::doorstyle
char doorstyle[RM_SIZE]
Definition: random_map.h:43
region
Definition: map.h:272
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
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::region
struct region * region
Definition: random_map.h:96
RMParms::Xsize
int Xsize
Definition: random_map.h:74
RMParms::layoutoptions2
int layoutoptions2
Definition: random_map.h:78
RMParms::link_source_map
bool link_source_map
Definition: random_map.h:104
RMParms::difficulty_increase
float difficulty_increase
Definition: random_map.h:83
RMParms::symmetry_used
int symmetry_used
Definition: random_map.h:95