Crossfire Server, Trunk  R20576
Go to the documentation of this file.
6 #ifndef _RANDOM_MAP_H
7 #define _RANDOM_MAP_H
9 #define RM_SIZE 512
14 typedef struct RMParms {
69  int Xsize;
70  int Ysize;
71  int expand2x;
74  int symmetry;
83  int origin_y;
84  int origin_x;
88  long unsigned int total_map_hp;
91  struct regiondef *region;
97 } RMParms;
99 int load_parameters(FILE *fp, int bufstate, RMParms *RP);
105 #define ONION_LAYOUT 1
106 #define MAZE_LAYOUT 2
107 #define SPIRAL_LAYOUT 3
108 #define ROGUELIKE_LAYOUT 4
109 #define SNAKE_LAYOUT 5
111 #define NROFLAYOUTS 6
121 #define OPT_RANDOM 0
122 #define OPT_CENTERED 1
123 #define OPT_LINEAR 2
124 #define OPT_BOTTOM_C 4
125 #define OPT_BOTTOM_R 8
126 #define OPT_IRR_SPACE 16
127 #define OPT_WALL_OFF 32
128 #define OPT_WALLS_ONLY 64
129 #define OPT_NO_DOORS 256
138 #define RANDOM_SYM 0
139 #define NO_SYM 1
140 #define X_SYM 2
141 #define Y_SYM 3
142 #define XY_SYM 4
146 #define MIN_RANDOM_MAP_SIZE 10
151 #define BC_RANDOM(x) ((int) ((RANDOM()%(x)+RANDOM()%(x)+RANDOM()%(x))/3.))
153 int set_random_map_variable(RMParms *rp, const char *buf);
155 #endif
char final_exit_archetype[RM_SIZE]
If not empty, the archetype name of the exit leading to the final map.
Definition: random_map.h:54
Random map parameters.
Definition: random_map.h:14
int decoroptions
Definition: random_map.h:81
char floorstyle[RM_SIZE]
Name of the floor style file, in /styles/floors, can be an empty string in which case a random one is...
Definition: random_map.h:29
char final_map[RM_SIZE]
If not empty, the path of the final map this whole maze leads to.
Definition: random_map.h:52
char exit_on_final_map[RM_SIZE]
If this is "no", then no exit will be made to the final map from the previous random map...
Definition: random_map.h:65
int difficulty_given
If non zero, this means the difficulty was not zero initially.
Definition: random_map.h:77
char doorstyle[RM_SIZE]
Name of the doors style file, in /styles/doorstyles, see put_doors().
Definition: random_map.h:43
#define RM_SIZE
Definition: random_map.h:9
int random_seed
Definition: random_map.h:85
struct RMParms RMParms
Random map parameters.
int multiple_floors
If non zero, then the map will have multiple floors, else only one floor will be used.
Definition: random_map.h:96
int expand2x
Definition: random_map.h:71
int map_layout_style
Definition: random_map.h:86
int layoutoptions2
Definition: random_map.h:73
int symmetry
Definition: random_map.h:74
long unsigned int total_map_hp
Total hit points of the monsters in the map, used for treasure generation.
Definition: random_map.h:88
char monsterstyle[RM_SIZE]
Name of the monster style directory, in /styles/monsters, can be an empty string in which case a rand...
Definition: random_map.h:34
This is a game region.
Definition: map.h:276
int layoutoptions1
Definition: random_map.h:72
int orientation
Definition: random_map.h:82
int treasureoptions
Definition: random_map.h:89
char dungeon_name[RM_SIZE]
If not empty, will be used in the name of the random keys.
Definition: random_map.h:67
int dungeon_level
Definition: random_map.h:79
char exitstyle[RM_SIZE]
Name of the exit style files, in /styles/exitstyles/{up,down}, can be an empty string in which case a...
Definition: random_map.h:58
char layoutstyle[RM_SIZE]
Contains the layout type to generate, see layoutgen() for valid types.
Definition: random_map.h:41
int symmetry_used
Definition: random_map.h:90
int Ysize
Definition: random_map.h:70
int Xsize
Definition: random_map.h:69
char origin_map[RM_SIZE]
Path to the map this random map is generated from, to make an exit back.
Definition: random_map.h:50
char wall_name[RM_SIZE]
Will contain the actual wall archetype, can be an empty string in which case a random one is chosen...
Definition: random_map.h:24
float difficulty_increase
Definition: random_map.h:78
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:83
int dungeon_depth
Definition: random_map.h:80
char this_map[RM_SIZE]
Path of the map from which the random map(s) were created.
Definition: random_map.h:60
struct regiondef * region
Definition: random_map.h:91
int difficulty
Definition: random_map.h:75
char treasurestyle[RM_SIZE]
Name of the treasures style file, in /styles/treasurestyles, can be an empty string in which case a r...
Definition: random_map.h:39
char decorstyle[RM_SIZE]
Name of the decor style file, in /styles/decorstyles, can be an empty string in which case a random o...
Definition: random_map.h:48
int origin_x
Definition: random_map.h:84
char wallstyle[RM_SIZE]
Name of the wall style file, in /styles/wallstyles, can be an empty string in which case a random one...
Definition: random_map.h:19