adds adjacent smooth walls and doors to the given tdir
| 586 | |
| 587 | // adds adjacent smooth walls and doors to the given tdir |
| 588 | static TileDirection get_adjacent_smooth_walls(MapExtras::MapCache &map, |
| 589 | const DFCoord &pos, |
| 590 | TileDirection tdir) { |
| 591 | if (is_smooth_wall_or_connector(map, DFCoord(pos.x, pos.y-1, pos.z))) |
| 592 | tdir.north = 1; |
| 593 | if (is_smooth_wall_or_connector(map, DFCoord(pos.x, pos.y+1, pos.z))) |
| 594 | tdir.south = 1; |
| 595 | if (is_smooth_wall_or_connector(map, DFCoord(pos.x-1, pos.y, pos.z))) |
| 596 | tdir.west = 1; |
| 597 | if (is_smooth_wall_or_connector(map, DFCoord(pos.x+1, pos.y, pos.z))) |
| 598 | tdir.east = 1; |
| 599 | return tdir; |
| 600 | } |
| 601 | |
| 602 | // ensure we have at least two directions enabled (or 0) so we can find a |
| 603 | // matching tiletype. The game chooses to curve "end piece" walls into |
no test coverage detected