Crossfire Server, Branches 1.12  R18729
rproto.h
Go to the documentation of this file.
1 /* random_map.c */
2 extern void dump_layout(char **layout, RMParms *RP);
3 extern mapstruct *generate_random_map(const char *OutFileName, RMParms *RP, char **use_layout);
4 extern char **layoutgen(RMParms *RP);
5 extern char **symmetrize_layout(char **maze, int sym, RMParms *RP);
6 extern char **rotate_layout(char **maze, int rotation, RMParms *RP);
7 extern void roomify_layout(char **maze, RMParms *RP);
8 extern int can_make_wall(char **maze, int dx, int dy, int dir, RMParms *RP);
9 extern int make_wall(char **maze, int x, int y, int dir);
10 extern void doorify_layout(char **maze, RMParms *RP);
11 extern void write_map_parameters_to_string(RMParms *RP, char *buf, int size);
12 extern void write_parameters_to_string(char *buf, int xsize_n, int ysize_n, const char *wallstyle_n, const char *floorstyle_n, const char *monsterstyle_n, const char *treasurestyle_n, const char *layoutstyle_n, const char *decorstyle_n, const char *doorstyle_n, const char *exitstyle_n, const char *final_map_n, const char *exit_on_final_map_n, const char *this_map_n, int layoutoptions1_n, int layoutoptions2_n, int layoutoptions3_n, int symmetry_n, int dungeon_depth_n, int dungeon_level_n, int difficulty_n, int difficulty_given_n, int decoroptions_n, int orientation_n, int origin_x_n, int origin_y_n, int random_seed_n, int treasureoptions_n, float difficulty_increase);
13 /* room_gen_onion.c */
14 extern char **map_gen_onion(int xsize, int ysize, int option, int layers);
15 extern void centered_onion(char **maze, int xsize, int ysize, int option, int layers);
16 extern void bottom_centered_onion(char **maze, int xsize, int ysize, int option, int layers);
17 extern void draw_onion(char **maze, float *xlocations, float *ylocations, int layers);
18 extern void make_doors(char **maze, float *xlocations, float *ylocations, int layers, int options);
19 extern void bottom_right_centered_onion(char **maze, int xsize, int ysize, int option, int layers);
20 /* room_gen_spiral.c */
21 extern char **map_gen_spiral(int xsize, int ysize, int option);
22 extern void connect_spirals(int xsize, int ysize, int sym, char **layout);
23 /* maze_gen.c */
24 extern char **maze_gen(int xsize, int ysize, int option);
25 /* floor.c */
26 extern mapstruct *make_map_floor(char **layout, char *floorstyle, RMParms *RP);
27 /* wall.c */
28 extern int surround_flag(char **layout, int i, int j, RMParms *RP);
29 extern int surround_flag2(char **layout, int i, int j, RMParms *RP);
30 extern int surround_flag3(mapstruct *map, int i, int j, RMParms *RP);
31 extern int surround_flag4(mapstruct *map, int i, int j, RMParms *RP);
32 extern void make_map_walls(mapstruct *map, char **layout, char *w_style, RMParms *RP);
33 extern object *pick_joined_wall(object *the_wall, char **layout, int i, int j, RMParms *RP);
34 extern object *retrofit_joined_wall(mapstruct *the_map, int i, int j, int insert_flag, RMParms *RP);
35 /* monster.c */
36 extern void insert_multisquare_ob_in_map(object *new_obj, mapstruct *map);
37 extern void place_monsters(mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP);
38 /* door.c */
39 extern int surround_check2(char **layout, int i, int j, int Xsize, int Ysize);
40 extern void put_doors(mapstruct *the_map, char **maze, const char *doorstyle, RMParms *RP);
41 /* decor.c */
42 extern int obj_count_in_map(mapstruct *map, int x, int y);
43 extern void put_decor(mapstruct *map, char **maze, char *decorstyle, int decor_option, RMParms *RP);
44 /* exit.c */
45 extern void find_in_layout(int mode, char target, int *fx, int *fy, char **layout, RMParms *RP);
46 extern void place_exits(mapstruct *map, char **maze, char *exitstyle, int orientation, RMParms *RP);
47 extern void unblock_exits(mapstruct *map, char **maze, RMParms *RP);
48 /* treasure.c */
49 extern int wall_blocked(mapstruct *m, int x, int y);
50 extern void place_treasure(mapstruct *map, char **layout, char *treasure_style, int treasureoptions, RMParms *RP);
51 extern object *place_chest(int treasureoptions, int x, int y, mapstruct *map, mapstruct *style_map, int n_treasures, RMParms *RP);
52 extern object *find_closest_monster(mapstruct *map, int x, int y, RMParms *RP);
53 extern int keyplace(mapstruct *map, int x, int y, char *keycode, int door_flag, int n_keys, RMParms *RP);
54 extern object *find_monster_in_room_recursive(char **layout, mapstruct *map, int x, int y, RMParms *RP);
55 extern object *find_monster_in_room(mapstruct *map, int x, int y, RMParms *RP);
56 extern int find_spot_in_room(mapstruct *map, int x, int y, int *kx, int *ky, RMParms *RP);
57 extern void find_enclosed_spot(mapstruct *map, int *cx, int *cy, RMParms *RP);
58 extern void remove_monsters(int x, int y, mapstruct *map);
59 extern void find_doors_in_room_recursive(char **layout, mapstruct *map, int x, int y, object **doorlist, int *ndoors, RMParms *RP);
60 extern object **find_doors_in_room(mapstruct *map, int x, int y, RMParms *RP);
61 extern void lock_and_hide_doors(object **doorlist, mapstruct *map, int opts, RMParms *RP);
62 /* special.c */
63 extern void nuke_map_region(mapstruct *map, int xstart, int ystart, int xsize, int ysize);
64 extern void include_map_in_map(mapstruct *dest_map, mapstruct *in_map, int x, int y);
65 extern int find_spot_for_submap(mapstruct *map, char **layout, int *ix, int *iy, int xsize, int ysize);
66 extern void place_fountain_with_specials(mapstruct *map);
67 extern void place_special_exit(mapstruct *map, int hole_type, RMParms *RP);
68 extern void place_specials_in_map(mapstruct *map, char **layout, RMParms *RP);
69 /* style.c */
70 extern int load_dir(const char *dir, char ***namelist, int skip_dirs);
71 extern mapstruct *load_style_map(char *style_name);
72 extern mapstruct *find_style(const char *dirname, const char *stylename, int difficulty);
73 extern object *pick_random_object(mapstruct *style);
74 extern void free_style_maps(void);
75 /* rogue_layout.c */
76 extern int surround_check(char **layout, int i, int j, int Xsize, int Ysize);
77 extern char **roguelike_layout_gen(int xsize, int ysize, int options);
78 /* snake.c */
79 extern char **make_snake_layout(int xsize, int ysize);
80 /* square_spiral.c */
81 extern void find_top_left_corner(char **maze, int *cx, int *cy);
82 extern char **make_square_spiral_layout(int xsize, int ysize);
83 /* expand2x.c */
84 extern char **expand2x(char **layout, int xsize, int ysize);
char ** roguelike_layout_gen(int xsize, int ysize, int options)
Definition: rogue_layout.c:69
void draw_onion(char **maze, float *xlocations, float *ylocations, int layers)
mapstruct * generate_random_map(const char *OutFileName, RMParms *RP, char **use_layout)
Definition: random_map.c:80
mapstruct * make_map_floor(char **layout, char *floorstyle, RMParms *RP)
Definition: floor.c:89
void remove_monsters(int x, int y, mapstruct *map)
Definition: treasure.c:722
void place_fountain_with_specials(mapstruct *map)
Definition: special.c:192
static struct Command_Line_Options options[]
Definition: init.c:234
void place_treasure(mapstruct *map, char **layout, char *treasure_style, int treasureoptions, RMParms *RP)
Definition: treasure.c:101
void find_top_left_corner(char **maze, int *cx, int *cy)
Definition: square_spiral.c:68
void unblock_exits(mapstruct *map, char **maze, RMParms *RP)
Definition: exit.c:392
void doorify_layout(char **maze, RMParms *RP)
Definition: random_map.c:636
void dump_layout(char **layout, RMParms *RP)
Definition: random_map.c:53
char ** symmetrize_layout(char **maze, int sym, RMParms *RP)
Definition: random_map.c:327
char ** make_snake_layout(int xsize, int ysize)
Definition: snake.c:20
void place_monsters(mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP)
Definition: monster.c:89
mapstruct * load_style_map(char *style_name)
Definition: style.c:131
int surround_flag4(mapstruct *map, int i, int j, RMParms *RP)
Definition: wall.c:153
void make_map_walls(mapstruct *map, char **layout, char *w_style, RMParms *RP)
Definition: wall.c:180
int find_spot_for_submap(mapstruct *map, char **layout, int *ix, int *iy, int xsize, int ysize)
Definition: special.c:141
char ** maze_gen(int xsize, int ysize, int option)
Definition: maze_gen.c:68
object * pick_random_object(mapstruct *style)
Definition: style.c:275
void bottom_right_centered_onion(char **maze, int xsize, int ysize, int option, int layers)
void find_enclosed_spot(mapstruct *map, int *cx, int *cy, RMParms *RP)
Definition: treasure.c:653
object * find_monster_in_room_recursive(char **layout, mapstruct *map, int x, int y, RMParms *RP)
Definition: treasure.c:465
char ** make_square_spiral_layout(int xsize, int ysize)
Definition: square_spiral.c:90
void include_map_in_map(mapstruct *dest_map, mapstruct *in_map, int x, int y)
Definition: special.c:100
void connect_spirals(int xsize, int ysize, int sym, char **layout)
object ** find_doors_in_room(mapstruct *map, int x, int y, RMParms *RP)
Definition: treasure.c:871
int surround_flag3(mapstruct *map, int i, int j, RMParms *RP)
Definition: wall.c:120
void put_doors(mapstruct *the_map, char **maze, const char *doorstyle, RMParms *RP)
Definition: door.c:80
void write_parameters_to_string(char *buf, int xsize_n, int ysize_n, const char *wallstyle_n, const char *floorstyle_n, const char *monsterstyle_n, const char *treasurestyle_n, const char *layoutstyle_n, const char *decorstyle_n, const char *doorstyle_n, const char *exitstyle_n, const char *final_map_n, const char *exit_on_final_map_n, const char *this_map_n, int layoutoptions1_n, int layoutoptions2_n, int layoutoptions3_n, int symmetry_n, int dungeon_depth_n, int dungeon_level_n, int difficulty_n, int difficulty_given_n, int decoroptions_n, int orientation_n, int origin_x_n, int origin_y_n, int random_seed_n, int treasureoptions_n, float difficulty_increase)
Definition: random_map.c:877
int load_dir(const char *dir, char ***namelist, int skip_dirs)
Definition: style.c:83
object * place_chest(int treasureoptions, int x, int y, mapstruct *map, mapstruct *style_map, int n_treasures, RMParms *RP)
Definition: treasure.c:232
int surround_flag2(char **layout, int i, int j, RMParms *RP)
Definition: wall.c:88
void insert_multisquare_ob_in_map(object *new_obj, mapstruct *map)
Definition: monster.c:49
object * retrofit_joined_wall(mapstruct *the_map, int i, int j, int insert_flag, RMParms *RP)
Definition: wall.c:362
void place_exits(mapstruct *map, char **maze, char *exitstyle, int orientation, RMParms *RP)
Definition: exit.c:153
void place_special_exit(mapstruct *map, int hole_type, RMParms *RP)
Definition: special.c:235
char ** rotate_layout(char **maze, int rotation, RMParms *RP)
Definition: random_map.c:403
char ** map_gen_spiral(int xsize, int ysize, int option)
void find_in_layout(int mode, char target, int *fx, int *fy, char **layout, RMParms *RP)
Definition: exit.c:58
void make_doors(char **maze, float *xlocations, float *ylocations, int layers, int options)
void write_map_parameters_to_string(RMParms *RP, char *buf, int size)
Definition: random_map.c:689
int keyplace(mapstruct *map, int x, int y, char *keycode, int door_flag, int n_keys, RMParms *RP)
Definition: treasure.c:361
int obj_count_in_map(mapstruct *map, int x, int y)
Definition: decor.c:51
char ** expand2x(char **layout, int xsize, int ysize)
Definition: expand2x.c:39
char ** map_gen_onion(int xsize, int ysize, int option, int layers)
int wall_blocked(mapstruct *m, int x, int y)
Definition: treasure.c:73
void put_decor(mapstruct *map, char **maze, char *decorstyle, int decor_option, RMParms *RP)
Definition: decor.c:76
object * find_monster_in_room(mapstruct *map, int x, int y, RMParms *RP)
Definition: treasure.c:513
char ** layoutgen(RMParms *RP)
Definition: random_map.c:203
void centered_onion(char **maze, int xsize, int ysize, int option, int layers)
int surround_check(char **layout, int i, int j, int Xsize, int Ysize)
Definition: rogue_layout.c:44
object * find_closest_monster(mapstruct *map, int x, int y, RMParms *RP)
Definition: treasure.c:311
object * pick_joined_wall(object *the_wall, char **layout, int i, int j, RMParms *RP)
Definition: wall.c:241
void lock_and_hide_doors(object **doorlist, mapstruct *map, int opts, RMParms *RP)
Definition: treasure.c:952
int find_spot_in_room(mapstruct *map, int x, int y, int *kx, int *ky, RMParms *RP)
Definition: treasure.c:600
void free_style_maps(void)
Definition: style.c:300
void place_specials_in_map(mapstruct *map, char **layout, RMParms *RP)
Definition: special.c:323
void find_doors_in_room_recursive(char **layout, mapstruct *map, int x, int y, object **doorlist, int *ndoors, RMParms *RP)
Definition: treasure.c:824
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
Definition: style.c:177
void bottom_centered_onion(char **maze, int xsize, int ysize, int option, int layers)
int surround_flag(char **layout, int i, int j, RMParms *RP)
Definition: wall.c:56
void roomify_layout(char **maze, RMParms *RP)
Definition: random_map.c:471
void nuke_map_region(mapstruct *map, int xstart, int ystart, int xsize, int ysize)
Definition: special.c:70
Definition: map.h:346
int surround_check2(char **layout, int i, int j, int Xsize, int Ysize)
Definition: door.c:55
int make_wall(char **maze, int x, int y, int dir)
Definition: random_map.c:602
int can_make_wall(char **maze, int dx, int dy, int dir, RMParms *RP)
Definition: random_map.c:516