… | |
… | |
109 | |
109 | |
110 | return surround_index; |
110 | return surround_index; |
111 | } |
111 | } |
112 | |
112 | |
113 | /* like surround_flag2, except it checks a map, not a layout. */ |
113 | /* like surround_flag2, except it checks a map, not a layout. */ |
114 | |
114 | static int |
115 | int |
|
|
116 | surround_flag4 (maptile *map, int i, int j, random_map_params *RP) |
115 | surround_flag4 (maptile *map, int i, int j, random_map_params *RP) |
117 | { |
116 | { |
118 | /* 1 = blocked to left, |
117 | /* 1 = blocked to left, |
119 | 2 = blocked to right, |
118 | 2 = blocked to right, |
120 | 4 = blocked above |
119 | 4 = blocked above |
… | |
… | |
133 | return surround_index; |
132 | return surround_index; |
134 | } |
133 | } |
135 | |
134 | |
136 | /* picks the right wall type for this square, to make it look nice, |
135 | /* picks the right wall type for this square, to make it look nice, |
137 | and have everything nicely joined. It uses the layout. */ |
136 | and have everything nicely joined. It uses the layout. */ |
138 | object * |
137 | static object * |
139 | pick_joined_wall (object *the_wall, char **layout, int i, int j, random_map_params *RP) |
138 | pick_joined_wall (object *the_wall, char **layout, int i, int j, random_map_params *RP) |
140 | { |
139 | { |
141 | /* 1 = wall to left, |
140 | /* 1 = wall to left, |
142 | 2 = wall to right, |
141 | 2 = wall to right, |
143 | 4 = wall above |
142 | 4 = wall above |