ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/rproto.h
(Generate patch)

Comparing deliantra/server/random_maps/rproto.h (file contents):
Revision 1.7 by root, Mon May 28 21:15:57 2007 UTC vs.
Revision 1.20 by root, Tue Apr 13 02:39:53 2010 UTC

1/* 1/*
2 * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT 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 * Crossfire TRT is free software; you can redistribute it and/or modify it 8 * Deliantra is free software: you can redistribute it and/or modify
9 * under the terms of the GNU General Public License as published by the Free 9 * it under the terms of the GNU General Public License as published by
10 * Software Foundation; either version 2 of the License, or (at your option) 10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version. 11 * (at your option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, but 13 * This program is distributed in the hope that it will be useful,
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License along 18 * You should have received a copy of the GNU General Public License
19 * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 * 20 *
22 * The authors can be reached via e-mail to <crossfire@schmorp.de> 21 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 22 */
24 23
25/* random_map.c */ 24/* random_map.c */
26extern void dump_layout(char **layout, random_map_params *RP); 25extern void dump_layout (Layout layout);
27extern char **layoutgen(random_map_params *RP);
28extern char **symmetrize_layout(char **maze, int sym, random_map_params *RP);
29extern char **rotate_layout(char **maze, int rotation, random_map_params *RP);
30extern void roomify_layout(char **maze, random_map_params *RP);
31extern int can_make_wall(char **maze, int dx, int dy, int dir, random_map_params *RP);
32extern int make_wall(char **maze, int x, int y, int dir); 26extern int make_wall (char **maze, int x, int y, int dir);
33extern void doorify_layout(char **maze, random_map_params *RP);
34extern void write_map_parameters_to_string(char *buf, random_map_params *RP); 27extern void write_map_parameters_to_string (char *buf, random_map_params *RP);
35extern 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);
36extern void copy_object_with_inv(object *src_ob, object *dest_ob);
37/* room_gen_onion.c */ 28/* room_gen_onion.c */
38extern char **map_gen_onion(int xsize, int ysize, int option, int layers); 29extern void map_gen_onion (Layout maze, int option, int layers);
39extern void centered_onion(char **maze, int xsize, int ysize, int option, int layers);
40extern void bottom_centered_onion(char **maze, int xsize, int ysize, int option, int layers);
41extern void draw_onion(char **maze, float *xlocations, float *ylocations, int layers);
42extern void make_doors(char **maze, float *xlocations, float *ylocations, int layers, int options);
43extern void bottom_right_centered_onion(char **maze, int xsize, int ysize, int option, int layers);
44/* room_gen_spiral.c */ 30/* room_gen_spiral.c */
45extern char **map_gen_spiral(int xsize, int ysize, int option); 31extern void map_gen_spiral (Layout maze, int option);
46extern void connect_spirals(int xsize, int ysize, int sym, char **layout); 32extern void connect_spirals (int xsize, int ysize, int sym, char **layout);
47/* maze_gen.c */ 33/* maze_gen.c */
48extern char **maze_gen(int xsize, int ysize, int option); 34extern void maze_gen (Layout maze, int option);
49extern void make_wall_free_list(int xsize, int ysize);
50extern void pop_wall_point(int *x, int *y);
51extern int find_free_point(char **maze, int *x, int *y, int xc, int yc, int xsize, int ysize);
52extern void fill_maze_full(char **maze, int x, int y, int xsize, int ysize);
53extern void fill_maze_sparse(char **maze, int x, int y, int xsize, int ysize);
54/* wall.c */ 35/* wall.c */
55extern int surround_flag(char **layout, int i, int j, random_map_params *RP); 36extern int surround_flag (char **layout, int i, int j, random_map_params *RP);
56extern int surround_flag2(char **layout, int i, int j, random_map_params *RP); 37extern int surround_flag2 (char **layout, int i, int j, random_map_params *RP);
57extern int surround_flag3(maptile *map, sint16 i, sint16 j, random_map_params *RP); 38extern int surround_flag3 (maptile *map, sint16 i, sint16 j, random_map_params *RP);
58extern int surround_flag4(maptile *map, int i, int j, random_map_params *RP);
59extern void make_map_walls(maptile *map, char **layout, char *w_style, random_map_params *RP); 39extern void make_map_walls (maptile *map, char **layout, const char *w_style, const char *m_style, random_map_params *RP);
60extern object *pick_joined_wall(object *the_wall, char **layout, int i, int j, random_map_params *RP);
61extern object *retrofit_joined_wall(maptile *the_map, int i, int j, int insert_flag, random_map_params *RP); 40extern object *retrofit_joined_wall (maptile *the_map, int i, int j, int insert_flag, random_map_params *RP);
62/* monster.c */ 41/* monster.c */
63extern void insert_multisquare_ob_in_map(object *new_obj, maptile *map);
64extern void place_monsters(maptile *map, char *monsterstyle, int difficulty, random_map_params *RP); 42extern void place_monsters (maptile *map, char *monsterstyle, int difficulty, random_map_params *RP);
65/* door.c */ 43/* door.c */
66extern int surround_check2(char **layout, int i, int j, int Xsize, int Ysize);
67extern void put_doors(maptile *the_map, char **maze, const char *doorstyle, random_map_params *RP); 44extern void put_doors (maptile *the_map, char **maze, const char *doorstyle, random_map_params *RP);
68/* decor.c */ 45/* decor.c */
69extern int obj_count_in_map(maptile *map, int x, int y);
70extern void put_decor(maptile *map, char **maze, char *decorstyle, int decor_option, random_map_params *RP); 46extern void put_decor (maptile *map, char **maze, char *decorstyle, int decor_option, random_map_params *RP);
71/* exit.c */ 47/* exit.c */
72extern void find_in_layout(int mode, char target, int *fx, int *fy, char **layout, random_map_params *RP);
73extern void place_exits(maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP); 48extern void place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP);
74extern void unblock_exits(maptile *map, char **maze, random_map_params *RP); 49extern void unblock_exits (maptile *map, char **maze, random_map_params *RP);
75/* treasure.c */ 50/* treasure.c */
76extern int wall_blocked(maptile *m, int x, int y); 51extern int wall_blocked (maptile *m, int x, int y);
77extern void place_treasure(maptile *map, char **layout, char *treasure_style, int treasureoptions, random_map_params *RP); 52extern void place_treasure (maptile *map, char **layout, char *treasure_style, int treasureoptions, random_map_params *RP);
78extern object *place_chest(int treasureoptions, int x, int y, maptile *map, maptile *style_map, int n_treasures, random_map_params *RP);
79extern object *find_closest_monster(maptile *map, int x, int y, random_map_params *RP);
80extern int keyplace(maptile *map, int x, int y, char *keycode, int door_flag, int n_keys, random_map_params *RP);
81extern object *find_monster_in_room_recursive(char **layout, maptile *map, int x, int y, random_map_params *RP);
82extern object *find_monster_in_room(maptile *map, int x, int y, random_map_params *RP);
83extern void find_spot_in_room_recursive(char **layout, int x, int y, random_map_params *RP);
84extern void find_spot_in_room(maptile *map, int x, int y, int *kx, int *ky, random_map_params *RP);
85extern void find_enclosed_spot(maptile *map, int *cx, int *cy, random_map_params *RP);
86extern void remove_monsters(int x, int y, maptile *map);
87extern object **surround_by_doors(maptile *map, char **layout, int x, int y, int opts);
88extern object *door_in_square(maptile *map, int x, int y);
89extern void find_doors_in_room_recursive(char **layout, maptile *map, int x, int y, object **doorlist, int *ndoors, random_map_params *RP);
90extern object **find_doors_in_room(maptile *map, int x, int y, random_map_params *RP);
91extern void lock_and_hide_doors(object **doorlist, maptile *map, int opts, random_map_params *RP);
92/* special.c */ 53/* special.c */
93extern void nuke_map_region(maptile *map, int xstart, int ystart, int xsize, int ysize);
94extern void include_map_in_map(maptile *dest_map, maptile *in_map, int x, int y);
95extern int find_spot_for_submap(maptile *map, char **layout, int *ix, int *iy, int xsize, int ysize);
96extern void place_fountain_with_specials(maptile *map);
97extern void place_special_exit(maptile *map, int hole_type, random_map_params *RP);
98extern void place_specials_in_map(maptile *map, char **layout, random_map_params *RP); 54extern void place_specials_in_map (maptile *map, char **layout, random_map_params *RP);
99/* style.c */
100extern int load_dir(const char *dir, char ***namelist, int skip_dirs);
101extern maptile *load_style_map(char *style_name);
102extern maptile *find_style(const char *dirname, const char *stylename, int difficulty);
103extern object *pick_random_object(maptile *style);
104extern void free_style_maps(void);
105/* rogue_layout.c */ 55/* rogue_layout.c */
106extern int surround_check(char **layout, int i, int j, int Xsize, int Ysize); 56extern int surround_check (char **layout, int i, int j, int Xsize, int Ysize);
107extern char **roguelike_layout_gen(int xsize, int ysize, int options); 57extern void roguelike_layout_gen (Layout maze, int options);
108/* snake.c */ 58/* snake.c */
109extern char **make_snake_layout(int xsize, int ysize, int options); 59extern void make_snake_layout (Layout maze, int options);
110/* square_spiral.c */ 60/* square_spiral.c */
111extern void find_top_left_corner(char **maze, int *cx, int *cy); 61extern void make_square_spiral_layout (Layout maze, int options);
112extern char **make_square_spiral_layout(int xsize, int ysize, int options);
113/* expand2x.c */ 62/* expand2x.c */
114extern char **expand2x(char **layout, int xsize, int ysize); 63extern void expand2x (Layout maze);
64

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines