check for a doorway which lacks its door (NODOOR or BROKEN) */
| 4060 | |
| 4061 | /* check for a doorway which lacks its door (NODOOR or BROKEN) */ |
| 4062 | boolean |
| 4063 | doorless_door(coordxy x, coordxy y) |
| 4064 | { |
| 4065 | struct rm *lev_p = &levl[x][y]; |
| 4066 | |
| 4067 | if (!IS_DOOR(lev_p->typ)) |
| 4068 | return FALSE; |
| 4069 | /* all rogue level doors are doorless but disallow diagonal access, so |
| 4070 | we treat them as if their non-existent doors were actually present */ |
| 4071 | if (Is_rogue_level(&u.uz)) |
| 4072 | return FALSE; |
| 4073 | return !(lev_p->doormask & ~(D_NODOOR | D_BROKEN)); |
| 4074 | } |
| 4075 | |
| 4076 | /* used by drown() to check whether hero can crawl from water to <x,y>; |
| 4077 | also used by findtravelpath() when destination is one step away */ |
no outgoing calls