|
Crossfire Server, Branch 1.12
R12190
|
Handle exit placement in map. More...

Go to the source code of this file.
Functions | |
| void | find_in_layout (int mode, char target, int *fx, int *fy, char **layout, RMParms *RP) |
| Find a character in the layout. | |
| void | place_exits (mapstruct *map, char **maze, char *exitstyle, int orientation, RMParms *RP) |
| Place exits in the map. | |
| void | unblock_exits (mapstruct *map, char **maze, RMParms *RP) |
| This function unblocks the exits. | |
Handle exit placement in map.
Definition in file exit.c.
| void find_in_layout | ( | int | mode, |
| char | target, | ||
| int * | fx, | ||
| int * | fy, | ||
| char ** | layout, | ||
| RMParms * | RP | ||
| ) |
Find a character in the layout.
| mode | how to look:
|
| target | character to search. |
| fx | |
| fy | position of character, or -1 if not found. |
| layout | maze. |
| RP | maze parameters. |
Definition at line 58 of file exit.c.
References RMParms::Xsize, and RMParms::Ysize.
Referenced by place_exits().

| void place_exits | ( | mapstruct * | map, |
| char ** | maze, | ||
| char * | exitstyle, | ||
| int | orientation, | ||
| RMParms * | RP | ||
| ) |
Place exits in the map.
| map | map to put exits into. |
| maze | map layout. |
| exitstyle | what style to use. If NULL uses a random one. |
| orientation | how exits should be oriented:
|
| RP | map parameters. |
Definition at line 153 of file exit.c.
References add_string(), arch_to_object(), create_archetype(), RMParms::dungeon_depth, RMParms::dungeon_level, EXIT, RMParms::exit_on_final_map, EXIT_PATH, EXIT_X, EXIT_Y, RMParms::final_exit_archetype, RMParms::final_map, find_archetype(), find_first_free_spot(), find_in_layout(), find_style(), free_object(), freearr_x, freearr_y, GET_MAP_OB, insert_ob_in_map(), MAP_ENTER_X, MAP_ENTER_Y, MOVE_ALL, RMParms::origin_map, RMParms::origin_x, RMParms::origin_y, mapdef::path, pick_random_object(), ready_map_name(), remove_ob(), set_map_timeout(), snprintf(), wall_blocked(), write_map_parameters_to_string(), RMParms::Xsize, and RMParms::Ysize.
Referenced by generate_random_map().


| void unblock_exits | ( | mapstruct * | map, |
| char ** | maze, | ||
| RMParms * | RP | ||
| ) |
This function unblocks the exits.
We blocked them to keep things from being dumped on them during the other phases of random map generation.
| map | map to alter. |
| maze | map layout. |
| RP | map generation parameters. |
Definition at line 392 of file exit.c.
References GET_MAP_OB, LOCKED_DOOR, MOVE_ALL, MOVE_BLOCK_DEFAULT, update_object(), RMParms::Xsize, and RMParms::Ysize.
Referenced by generate_random_map().


1.7.6.1