Angband
generate.h
Go to the documentation of this file.
1 
7 #ifndef GENERATE_H
8 #define GENERATE_H
9 
10 #include "monster.h"
11 
12 #if __STDC_VERSION__ < 199901L
13 #define ROOM_LOG if (OPT(player, cheat_room)) msg
14 #else
15 #define ROOM_LOG(...) if (OPT(player, cheat_room)) msg(__VA_ARGS__);
16 #endif
17 
21 enum
22 {
23  SET_CORR = 0x01,
24  SET_ROOM = 0x02,
25  SET_BOTH = 0x03
26 };
27 
28 enum
29 {
36 };
37 
43 
44  struct monster_base *base;
45 };
46 
52 
54 };
55 
61 
62  struct monster_race *race;
63 };
64 
68 struct pit_profile {
69  struct pit_profile *next;
71  int pit_idx;
72  const char *name;
73  int room_type;
74  int ave;
75  int rarity;
76  int obj_rarity;
84 };
85 
86 extern struct pit_profile *pit_info;
87 
88 
92 struct dun_data {
94  const struct cave_profile *profile;
95 
97  int cent_n;
98  struct loc *cent;
99 
101  int door_n;
102  struct loc *door;
103 
105  int wall_n;
106  struct loc *wall;
107 
109  int tunn_n;
110  struct loc *tunn;
111 
114 
117 
121 
123  bool **room_map;
124 
126  int pit_num;
127 
130 
132  struct connector *join;
133 };
134 
135 
137  const char *name;
138  int rnd;
139  int chg;
140  int con;
141  int pen;
142  int jct;
143 };
144 
146  const char *name;
147  int den;
148  int rng;
149  int mag;
150  int mc;
151  int qua;
152  int qc;
153 };
154 
155 /*
156  * cave_builder is a function pointer which builds a level.
157  */
158 typedef struct chunk * (*cave_builder) (struct player *p, int h, int w);
159 
160 
161 struct cave_profile {
163 
164  const char *name;
167  int dun_rooms;
174  int cutoff;
175 };
176 
177 
182 typedef bool (*room_builder) (struct chunk *c, int y0, int x0, int rating);
183 
184 
189 struct room_profile {
191 
192  const char *name;
194  int rating;
195  int height, width;
196  int level;
197  bool pit;
198  int rarity;
199  int cutoff;
200 };
201 
202 
203 /*
204  * Information about vault generation
205  */
206 struct vault {
207  struct vault *next;
209  char *name;
210  char *text;
212  char *typ;
221 };
222 
223 
224 
229  struct room_template *next;
231  char *name;
232  char *text;
242 };
243 
244 extern struct dun_data *dun;
245 extern struct vault *vaults;
246 extern struct room_template *room_templates;
247 
248 /* gen-cave.c */
249 struct chunk *town_gen(struct player *p, int min_height, int min_width);
250 struct chunk *classic_gen(struct player *p, int min_height, int min_width);
251 struct chunk *labyrinth_gen(struct player *p, int min_height, int min_width);
252 void ensure_connectedness(struct chunk *c);
253 struct chunk *cavern_gen(struct player *p, int min_height, int min_width);
254 struct chunk *modified_gen(struct player *p, int min_height, int min_width);
255 struct chunk *moria_gen(struct player *p, int min_height, int min_width);
256 struct chunk *hard_centre_gen(struct player *p, int min_height, int min_width);
257 struct chunk *lair_gen(struct player *p, int min_height, int min_width);
258 struct chunk *gauntlet_gen(struct player *p, int min_height, int min_width);
259 
260 /* gen-chunk.c */
261 struct chunk *chunk_write(struct chunk *c);
262 void chunk_list_add(struct chunk *c);
263 bool chunk_list_remove(char *name);
264 struct chunk *chunk_find_name(char *name);
265 bool chunk_find(struct chunk *c);
266 struct chunk *chunk_find_adjacent(struct player *p, bool above);
267 bool chunk_copy(struct chunk *dest, struct chunk *source, int y0, int x0,
268  int rotate, bool reflect);
269 
270 void chunk_validate_objects(struct chunk *c);
271 
272 
273 /* gen-room.c */
274 void fill_rectangle(struct chunk *c, int y1, int x1, int y2, int x2, int feat,
275  int flag);
276 void generate_mark(struct chunk *c, int y1, int x1, int y2, int x2, int flag);
277 void draw_rectangle(struct chunk *c, int y1, int x1, int y2, int x2, int feat,
278  int flag);
279 void set_marked_granite(struct chunk *c, int y, int x, int flag);
280 extern bool generate_starburst_room(struct chunk *c, int y1, int x1, int y2,
281  int x2, bool light, int feat,
282  bool special_ok);
283 
284 struct vault *random_vault(int depth, const char *typ);
285 bool build_vault(struct chunk *c, int y0, int x0, struct vault *v);
286 
287 bool build_staircase(struct chunk *c, int y0, int x0, int rating);
288 bool build_simple(struct chunk *c, int y0, int x0, int rating);
289 bool build_circular(struct chunk *c, int y0, int x0, int rating);
290 bool build_overlap(struct chunk *c, int y0, int x0, int rating);
291 bool build_crossed(struct chunk *c, int y0, int x0, int rating);
292 bool build_large(struct chunk *c, int y0, int x0, int rating);
293 bool mon_pit_hook(struct monster_race *race);
294 void set_pit_type(int depth, int type);
295 bool build_nest(struct chunk *c, int y0, int x0, int rating);
296 bool build_pit(struct chunk *c, int y0, int x0, int rating);
297 bool build_template(struct chunk *c, int y0, int x0, int rating);
298 bool build_interesting(struct chunk *c, int y0, int x0, int rating);
299 bool build_lesser_vault(struct chunk *c, int y0, int x0, int rating);
300 bool build_medium_vault(struct chunk *c, int y0, int x0, int rating);
301 bool build_greater_vault(struct chunk *c, int y0, int x0, int rating);
302 bool build_moria(struct chunk *c, int y0, int x0, int rating);
303 bool build_room_of_chambers(struct chunk *c, int y0, int x0, int rating);
304 bool build_huge(struct chunk *c, int y0, int x0, int rating);
305 bool room_build(struct chunk *c, int by0, int bx0, struct room_profile profile,
306  bool finds_own_space);
307 
308 
309 /* gen-util.c */
310 extern byte get_angle_to_grid[41][41];
311 
312 int yx_to_i(int y, int x, int w);
313 void i_to_yx(int i, int w, int *y, int *x);
314 void shuffle(int *arr, int n);
315 bool cave_find(struct chunk *c, int *y, int *x, square_predicate pred);
316 bool find_empty(struct chunk *c, int *y, int *x);
317 bool find_empty_range(struct chunk *c, int *y, int y1, int y2, int *x, int x1, int x2);
318 bool find_nearby_grid(struct chunk *c, int *y, int y0, int yd, int *x, int x0, int xd);
319 void correct_dir(int *rdir, int *cdir, int y1, int x1, int y2, int x2);
320 void rand_dir(int *rdir, int *cdir);
321 void new_player_spot(struct chunk *c, struct player *p);
322 void place_object(struct chunk *c, int y, int x, int level, bool good,
323  bool great, byte origin, int tval);
324 void place_gold(struct chunk *c, int y, int x, int level, byte origin);
325 void place_secret_door(struct chunk *c, int y, int x);
326 void place_closed_door(struct chunk *c, int y, int x);
327 void place_random_door(struct chunk *c, int y, int x);
328 void place_random_stairs(struct chunk *c, int y, int x);
329 void alloc_stairs(struct chunk *c, int feat, int num, int walls);
330 void vault_objects(struct chunk *c, int y, int x, int depth, int num);
331 void vault_traps(struct chunk *c, int y, int x, int yd, int xd, int num);
332 void vault_monsters(struct chunk *c, int y1, int x1, int depth, int num);
333 void alloc_objects(struct chunk *c, int set, int typ, int num, int depth, byte origin);
334 bool alloc_object(struct chunk *c, int set, int typ, int depth, byte origin);
335 
336 /* gen-monster.c */
337 bool mon_restrict(const char *monster_type, int depth, bool unique_ok);
338 void spread_monsters(struct chunk *c, const char *type, int depth, int num,
339  int y0, int x0, int dy, int dx, byte origin);
340 void get_vault_monsters(struct chunk *c, char racial_symbol[], char *vault_type,
341  const char *data, int y1, int y2, int x1, int x2);
342 void get_chamber_monsters(struct chunk *c, int y1, int x1, int y2, int x2, char *name, int area);
343 
344 
345 #endif /* !GENERATE_H */
int level
Definition: generate.h:196
const char * name
Definition: generate.h:146
byte hgt
Definition: generate.h:216
bool room_build(struct chunk *c, int by0, int bx0, struct room_profile profile, bool finds_own_space)
Attempt to build a room of the given type at the given block.
Definition: gen-room.c:3048
png_infop png_charpp int png_charpp profile
Definition: libpng12/png.h:2414
int rarity
How unusual this pit is.
Definition: generate.h:75
char * text
Definition: generate.h:210
int pit_idx
Index in pit_info.
Definition: generate.h:71
Monster "race" information, including racial memories.
Definition: monster.h:265
bool(* room_builder)(struct chunk *c, int y0, int x0, int rating)
room_builder is a function pointer which builds rooms in the cave given anchor coordinates.
Definition: generate.h:182
bool build_nest(struct chunk *c, int y0, int x0, int rating)
Build a monster nest.
Definition: gen-room.c:2174
char * name
Definition: generate.h:231
struct loc * tunn
Definition: generate.h:110
void set_marked_granite(struct chunk *c, int y, int x, int flag)
Place a square of granite with a flag.
Definition: gen-room.c:355
struct pit_forbidden_monster * next
Definition: generate.h:60
int con
Definition: generate.h:140
void place_random_stairs(struct chunk *c, int y, int x)
Place random stairs at (x, y).
Definition: gen-util.c:424
int tunn_n
Definition: generate.h:109
png_uint_32 i
Definition: libpng12/png.h:2821
int wall_n
Definition: generate.h:105
Definition: z-type.h:24
struct pit_forbidden_monster * forbidden_monsters
Forbidden monsters.
Definition: generate.h:83
int rarity
Definition: generate.h:198
struct chunk * chunk_find_name(char *name)
Find a chunk by name.
Definition: gen-chunk.c:122
bitflag forbidden_flags[RF_SIZE]
Forbidden flags.
Definition: generate.h:78
int door_n
Definition: generate.h:101
int mag
Definition: generate.h:149
Definition: generate.h:25
png_infop png_uint_32 flag
Definition: libpng12/png.h:2191
struct chunk * hard_centre_gen(struct player *p, int min_height, int min_width)
Generate a hard centre level - a greater vault surrounded by caverns.
Definition: gen-cave.c:2184
void place_closed_door(struct chunk *c, int y, int x)
Place a closed door at (x, y).
Definition: gen-util.c:526
void vault_traps(struct chunk *c, int y, int x, int yd, int xd, int num)
Place 'num' traps near (x, y), with a given displacement.
Definition: gen-util.c:717
static term_data data[MAX_TERM_DATA]
Definition: main-nds.c:156
Definition: generate.h:31
int room_type
Is this a pit or a nest?
Definition: generate.h:73
bool build_lesser_vault(struct chunk *c, int y0, int x0, int rating)
Build a lesser vault.
Definition: gen-room.c:2493
int rng
Definition: generate.h:148
Definition: generate.h:24
struct chunk *(* cave_builder)(struct player *p, int h, int w)
Definition: generate.h:158
void new_player_spot(struct chunk *c, struct player *p)
Place the player at a random starting location.
Definition: gen-util.c:339
bitflag spell_flags[RSF_SIZE]
Required spell flags.
Definition: generate.h:79
bool ** room_map
Definition: generate.h:123
Definition: game-world.h:24
bool build_circular(struct chunk *c, int y0, int x0, int rating)
Build a circular room (interior radius 4-7).
Definition: gen-room.c:1598
struct loc * wall
Definition: generate.h:106
int dun_unusual
Definition: generate.h:168
struct room_profile * next
Definition: generate.h:190
void generate_mark(struct chunk *c, int y1, int x1, int y2, int x2, int flag)
Mark a rectangle with a sqinfo flag.
Definition: gen-room.c:126
bool find_empty(struct chunk *c, int *y, int *x)
Locate an empty square for 0 <= y < ymax, 0 <= x < xmax.
Definition: gen-util.c:235
uint8_t byte
Definition: h-basic.h:167
#define RSF_SIZE
Definition: monster.h:128
#define h
int col_blocks
Definition: generate.h:120
int cutoff
Definition: generate.h:174
int rnd
Definition: generate.h:138
void place_secret_door(struct chunk *c, int y, int x)
Place a secret door at (x, y).
Definition: gen-util.c:514
static region area
Definition: ui-object.c:572
struct loc * door
Definition: generate.h:102
struct connector * join
Definition: generate.h:132
room_builder builder
Definition: generate.h:193
void set_pit_type(int depth, int type)
Pick a type of monster for pits (or other purposes), based on the level.
Definition: gen-room.c:800
Definition: generate.h:145
Definition: cave.h:160
struct pit_color_profile * next
Definition: generate.h:51
byte typ
Definition: generate.h:234
int width
Definition: generate.h:195
const char * name
Definition: generate.h:137
struct cave_profile * next
Definition: generate.h:162
int height
Definition: generate.h:195
struct monster_race * race
Definition: generate.h:62
int cutoff
Definition: generate.h:199
bool build_vault(struct chunk *c, int y0, int x0, struct vault *v)
Build a vault from its string representation.
Definition: gen-room.c:1133
bool mon_restrict(const char *monster_type, int depth, bool unique_ok)
Accept characters representing a race or group of monsters and an (adjusted) depth, and use these to set values for required monster base symbol.
Definition: gen-monster.c:115
const char * name
Definition: generate.h:192
struct vault * next
Definition: generate.h:207
byte wid
Definition: generate.h:239
Definition: cave.h:153
const struct cave_profile * profile
Definition: generate.h:94
byte dor
Definition: generate.h:240
int row_blocks
Definition: generate.h:119
Definition: generate.h:206
void place_gold(struct chunk *c, int y, int x, int level, byte origin)
Place a random amount of gold at (x, y).
Definition: gen-util.c:488
int dun_rooms
Definition: generate.h:167
Definition: generate.h:35
byte tval
Definition: generate.h:241
char * text
Definition: generate.h:232
void rand_dir(int *rdir, int *cdir)
Pick a random cardinal direction.
Definition: gen-util.c:310
Definition: generate.h:32
struct room_template * room_templates
Definition: generate.c:59
Monster color for a pit.
Definition: generate.h:50
void spread_monsters(struct chunk *c, const char *type, int depth, int num, int y0, int x0, int dy, int dx, byte origin)
Place monsters, up to the number asked for, in a rectangle centered on y0, x0.
Definition: gen-monster.c:199
struct chunk * classic_gen(struct player *p, int min_height, int min_width)
Generate a new dungeon level.
Definition: gen-cave.c:435
bool find_empty_range(struct chunk *c, int *y, int y1, int y2, int *x, int x1, int x2)
Locate an empty square for y1 <= y < y2, x1 <= x < x2.
Definition: gen-util.c:252
Profile for choosing monsters for pits, nests or other themed areas.
Definition: generate.h:68
void shuffle(int *arr, int n)
Shuffle an array using Knuth's shuffle.
Definition: gen-util.c:138
struct chunk * town_gen(struct player *p, int min_height, int min_width)
Town logic flow for generation of new town.
Definition: gen-cave.c:1581
Base monster type.
Definition: monster.h:193
bool alloc_object(struct chunk *c, int set, int typ, int depth, byte origin)
Allocates a single random object in the dungeon.
Definition: gen-util.c:619
struct pit_monster_profile * bases
List of vaild monster bases.
Definition: generate.h:81
const char * name
Definition: generate.h:164
bool build_template(struct chunk *c, int y0, int x0, int rating)
Build a template room.
Definition: gen-room.c:2464
struct pit_profile * next
Definition: generate.h:69
This tracks information needed to generate the room, including the room's name and the function used ...
Definition: generate.h:189
int type
Definition: mon-msg.c:80
byte rat
Definition: generate.h:236
byte color
Definition: generate.h:53
int num
Definition: libpng12/png.h:1527
struct chunk * cavern_gen(struct player *p, int min_height, int min_width)
Make a cavern level.
Definition: gen-cave.c:1379
Definition: generate.h:30
struct monster_base * base
Definition: generate.h:44
void vault_objects(struct chunk *c, int y, int x, int depth, int num)
Create up to 'num' objects near the given coordinates in a vault.
Definition: gen-util.c:659
Definition: z-set.c:24
Definition: generate.h:136
const char ** p[]
Definition: name.c:40
byte bitflag
Definition: z-bitflag.h:27
int obj_rarity
How rare objects are in this pit.
Definition: generate.h:76
void draw_rectangle(struct chunk *c, int y1, int x1, int y2, int x2, int feat, int flag)
Fill the edges of a rectangle with a feature.
Definition: gen-room.c:167
int block_size
Definition: generate.h:166
bool build_greater_vault(struct chunk *c, int y0, int x0, int rating)
Build a greater vaults.
Definition: gen-room.c:2544
void alloc_objects(struct chunk *c, int set, int typ, int num, int depth, byte origin)
Allocates 'num' random entities in the dungeon.
Definition: gen-util.c:597
bool build_moria(struct chunk *c, int y0, int x0, int rating)
Moria room (from Oangband).
Definition: gen-room.c:2578
#define w
int rating
Definition: generate.h:194
Flags, structures and variables for monsters.
int yx_to_i(int y, int x, int w)
Used to convert (x, y) into an array index (i) in a chunk of width w.
Definition: gen-util.c:117
bool(* square_predicate)(struct chunk *c, int y, int x)
square_predicate is a function pointer which tests a given square to see if the predicate in question...
Definition: cave.h:250
void fill_rectangle(struct chunk *c, int y1, int x1, int y2, int x2, int feat, int flag)
Fill a rectangle with a feature.
Definition: gen-room.c:147
const char * name
Definition: generate.h:72
bool chunk_copy(struct chunk *dest, struct chunk *source, int y0, int x0, int rotate, bool reflect)
Write a chunk, transformed, to a given offset in another chunk.
Definition: gen-chunk.c:207
void place_random_door(struct chunk *c, int y, int x)
Place a random door at (x, y).
Definition: gen-util.c:542
void i_to_yx(int i, int w, int *y, int *x)
Used to convert an array index (i) into (x, y) in a chunk of width w.
Definition: gen-util.c:128
int cent_n
Definition: generate.h:97
void place_object(struct chunk *c, int y, int x, int level, bool good, bool great, byte origin, int tval)
Place a random object at (x, y).
Definition: gen-util.c:443
cave_builder builder
Definition: generate.h:165
void chunk_list_add(struct chunk *c)
Add an entry to the chunk list - any problems with the length of this will be more in the memory used...
Definition: gen-chunk.c:68
bool build_crossed(struct chunk *c, int y0, int x0, int rating)
Builds a cross-shaped room.
Definition: gen-room.c:1789
bool build_medium_vault(struct chunk *c, int y0, int x0, int rating)
Build a medium vault.
Definition: gen-room.c:2508
int mc
Definition: generate.h:150
bool cave_find(struct chunk *c, int *y, int *x, square_predicate pred)
Locate a square in the dungeon which satisfies the given predicate.
Definition: gen-util.c:202
int block_hgt
Definition: generate.h:113
char * name
Definition: generate.h:209
bool mon_pit_hook(struct monster_race *race)
Hook for picking monsters appropriate to a nest/pit or region.
Definition: gen-room.c:737
int pit_num
Definition: generate.h:126
int ave
Level where this pit is most common.
Definition: generate.h:74
Monster forbidden from a pit.
Definition: generate.h:59
struct dun_data * dun
Definition: generate.c:58
bool build_staircase(struct chunk *c, int y0, int x0, int rating)
Room builders
Definition: gen-room.c:1562
bool chunk_find(struct chunk *c)
Find a chunk by pointer.
Definition: gen-chunk.c:138
bool pit
Definition: generate.h:197
struct chunk * chunk_write(struct chunk *c)
Write a the terrain info of a chunk to memory and return a pointer to it.
Definition: gen-chunk.c:45
char * typ
Definition: generate.h:212
int jct
Definition: generate.h:142
void vault_monsters(struct chunk *c, int y1, int x1, int depth, int num)
Place 'num' sleeping monsters near (x, y).
Definition: gen-util.c:733
int block_wid
Definition: generate.h:116
struct streamer_profile str
Definition: generate.h:172
Definition: generate.h:33
Definition: generate.h:23
bool build_simple(struct chunk *c, int y0, int x0, int rating)
Builds a normal rectangular room.
Definition: gen-room.c:1646
struct chunk * gauntlet_gen(struct player *p, int min_height, int min_width)
Generate a gauntlet level - two separate caverns with an unmappable labyrinth between them...
Definition: gen-cave.c:2488
int den
Definition: generate.h:147
struct chunk * chunk_find_adjacent(struct player *p, bool above)
Find the saved chunk above or below the current player depth.
Definition: gen-chunk.c:151
byte wid
Definition: generate.h:217
struct pit_profile * pit_type
Definition: generate.h:129
void chunk_validate_objects(struct chunk *c)
Validate that the chunk contains no NULL objects.
Definition: gen-chunk.c:331
void alloc_stairs(struct chunk *c, int feat, int num, int walls)
Place some staircases near walls.
Definition: gen-util.c:561
int qc
Definition: generate.h:152
bool build_large(struct chunk *c, int y0, int x0, int rating)
Build a large room with an inner room.
Definition: gen-room.c:1952
byte max_lev
Definition: generate.h:220
int n_room_profiles
Definition: generate.h:170
Structure to hold all "dungeon generation" data.
Definition: generate.h:92
bool build_interesting(struct chunk *c, int y0, int x0, int rating)
Build an interesting room.
Definition: gen-room.c:2480
Definition: generate.h:34
bool find_nearby_grid(struct chunk *c, int *y, int y0, int yd, int *x, int x0, int xd)
Locate a grid nearby (y0, x0) within +/- yd, xd.
Definition: gen-util.c:269
bool build_room_of_chambers(struct chunk *c, int y0, int x0, int rating)
Rooms of chambers.
Definition: gen-room.c:2667
byte hgt
Definition: generate.h:238
Information about template room generation.
Definition: generate.h:228
byte min_lev
Definition: generate.h:219
struct pit_monster_profile * next
Definition: generate.h:42
void get_vault_monsters(struct chunk *c, char racial_symbol[], char *vault_type, const char *data, int y1, int y2, int x1, int x2)
To avoid rebuilding the monster list too often (which can quickly get expensive), we handle monsters ...
Definition: gen-monster.c:275
int pen
Definition: generate.h:141
struct pit_color_profile * colors
List of valid monster colors.
Definition: generate.h:82
struct vault * vaults
Definition: generate.c:56
struct chunk * modified_gen(struct player *p, int min_height, int min_width)
Generate a new dungeon level.
Definition: gen-cave.c:1801
Intialize random names
Definition: init.c:756
struct room_profile * room_profiles
Definition: generate.h:173
byte get_angle_to_grid[41][41]
Accept values for y and x (considered as the endpoints of lines) between 0 and 40, and return an angle in degrees (divided by two).
Definition: gen-util.c:64
Most of the "player" information goes here.
Definition: player.h:450
int max_rarity
Definition: generate.h:169
void get_chamber_monsters(struct chunk *c, int y1, int x1, int y2, int x2, char *name, int area)
Funtion for placing appropriate monsters in a room of chambers.
Definition: gen-monster.c:332
struct chunk * lair_gen(struct player *p, int min_height, int min_width)
Generate a lair level - a regular cave generated with the modified algorithm, connected to a cavern w...
Definition: gen-cave.c:2345
void ensure_connectedness(struct chunk *c)
Make sure that all the regions of the dungeon are connected.
Definition: gen-cave.c:1303
struct pit_profile * pit_info
Definition: generate.c:55
int chg
Definition: generate.h:139
bool chunk_list_remove(char *name)
Remove an entry from the chunk list, return whether it was found.
Definition: gen-chunk.c:87
bitflag flags[RF_SIZE]
Required flags.
Definition: generate.h:77
Definition: generate.h:161
Definition: source.h:7
struct room_template * next
Definition: generate.h:229
bool build_huge(struct chunk *c, int y0, int x0, int rating)
A single starburst-shaped room of extreme size, usually dotted or even divided with irregularly-shape...
Definition: gen-room.c:2963
struct vault * random_vault(int depth, const char *typ)
Chooses a vault of a particular kind at random.
Definition: gen-room.c:75
byte rat
Definition: generate.h:214
bool build_pit(struct chunk *c, int y0, int x0, int rating)
Build a monster pit.
Definition: gen-room.c:2301
struct chunk * labyrinth_gen(struct player *p, int min_height, int min_width)
Build a labyrinth level.
Definition: gen-cave.c:829
void correct_dir(int *rdir, int *cdir, int y1, int x1, int y2, int x2)
Given two points, pick a valid cardinal direction from one to the other.
Definition: gen-util.c:288
int qua
Definition: generate.h:151
#define RF_SIZE
Definition: monster.h:96
bitflag forbidden_spell_flags[RSF_SIZE]
Forbidden spell flags.
Definition: generate.h:80
struct chunk * moria_gen(struct player *p, int min_height, int min_width)
Generate a new dungeon level.
Definition: gen-cave.c:2033
struct loc * cent
Definition: generate.h:98
Monster base for a pit.
Definition: generate.h:41
bool build_overlap(struct chunk *c, int y0, int x0, int rating)
Builds an overlapping rectangular room.
Definition: gen-room.c:1706
struct tunnel_profile tun
Definition: generate.h:171
bool generate_starburst_room(struct chunk *c, int y1, int x1, int y2, int x2, bool light, int feat, bool special_ok)
Make a starburst room.
Definition: gen-room.c:401