/* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team * Copyright (©) 1992,2007 Frank Tore Johansen * * Deliantra is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * The authors can be reached via e-mail to */ /* random_map.c */ extern void dump_layout (Layout layout); extern Layout layoutgen (random_map_params *RP); extern void roomify_layout (char **maze, random_map_params *RP); extern int can_make_wall (char **maze, int dx, int dy, int dir, random_map_params *RP); extern int make_wall (char **maze, int x, int y, int dir); extern void doorify_layout (char **maze, random_map_params *RP); extern void write_map_parameters_to_string (char *buf, random_map_params *RP); 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); /* room_gen_onion.c */ extern void map_gen_onion (Layout maze, int option, int layers); extern void centered_onion (char **maze, int xsize, int ysize, int option, int layers); extern void bottom_centered_onion (char **maze, int xsize, int ysize, int option, int layers); extern void draw_onion (char **maze, float *xlocations, float *ylocations, int layers); extern void make_doors (char **maze, float *xlocations, float *ylocations, int layers, int options); extern void bottom_right_centered_onion (char **maze, int xsize, int ysize, int option, int layers); /* room_gen_spiral.c */ extern void map_gen_spiral (Layout maze, int option); extern void connect_spirals (int xsize, int ysize, int sym, char **layout); /* maze_gen.c */ extern void maze_gen (Layout maze, int option); extern void make_wall_free_list (int xsize, int ysize); extern void pop_wall_point (int *x, int *y); extern int find_free_point (char **maze, int *x, int *y, int xc, int yc, int xsize, int ysize); extern void fill_maze_full (char **maze, int x, int y, int xsize, int ysize); extern void fill_maze_sparse (char **maze, int x, int y, int xsize, int ysize); /* wall.c */ extern int surround_flag (char **layout, int i, int j, random_map_params *RP); extern int surround_flag2 (char **layout, int i, int j, random_map_params *RP); extern int surround_flag3 (maptile *map, sint16 i, sint16 j, random_map_params *RP); extern int surround_flag4 (maptile *map, int i, int j, random_map_params *RP); extern void make_map_walls (maptile *map, char **layout, char *w_style, random_map_params *RP); extern object *pick_joined_wall (object *the_wall, char **layout, int i, int j, random_map_params *RP); extern object *retrofit_joined_wall (maptile *the_map, int i, int j, int insert_flag, random_map_params *RP); /* monster.c */ extern void place_monsters (maptile *map, char *monsterstyle, int difficulty, random_map_params *RP); /* door.c */ extern int surround_check2 (char **layout, int i, int j, int Xsize, int Ysize); extern void put_doors (maptile *the_map, char **maze, const char *doorstyle, random_map_params *RP); /* decor.c */ extern int obj_count_in_map (maptile *map, int x, int y); extern void put_decor (maptile *map, char **maze, char *decorstyle, int decor_option, random_map_params *RP); /* exit.c */ extern void find_in_layout (int mode, char target, int *fx, int *fy, char **layout, random_map_params *RP); extern void place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP); extern void unblock_exits (maptile *map, char **maze, random_map_params *RP); /* treasure.c */ extern int wall_blocked (maptile *m, int x, int y); extern void place_treasure (maptile *map, char **layout, char *treasure_style, int treasureoptions, random_map_params *RP); extern object *place_chest (int treasureoptions, int x, int y, maptile *map, maptile *style_map, int n_treasures, random_map_params *RP); extern object *find_closest_monster (maptile *map, int x, int y, random_map_params *RP); extern int keyplace (maptile *map, int x, int y, char *keycode, int door_flag, int n_keys, random_map_params *RP); extern object *find_monster_in_room_recursive (char **layout, maptile *map, int x, int y, random_map_params *RP); extern object *find_monster_in_room (maptile *map, int x, int y, random_map_params *RP); extern void find_spot_in_room_recursive (char **layout, int x, int y, random_map_params *RP); extern void find_spot_in_room (maptile *map, int x, int y, int *kx, int *ky, random_map_params *RP); extern void find_enclosed_spot (maptile *map, int *cx, int *cy, random_map_params *RP); extern void remove_monsters (int x, int y, maptile *map); extern object **surround_by_doors (maptile *map, char **layout, int x, int y, int opts); extern object *door_in_square (maptile *map, int x, int y); extern void find_doors_in_room_recursive (char **layout, maptile *map, int x, int y, object **doorlist, int *ndoors, random_map_params *RP); extern object **find_doors_in_room (maptile *map, int x, int y, random_map_params *RP); extern void lock_and_hide_doors (object **doorlist, maptile *map, int opts, random_map_params *RP); /* special.c */ extern void nuke_map_region (maptile *map, int xstart, int ystart, int xsize, int ysize); extern void include_map_in_map (maptile *dest_map, maptile *in_map, int x, int y); extern int find_spot_for_submap (maptile *map, char **layout, int *ix, int *iy, int xsize, int ysize); extern void place_fountain_with_specials (maptile *map); extern void place_special_exit (maptile *map, int hole_type, random_map_params *RP); extern void place_specials_in_map (maptile *map, char **layout, random_map_params *RP); /* style.c */ extern int load_dir (const char *dir, char ***namelist, int skip_dirs); extern maptile *load_style_map (char *style_name); extern maptile *find_style (const char *dirname, const char *stylename, int difficulty); extern object *pick_random_object (maptile *style); extern void free_style_maps (void); /* rogue_layout.c */ extern int surround_check (char **layout, int i, int j, int Xsize, int Ysize); extern void roguelike_layout_gen (Layout maze, int options); /* snake.c */ extern void make_snake_layout (Layout maze, int options); /* square_spiral.c */ extern void make_square_spiral_layout (Layout maze, int options); /* expand2x.c */ extern void expand2x (Layout maze);