… | |
… | |
115 | 4 means leftward |
115 | 4 means leftward |
116 | 5 means northward |
116 | 5 means northward |
117 | 6 means southward |
117 | 6 means southward |
118 | */ |
118 | */ |
119 | void |
119 | void |
120 | place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP) |
120 | place_exits (maptile *map, char **maze, const char *exitstyle, int orientation, random_map_params *RP) |
121 | { |
121 | { |
122 | maptile *style_map_down = 0; /* harder maze */ |
122 | maptile *style_map_down = 0; /* harder maze */ |
123 | maptile *style_map_up = 0; /* easier maze */ |
123 | maptile *style_map_up = 0; /* easier maze */ |
124 | object *the_exit_down; /* harder maze */ |
124 | object *the_exit_down; /* harder maze */ |
125 | object *the_exit_up; /* easier maze */ |
125 | object *the_exit_up; /* easier maze */ |
… | |
… | |
276 | if (downx == -1) |
276 | if (downx == -1) |
277 | find_in_layout (0, 0, &downx, &downy, maze, RP); |
277 | find_in_layout (0, 0, &downx, &downy, maze, RP); |
278 | |
278 | |
279 | if (the_exit_down) |
279 | if (the_exit_down) |
280 | { |
280 | { |
281 | char buf[16384]; |
|
|
282 | |
|
|
283 | int i = rmg_find_free_spot (the_exit_down, map, downx, downy, 1, SIZEOFFREE1 + 1); |
281 | int i = rmg_find_free_spot (the_exit_down, map, downx, downy, 1, SIZEOFFREE1 + 1); |
284 | the_exit_down->x = downx + freearr_x[i]; |
282 | the_exit_down->x = downx + freearr_x[i]; |
285 | the_exit_down->y = downy + freearr_y[i]; |
283 | the_exit_down->y = downy + freearr_y[i]; |
286 | RP->origin_x = the_exit_down->x; |
284 | RP->origin_x = the_exit_down->x; |
287 | RP->origin_y = the_exit_down->y; |
285 | RP->origin_y = the_exit_down->y; |
|
|
286 | |
|
|
287 | dynbuf_text buf; |
288 | write_map_parameters_to_string (buf, RP); |
288 | write_map_parameters_to_string (buf, RP); |
289 | the_exit_down->msg = buf; |
289 | the_exit_down->msg = buf; |
290 | |
290 | |
291 | /* the identifier for making a random map. */ |
291 | /* the identifier for making a random map. */ |
292 | if (RP->dungeon_level >= RP->dungeon_depth && *RP->final_map) |
292 | if (RP->dungeon_level >= RP->dungeon_depth && *RP->final_map) |