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 };
131 
132 
134  const char *name;
135  int rnd;
136  int chg;
137  int con;
138  int pen;
139  int jct;
140 };
141 
143  const char *name;
144  int den;
145  int rng;
146  int mag;
147  int mc;
148  int qua;
149  int qc;
150 };
151 
152 /*
153  * cave_builder is a function pointer which builds a level.
154  */
155 typedef struct chunk * (*cave_builder) (struct player *p);
156 
157 
158 struct cave_profile {
160 
161  const char *name;
164  int dun_rooms;
171  int cutoff;
172 };
173 
174 
179 typedef bool (*room_builder) (struct chunk *c, int y0, int x0, int rating);
180 
181 
186 struct room_profile {
188 
189  const char *name;
191  int rating;
192  int height, width;
193  int level;
194  bool pit;
195  int rarity;
196  int cutoff;
197 };
198 
199 
200 /*
201  * Information about vault generation
202  */
203 struct vault {
204  struct vault *next;
206  char *name;
207  char *text;
209  char *typ;
218 };
219 
220 
221 
226  struct room_template *next;
228  char *name;
229  char *text;
239 };
240 
241 extern struct dun_data *dun;
242 extern struct vault *vaults;
243 extern struct room_template *room_templates;
244 
245 /* gen-cave.c */
246 struct chunk *town_gen(struct player *p);
247 struct chunk *classic_gen(struct player *p);
248 struct chunk *labyrinth_gen(struct player *p);
249 void ensure_connectedness(struct chunk *c);
250 struct chunk *cavern_gen(struct player *p);
251 struct chunk *modified_gen(struct player *p);
252 struct chunk *moria_gen(struct player *p);
253 struct chunk *hard_centre_gen(struct player *p);
254 struct chunk *lair_gen(struct player *p);
255 struct chunk *gauntlet_gen(struct player *p);
256 
257 /* gen-chunk.c */
258 struct chunk *chunk_write(int y0, int x0, int height, int width, bool monsters,
259  bool objects, bool traps);
260 void chunk_list_add(struct chunk *c);
261 bool chunk_list_remove(char *name);
262 struct chunk *chunk_find_name(char *name);
263 bool chunk_find(struct chunk *c);
264 bool chunk_copy(struct chunk *dest, struct chunk *source, int y0, int x0,
265  int rotate, bool reflect);
266 
267 void chunk_validate_objects(struct chunk *c);
268 
269 
270 /* gen-room.c */
271 void fill_rectangle(struct chunk *c, int y1, int x1, int y2, int x2, int feat,
272  int flag);
273 void generate_mark(struct chunk *c, int y1, int x1, int y2, int x2, int flag);
274 void draw_rectangle(struct chunk *c, int y1, int x1, int y2, int x2, int feat,
275  int flag);
276 void set_marked_granite(struct chunk *c, int y, int x, int flag);
277 extern bool generate_starburst_room(struct chunk *c, int y1, int x1, int y2,
278  int x2, bool light, int feat,
279  bool special_ok);
280 
281 struct vault *random_vault(int depth, const char *typ);
282 bool build_vault(struct chunk *c, int y0, int x0, struct vault *v);
283 
284 bool build_simple(struct chunk *c, int y0, int x0, int rating);
285 bool build_circular(struct chunk *c, int y0, int x0, int rating);
286 bool build_overlap(struct chunk *c, int y0, int x0, int rating);
287 bool build_crossed(struct chunk *c, int y0, int x0, int rating);
288 bool build_large(struct chunk *c, int y0, int x0, int rating);
289 bool mon_pit_hook(struct monster_race *race);
290 void set_pit_type(int depth, int type);
291 bool build_nest(struct chunk *c, int y0, int x0, int rating);
292 bool build_pit(struct chunk *c, int y0, int x0, int rating);
293 bool build_template(struct chunk *c, int y0, int x0, int rating);
294 bool build_interesting(struct chunk *c, int y0, int x0, int rating);
295 bool build_lesser_vault(struct chunk *c, int y0, int x0, int rating);
296 bool build_medium_vault(struct chunk *c, int y0, int x0, int rating);
297 bool build_greater_vault(struct chunk *c, int y0, int x0, int rating);
298 bool build_moria(struct chunk *c, int y0, int x0, int rating);
299 bool build_room_of_chambers(struct chunk *c, int y0, int x0, int rating);
300 bool build_huge(struct chunk *c, int y0, int x0, int rating);
301 bool room_build(struct chunk *c, int by0, int bx0, struct room_profile profile,
302  bool finds_own_space);
303 
304 
305 /* gen-util.c */
306 extern byte get_angle_to_grid[41][41];
307 
308 int yx_to_i(int y, int x, int w);
309 void i_to_yx(int i, int w, int *y, int *x);
310 void shuffle(int *arr, int n);
311 bool cave_find(struct chunk *c, int *y, int *x, square_predicate pred);
312 bool cave_find_in_range(struct chunk *c, int *y, int y1, int y2, int *x, int x1,
313  int x2, square_predicate pred);
314 bool find_empty(struct chunk *c, int *y, int *x);
315 bool find_empty_range(struct chunk *c, int *y, int y1, int y2, int *x, int x1, int x2);
316 bool find_nearby_grid(struct chunk *c, int *y, int y0, int yd, int *x, int x0, int xd);
317 void correct_dir(int *rdir, int *cdir, int y1, int x1, int y2, int x2);
318 void rand_dir(int *rdir, int *cdir);
319 void new_player_spot(struct chunk *c, struct player *p);
320 void place_object(struct chunk *c, int y, int x, int level, bool good,
321  bool great, byte origin, int tval);
322 void place_gold(struct chunk *c, int y, int x, int level, byte origin);
323 void place_secret_door(struct chunk *c, int y, int x);
324 void place_closed_door(struct chunk *c, int y, int x);
325 void place_random_door(struct chunk *c, int y, int x);
326 void place_random_stairs(struct chunk *c, int y, int x);
327 void alloc_stairs(struct chunk *c, int feat, int num, int walls);
328 void vault_objects(struct chunk *c, int y, int x, int depth, int num);
329 void vault_traps(struct chunk *c, int y, int x, int yd, int xd, int num);
330 void vault_monsters(struct chunk *c, int y1, int x1, int depth, int num);
331 void alloc_objects(struct chunk *c, int set, int typ, int num, int depth, byte origin);
332 bool alloc_object(struct chunk *c, int set, int typ, int depth, byte origin);
333 
334 /* gen-monster.c */
335 bool mon_restrict(const char *monster_type, int depth, bool unique_ok);
336 void spread_monsters(struct chunk *c, const char *type, int depth, int num,
337  int y0, int x0, int dy, int dx, byte origin);
338 void get_vault_monsters(struct chunk *c, char racial_symbol[], char *vault_type,
339  const char *data, int y1, int y2, int x1, int x2);
340 void get_chamber_monsters(struct chunk *c, int y1, int x1, int y2, int x2, char *name, int area);
341 
342 
343 #endif /* !GENERATE_H */
int level
Definition: generate.h:193
const char * name
Definition: generate.h:143
byte hgt
Definition: generate.h:213
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:2969
png_infop png_charpp int png_charpp profile
Definition: libpng12/png.h:2414
int rarity
How unusual this pit is.
Definition: generate.h:75
struct object ** objects
Definition: cave.h:167
char * text
Definition: generate.h:207
int pit_idx
Index in pit_info.
Definition: generate.h:71
Monster "race" information, including racial memories.
Definition: monster.h:266
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:179
bool build_nest(struct chunk *c, int y0, int x0, int rating)
Build a monster nest.
Definition: gen-room.c:2095
char * name
Definition: generate.h:228
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
Use the roguelike command false Show damage player deals to false Always pickup false Show flavors in object false Highlight player with cursor between false Show walls as solid false false Center map false Automatically clear more false Allow mouse clicks to move the true false false false false false Generate a random artifact false Force player false Restrict creation of false Lose artifacts when leaving level
Definition: list-options.h:86
int con
Definition: generate.h:137
void place_random_stairs(struct chunk *c, int y, int x)
Place random stairs at (x, y).
Definition: gen-util.c:417
int tunn_n
Definition: generate.h:109
png_uint_32 i
Definition: libpng12/png.h:2821
int wall_n
Definition: generate.h:105
struct chunk * classic_gen(struct player *p)
Generate a new dungeon level.
Definition: gen-cave.c:435
Definition: z-type.h:24
struct pit_forbidden_monster * forbidden_monsters
Forbidden monsters.
Definition: generate.h:83
int rarity
Definition: generate.h:195
struct chunk * chunk_find_name(char *name)
Find a chunk by name.
Definition: gen-chunk.c:181
bitflag forbidden_flags[RF_SIZE]
Forbidden flags.
Definition: generate.h:78
int door_n
Definition: generate.h:101
int mag
Definition: generate.h:146
struct chunk * chunk_write(int y0, int x0, int height, int width, bool monsters, bool objects, bool traps)
Write a chunk to memory and return a pointer to it.
Definition: gen-chunk.c:51
Definition: generate.h:25
png_infop png_uint_32 flag
Definition: libpng12/png.h:2191
void place_closed_door(struct chunk *c, int y, int x)
Place a closed door at (x, y).
Definition: gen-util.c:514
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:704
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:2414
struct chunk * hard_centre_gen(struct player *p)
Generate a hard centre level - a greater vault surrounded by caverns.
Definition: gen-cave.c:2133
int rng
Definition: generate.h:145
Definition: generate.h:24
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
bool build_circular(struct chunk *c, int y0, int x0, int rating)
Room builders
Definition: gen-room.c:1519
struct loc * wall
Definition: generate.h:106
int dun_unusual
Definition: generate.h:165
struct room_profile * next
Definition: generate.h:187
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
int col_blocks
Definition: generate.h:120
int cutoff
Definition: generate.h:171
int rnd
Definition: generate.h:135
void place_secret_door(struct chunk *c, int y, int x)
Place a secret door at (x, y).
Definition: gen-util.c:502
static region area
Definition: ui-object.c:574
struct loc * door
Definition: generate.h:102
room_builder builder
Definition: generate.h:190
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:798
Use the roguelike command false Show damage player deals to monsters
Definition: list-options.h:18
Definition: generate.h:142
Definition: cave.h:147
struct pit_color_profile * next
Definition: generate.h:51
byte typ
Definition: generate.h:231
int width
Definition: generate.h:192
const char * name
Definition: generate.h:134
struct cave_profile * next
Definition: generate.h:159
int height
Definition: generate.h:192
struct monster_race * race
Definition: generate.h:62
int cutoff
Definition: generate.h:196
bool build_vault(struct chunk *c, int y0, int x0, struct vault *v)
Build a vault from its string representation.
Definition: gen-room.c:1091
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:189
struct vault * next
Definition: generate.h:204
byte wid
Definition: generate.h:236
const struct cave_profile * profile
Definition: generate.h:94
byte dor
Definition: generate.h:237
int row_blocks
Definition: generate.h:119
Definition: generate.h:203
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:476
int dun_rooms
Definition: generate.h:164
Definition: generate.h:35
byte tval
Definition: generate.h:238
char * text
Definition: generate.h:229
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:57
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
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
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:606
struct pit_monster_profile * bases
List of vaild monster bases.
Definition: generate.h:81
const char * name
Definition: generate.h:161
bool build_template(struct chunk *c, int y0, int x0, int rating)
Build a template room.
Definition: gen-room.c:2385
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:186
int type
Definition: mon-msg.c:80
byte rat
Definition: generate.h:233
struct chunk * modified_gen(struct player *p)
Generate a new dungeon level.
Definition: gen-cave.c:1762
byte color
Definition: generate.h:53
int num
Definition: libpng12/png.h:1527
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:646
Definition: z-set.c:24
Definition: generate.h:133
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:163
struct chunk * lair_gen(struct player *p)
Generate a lair level - a regular cave generated with the modified algorithm, connected to a cavern w...
Definition: gen-cave.c:2288
bool build_greater_vault(struct chunk *c, int y0, int x0, int rating)
Build a greater vaults.
Definition: gen-room.c:2465
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:585
bool build_moria(struct chunk *c, int y0, int x0, int rating)
Moria room (from Oangband).
Definition: gen-room.c:2499
#define w
int rating
Definition: generate.h:191
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:235
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:251
void place_random_door(struct chunk *c, int y, int x)
Place a random door at (x, y).
Definition: gen-util.c:530
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:436
cave_builder builder
Definition: generate.h:162
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:129
bool build_crossed(struct chunk *c, int y0, int x0, int rating)
Builds a cross-shaped room.
Definition: gen-room.c:1710
bool build_medium_vault(struct chunk *c, int y0, int x0, int rating)
Build a medium vault.
Definition: gen-room.c:2429
int mc
Definition: generate.h:147
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:206
bool mon_pit_hook(struct monster_race *race)
Hook for picking monsters appropriate to a nest/pit or region.
Definition: gen-room.c:735
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 chunk * labyrinth_gen(struct player *p)
Build a labyrinth level.
Definition: gen-cave.c:826
struct dun_data * dun
Definition: generate.c:56
bool chunk_find(struct chunk *c)
Find a chunk by pointer.
Definition: gen-chunk.c:197
bool pit
Definition: generate.h:194
char * typ
Definition: generate.h:209
int jct
Definition: generate.h:139
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:720
int block_wid
Definition: generate.h:116
struct streamer_profile str
Definition: generate.h:169
Definition: generate.h:33
Definition: generate.h:23
struct chunk * moria_gen(struct player *p)
Generate a new dungeon level.
Definition: gen-cave.c:1986
bool build_simple(struct chunk *c, int y0, int x0, int rating)
Builds a normal rectangular room.
Definition: gen-room.c:1567
struct chunk * cavern_gen(struct player *p)
Make a cavern level.
Definition: gen-cave.c:1367
int den
Definition: generate.h:144
byte wid
Definition: generate.h:214
struct pit_profile * pit_type
Definition: generate.h:129
png_infop png_uint_32 png_uint_32 * height
Definition: libpng12/png.h:2341
void chunk_validate_objects(struct chunk *c)
Validate that the chunk contains no NULL objects.
Definition: gen-chunk.c:375
void alloc_stairs(struct chunk *c, int feat, int num, int walls)
Place some staircases near walls.
Definition: gen-util.c:549
int qc
Definition: generate.h:149
bool build_large(struct chunk *c, int y0, int x0, int rating)
Build a large room with an inner room.
Definition: gen-room.c:1873
byte max_lev
Definition: generate.h:217
int n_room_profiles
Definition: generate.h:167
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:2401
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
png_infop png_uint_32 * width
Definition: libpng12/png.h:2341
bool build_room_of_chambers(struct chunk *c, int y0, int x0, int rating)
Rooms of chambers.
Definition: gen-room.c:2588
byte hgt
Definition: generate.h:235
struct chunk *(* cave_builder)(struct player *p)
Definition: generate.h:155
Information about template room generation.
Definition: generate.h:225
byte min_lev
Definition: generate.h:216
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:138
struct pit_color_profile * colors
List of valid monster colors.
Definition: generate.h:82
struct vault * vaults
Definition: generate.c:54
Intialize random names
Definition: init.c:656
struct room_profile * room_profiles
Definition: generate.h:170
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:452
int max_rarity
Definition: generate.h:166
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
void ensure_connectedness(struct chunk *c)
Make sure that all the regions of the dungeon are connected.
Definition: gen-cave.c:1291
struct pit_profile * pit_info
Definition: generate.c:53
int chg
Definition: generate.h:136
bool chunk_list_remove(char *name)
Remove an entry from the chunk list, return whether it was found.
Definition: gen-chunk.c:148
bitflag flags[RF_SIZE]
Required flags.
Definition: generate.h:77
Definition: generate.h:158
Definition: source.h:7
struct room_template * next
Definition: generate.h:226
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:2884
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:211
bool build_pit(struct chunk *c, int y0, int x0, int rating)
Build a monster pit.
Definition: gen-room.c:2222
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:148
bool cave_find_in_range(struct chunk *c, int *y, int y1, int y2, int *x, int x1, int x2, square_predicate pred)
Locate a square in y1 <= y < y2, x1 <= x < x2 which satisfies the given predicate.
Definition: gen-util.c:221
#define RF_SIZE
Definition: monster.h:96
bitflag forbidden_spell_flags[RSF_SIZE]
Forbidden spell flags.
Definition: generate.h:80
struct chunk * town_gen(struct player *p)
Town logic flow for generation of new town.
Definition: gen-cave.c:1562
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:1627
struct tunnel_profile tun
Definition: generate.h:168
struct chunk * gauntlet_gen(struct player *p)
Generate a gauntlet level - two separate caverns with an unmappable labyrinth between them...
Definition: gen-cave.c:2424
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