| 6577 | } |
| 6578 | |
| 6579 | staticfn void |
| 6580 | clear_conjoined_pits(struct trap *trap) |
| 6581 | { |
| 6582 | int diridx, adjidx; |
| 6583 | coordxy x, y; |
| 6584 | struct trap *t; |
| 6585 | |
| 6586 | if (trap && is_pit(trap->ttyp)) { |
| 6587 | for (diridx = 0; diridx < N_DIRS; ++diridx) { |
| 6588 | if (trap->conjoined & (1 << diridx)) { |
| 6589 | x = trap->tx + xdir[diridx]; |
| 6590 | y = trap->ty + ydir[diridx]; |
| 6591 | if (isok(x, y) |
| 6592 | && (t = t_at(x, y)) != 0 |
| 6593 | && is_pit(t->ttyp)) { |
| 6594 | adjidx = DIR_180(diridx); |
| 6595 | t->conjoined &= ~(1 << adjidx); |
| 6596 | } |
| 6597 | trap->conjoined &= ~(1 << diridx); |
| 6598 | } |
| 6599 | } |
| 6600 | } |
| 6601 | } |
| 6602 | |
| 6603 | staticfn boolean |
| 6604 | adj_nonconjoined_pit(struct trap *adjtrap) |