… | |
… | |
45 | surround_index += 8; |
45 | surround_index += 8; |
46 | return surround_index; |
46 | return surround_index; |
47 | } |
47 | } |
48 | |
48 | |
49 | void |
49 | void |
50 | put_doors (mapstruct *the_map, char **maze, const char *doorstyle, RMParms * RP) |
50 | put_doors (maptile *the_map, char **maze, const char *doorstyle, random_map_params * RP) |
51 | { |
51 | { |
52 | int i, j; |
52 | int i, j; |
53 | mapstruct *vdoors; |
53 | maptile *vdoors; |
54 | mapstruct *hdoors; |
54 | maptile *hdoors; |
55 | char doorpath[128]; |
55 | char doorpath[128]; |
56 | |
56 | |
57 | if (!strcmp (doorstyle, "none")) |
57 | if (!strcmp (doorstyle, "none")) |
58 | return; |
58 | return; |
59 | vdoors = find_style ("/styles/doorstyles", doorstyle, -1); |
59 | vdoors = find_style ("/styles/doorstyles", doorstyle, -1); |
… | |
… | |
79 | if (sindex == 3) |
79 | if (sindex == 3) |
80 | this_door = pick_random_object (hdoors); |
80 | this_door = pick_random_object (hdoors); |
81 | else |
81 | else |
82 | this_door = pick_random_object (vdoors); |
82 | this_door = pick_random_object (vdoors); |
83 | new_door = arch_to_object (this_door->arch); |
83 | new_door = arch_to_object (this_door->arch); |
84 | copy_object (this_door, new_door); |
84 | this_door->copy_to (new_door); |
85 | new_door->x = i; |
85 | new_door->x = i; |
86 | new_door->y = j; |
86 | new_door->y = j; |
87 | insert_ob_in_map (new_door, the_map, NULL, 0); |
87 | insert_ob_in_map (new_door, the_map, NULL, 0); |
88 | } |
88 | } |
89 | } |
89 | } |