if x,y is door, does it open into solid terrain */
| 1195 | |
| 1196 | /* if x,y is door, does it open into solid terrain */ |
| 1197 | staticfn boolean |
| 1198 | chk_okdoor(coordxy x, coordxy y) |
| 1199 | { |
| 1200 | if (IS_DOOR(levl[x][y].typ)) { |
| 1201 | if (levl[x][y].horizontal) { |
| 1202 | if ((isok(x, y-1) && (levl[x][y-1].typ > TREE)) |
| 1203 | && (isok(x, y+1) && (levl[x][y+1].typ <= TREE))) |
| 1204 | return FALSE; |
| 1205 | if ((isok(x, y-1) && (levl[x][y-1].typ <= TREE)) |
| 1206 | && (isok(x, y+1) && (levl[x][y+1].typ > TREE))) |
| 1207 | return FALSE; |
| 1208 | } else { |
| 1209 | if ((isok(x-1, y) && (levl[x-1][y].typ > TREE)) |
| 1210 | && (isok(x+1, y) && (levl[x+1][y].typ <= TREE))) |
| 1211 | return FALSE; |
| 1212 | if ((isok(x-1, y) && (levl[x-1][y].typ <= TREE)) |
| 1213 | && (isok(x+1, y) && (levl[x+1][y].typ > TREE))) |
| 1214 | return FALSE; |
| 1215 | } |
| 1216 | return TRUE; |
| 1217 | } |
| 1218 | return TRUE; |
| 1219 | } |
| 1220 | |
| 1221 | /* check mklev created level sanity */ |
| 1222 | staticfn void |
no test coverage detected