… | |
… | |
203 | ++y; |
203 | ++y; |
204 | } |
204 | } |
205 | |
205 | |
206 | while (--y >= y0) |
206 | while (--y >= y0) |
207 | { |
207 | { |
208 | if (x > 0) push_flood_fill (dist, seeds, x - 1, y); |
208 | if (x > 0 && !dist [x - 1][y]) push_flood_fill (dist, seeds, x - 1, y); |
209 | if (x < dist.w - 1) push_flood_fill (dist, seeds, x + 1, y); |
209 | if (x < dist.w - 1 && !dist [x + 1][y]) push_flood_fill (dist, seeds, x + 1, y); |
210 | } |
210 | } |
211 | } |
211 | } |
212 | |
212 | |
213 | static inline void |
213 | static inline void |
214 | make_tunnel (layout &dist, pointlist &seeds, int x, int y, U8 d) |
214 | make_tunnel (layout &dist, pointlist &seeds, int x, int y, U8 d) |