… | |
… | |
28 | |
28 | |
29 | |
29 | |
30 | /* find a character in the layout. fx and fy are pointers to |
30 | /* find a character in the layout. fx and fy are pointers to |
31 | where to find the char. fx,fy = -1 if not found. */ |
31 | where to find the char. fx,fy = -1 if not found. */ |
32 | void |
32 | void |
33 | find_in_layout (int mode, char target, int *fx, int *fy, char **layout, RMParms * RP) |
33 | find_in_layout (int mode, char target, int *fx, int *fy, char **layout, random_map_params * RP) |
34 | { |
34 | { |
35 | int M; |
35 | int M; |
36 | int i, j; |
36 | int i, j; |
37 | |
37 | |
38 | *fx = -1; |
38 | *fx = -1; |
… | |
… | |
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, RMParms *RP) |
120 | place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP) |
121 | { |
121 | { |
122 | char styledirname[256]; |
122 | char styledirname[256]; |
123 | maptile *style_map_down = 0; /* harder maze */ |
123 | maptile *style_map_down = 0; /* harder maze */ |
124 | maptile *style_map_up = 0; /* easier maze */ |
124 | maptile *style_map_up = 0; /* easier maze */ |
125 | object *the_exit_down; /* harder maze */ |
125 | object *the_exit_down; /* harder maze */ |
… | |
… | |
355 | the_exit_back->x = new_map->enter_x; |
355 | the_exit_back->x = new_map->enter_x; |
356 | the_exit_back->y = new_map->enter_y; |
356 | the_exit_back->y = new_map->enter_y; |
357 | |
357 | |
358 | insert_ob_in_map (the_exit_back, new_map, NULL, 0); |
358 | insert_ob_in_map (the_exit_back, new_map, NULL, 0); |
359 | } |
359 | } |
360 | |
|
|
361 | set_map_timeout (new_map); /* So it gets swapped out */ |
|
|
362 | } |
360 | } |
363 | else |
361 | else |
364 | the_exit_down->slaying = "/!"; |
362 | the_exit_down->slaying = "/!"; |
365 | |
363 | |
366 | /* Block the exit so things don't get dumped on top of it. */ |
364 | /* Block the exit so things don't get dumped on top of it. */ |
… | |
… | |
374 | |
372 | |
375 | /* this function unblocks the exits. We blocked them to |
373 | /* this function unblocks the exits. We blocked them to |
376 | keep things from being dumped on them during the other |
374 | keep things from being dumped on them during the other |
377 | phases of random map generation. */ |
375 | phases of random map generation. */ |
378 | void |
376 | void |
379 | unblock_exits (maptile *map, char **maze, RMParms * RP) |
377 | unblock_exits (maptile *map, char **maze, random_map_params * RP) |
380 | { |
378 | { |
381 | int i = 0, j = 0; |
379 | int i = 0, j = 0; |
382 | object *walk; |
380 | object *walk; |
383 | |
381 | |
384 | for (i = 0; i < RP->Xsize; i++) |
382 | for (i = 0; i < RP->Xsize; i++) |