1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
20 | * |
20 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
22 | */ |
23 | |
23 | |
24 | /* random_map.c */ |
24 | /* random_map.c */ |
25 | extern void dump_layout (Layout layout); |
|
|
26 | extern Layout layoutgen (random_map_params *RP); |
|
|
27 | extern void roomify_layout (char **maze, random_map_params *RP); |
|
|
28 | extern int can_make_wall (char **maze, int dx, int dy, int dir, random_map_params *RP); |
|
|
29 | extern int make_wall (char **maze, int x, int y, int dir); |
25 | extern int make_wall (char **maze, int x, int y, int dir); |
30 | extern void doorify_layout (char **maze, random_map_params *RP); |
|
|
31 | extern void write_map_parameters_to_string (char *buf, random_map_params *RP); |
|
|
32 | 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, uint32_t random_seed_n, int treasureoptions_n, float difficulty_increase); |
|
|
33 | /* room_gen_onion.c */ |
26 | /* room_gen_onion.c */ |
34 | extern void map_gen_onion (Layout maze, int option, int layers); |
27 | extern void map_gen_onion (layout &maze, int option, int layers); |
35 | extern void centered_onion (char **maze, int xsize, int ysize, int option, int layers); |
|
|
36 | extern void bottom_centered_onion (char **maze, int xsize, int ysize, int option, int layers); |
|
|
37 | extern void draw_onion (char **maze, float *xlocations, float *ylocations, int layers); |
|
|
38 | extern void make_doors (char **maze, float *xlocations, float *ylocations, int layers, int options); |
|
|
39 | extern void bottom_right_centered_onion (char **maze, int xsize, int ysize, int option, int layers); |
|
|
40 | /* room_gen_spiral.c */ |
28 | /* room_gen_spiral.c */ |
41 | extern void map_gen_spiral (Layout maze, int option); |
29 | extern void map_gen_spiral (layout &maze, int option); |
42 | extern void connect_spirals (int xsize, int ysize, int sym, char **layout); |
|
|
43 | /* maze_gen.c */ |
30 | /* maze_gen.c */ |
44 | extern void maze_gen (Layout maze, int option); |
31 | extern void maze_gen (layout &maze, int full); |
45 | extern void make_wall_free_list (int xsize, int ysize); |
|
|
46 | extern void pop_wall_point (int *x, int *y); |
|
|
47 | extern int find_free_point (char **maze, int *x, int *y, int xc, int yc, int xsize, int ysize); |
|
|
48 | extern void fill_maze_full (char **maze, int x, int y, int xsize, int ysize); |
|
|
49 | extern void fill_maze_sparse (char **maze, int x, int y, int xsize, int ysize); |
|
|
50 | /* wall.c */ |
32 | /* wall.c */ |
51 | extern int surround_flag (char **layout, int i, int j, random_map_params *RP); |
33 | extern int surround_flag (const layout &maze, int i, int j); |
52 | extern int surround_flag2 (char **layout, int i, int j, random_map_params *RP); |
34 | extern int surround_flag2 (const layout &maze, int i, int j); |
53 | extern int surround_flag3 (maptile *map, sint16 i, sint16 j, random_map_params *RP); |
|
|
54 | extern int surround_flag4 (maptile *map, int i, int j, random_map_params *RP); |
35 | extern int surround_flag3 (maptile *map, int i, int j); |
55 | extern void make_map_walls (maptile *map, char **layout, char *w_style, random_map_params *RP); |
36 | extern void make_map_walls (maptile *map, layout &maze, const char *w_style, const char *m_style, random_map_params *RP); |
56 | extern object *pick_joined_wall (object *the_wall, char **layout, int i, int j, random_map_params *RP); |
|
|
57 | extern object *retrofit_joined_wall (maptile *the_map, int i, int j, int insert_flag, random_map_params *RP); |
37 | extern object *retrofit_joined_wall (maptile *the_map, int i, int j, int insert_flag, random_map_params *RP); |
58 | /* monster.c */ |
38 | /* monster.c */ |
59 | extern void place_monsters (maptile *map, char *monsterstyle, int difficulty, random_map_params *RP); |
39 | extern void place_monsters (maptile *map, char *monsterstyle, int difficulty, random_map_params *RP); |
60 | /* door.c */ |
40 | /* door.c */ |
61 | extern int surround_check2 (char **layout, int i, int j, int Xsize, int Ysize); |
|
|
62 | extern void put_doors (maptile *the_map, char **maze, const char *doorstyle, random_map_params *RP); |
41 | extern void put_doors (maptile *the_map, char **maze, const char *doorstyle, random_map_params *RP); |
63 | /* decor.c */ |
42 | /* decor.c */ |
64 | extern void put_decor (maptile *map, char **maze, char *decorstyle, int decor_option, random_map_params *RP); |
43 | extern void put_decor (maptile *map, char **maze, const char *decorstyle, int decor_option, random_map_params *RP); |
65 | /* exit.c */ |
44 | /* exit.c */ |
66 | extern void find_in_layout (int mode, char target, int *fx, int *fy, char **layout, random_map_params *RP); |
|
|
67 | extern void place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP); |
45 | extern void place_exits (maptile *map, char **maze, const char *exitstyle, int orientation, random_map_params *RP); |
68 | extern void unblock_exits (maptile *map, char **maze, random_map_params *RP); |
46 | extern void unblock_exits (maptile *map, char **maze, random_map_params *RP); |
69 | /* treasure.c */ |
47 | /* treasure.c */ |
70 | extern int wall_blocked (maptile *m, int x, int y); |
48 | extern int wall_blocked (maptile *m, int x, int y); |
71 | extern void place_treasure (maptile *map, char **layout, char *treasure_style, int treasureoptions, random_map_params *RP); |
49 | extern void place_treasure (maptile *map, char **maze, const char *treasure_style, int treasureoptions, random_map_params *RP); |
72 | extern object *place_chest (int treasureoptions, int x, int y, maptile *map, maptile *style_map, int n_treasures, random_map_params *RP); |
|
|
73 | extern object *find_closest_monster (maptile *map, int x, int y, random_map_params *RP); |
|
|
74 | extern int keyplace (maptile *map, int x, int y, char *keycode, int door_flag, int n_keys, random_map_params *RP); |
|
|
75 | extern object *find_monster_in_room_recursive (char **layout, maptile *map, int x, int y, random_map_params *RP); |
|
|
76 | extern object *find_monster_in_room (maptile *map, int x, int y, random_map_params *RP); |
|
|
77 | extern void find_spot_in_room_recursive (char **layout, int x, int y, random_map_params *RP); |
|
|
78 | extern void find_spot_in_room (maptile *map, int x, int y, int *kx, int *ky, random_map_params *RP); |
|
|
79 | extern void find_enclosed_spot (maptile *map, int *cx, int *cy, random_map_params *RP); |
|
|
80 | extern void remove_monsters (int x, int y, maptile *map); |
|
|
81 | extern object **surround_by_doors (maptile *map, char **layout, int x, int y, int opts); |
|
|
82 | extern object *door_in_square (maptile *map, int x, int y); |
|
|
83 | extern void find_doors_in_room_recursive (char **layout, maptile *map, int x, int y, object **doorlist, int *ndoors, random_map_params *RP); |
|
|
84 | extern object **find_doors_in_room (maptile *map, int x, int y, random_map_params *RP); |
|
|
85 | extern void lock_and_hide_doors (object **doorlist, maptile *map, int opts, random_map_params *RP); |
|
|
86 | /* special.c */ |
50 | /* special.c */ |
87 | extern void place_specials_in_map (maptile *map, char **layout, random_map_params *RP); |
51 | extern void place_specials_in_map (maptile *map, char **maze, random_map_params *RP); |
88 | /* rogue_layout.c */ |
52 | /* rogue_layout.c */ |
89 | extern int surround_check (char **layout, int i, int j, int Xsize, int Ysize); |
53 | extern int surround_check (char **maze, int i, int j, int Xsize, int Ysize); |
90 | extern void roguelike_layout_gen (Layout maze, int options); |
54 | extern void roguelike_layout_gen (layout &maze, int options); |
91 | /* snake.c */ |
55 | /* snake.c */ |
92 | extern void make_snake_layout (Layout maze, int options); |
56 | extern void make_snake_layout (layout &maze, int options); |
93 | /* square_spiral.c */ |
57 | /* square_spiral.c */ |
94 | extern void make_square_spiral_layout (Layout maze, int options); |
58 | extern void make_square_spiral_layout (layout &maze, int options); |
95 | /* expand2x.c */ |
59 | /* expand2x.c */ |
96 | extern void expand2x (Layout maze); |
60 | extern void expand2x (layout &maze); |
97 | |
61 | |