* Mark all neighboring pits as conjoined pits. * (currently not called from anywhere) */
| 6619 | * (currently not called from anywhere) |
| 6620 | */ |
| 6621 | staticfn void |
| 6622 | join_adjacent_pits(struct trap *trap) |
| 6623 | { |
| 6624 | struct trap *t; |
| 6625 | int diridx; |
| 6626 | coordxy x, y; |
| 6627 | |
| 6628 | if (!trap) |
| 6629 | return; |
| 6630 | for (diridx = 0; diridx < N_DIRS; ++diridx) { |
| 6631 | x = trap->tx + xdir[diridx]; |
| 6632 | y = trap->ty + ydir[diridx]; |
| 6633 | if (isok(x, y)) { |
| 6634 | if ((t = t_at(x, y)) != 0 && is_pit(t->ttyp)) { |
| 6635 | trap->conjoined |= (1 << diridx); |
| 6636 | join_adjacent_pits(t); |
| 6637 | } else |
| 6638 | trap->conjoined &= ~(1 << diridx); |
| 6639 | } |
| 6640 | } |
| 6641 | } |
| 6642 | #endif /*0*/ |
| 6643 | |
| 6644 | /* |