| 1711 | } |
| 1712 | |
| 1713 | const char * |
| 1714 | ceiling(coordxy x, coordxy y) |
| 1715 | { |
| 1716 | struct rm *lev = &levl[x][y]; |
| 1717 | const char *what; |
| 1718 | |
| 1719 | /* other room types will no longer exist when we're interested -- |
| 1720 | * see check_special_room() |
| 1721 | */ |
| 1722 | if (*in_rooms(x, y, VAULT)) |
| 1723 | what = "vault's ceiling"; |
| 1724 | else if (*in_rooms(x, y, TEMPLE)) |
| 1725 | what = "temple's ceiling"; |
| 1726 | else if (*in_rooms(x, y, SHOPBASE)) |
| 1727 | what = "shop's ceiling"; |
| 1728 | else if (Is_waterlevel(&u.uz)) |
| 1729 | /* water plane has no surface; its air bubbles aren't below sky */ |
| 1730 | what = "water above"; |
| 1731 | else if (IS_AIR(lev->typ)) |
| 1732 | what = "sky"; |
| 1733 | else if (Is_firelevel(&u.uz)) |
| 1734 | what = "flames above"; |
| 1735 | else if (In_quest(&u.uz)) |
| 1736 | /* just in case; try to avoid in caller if you can */ |
| 1737 | what = "expanse above"; |
| 1738 | else if (Underwater) |
| 1739 | what = "water's surface"; |
| 1740 | else if ((IS_ROOM(lev->typ) && !Is_earthlevel(&u.uz)) |
| 1741 | || IS_WALL(lev->typ) || IS_DOOR(lev->typ) || lev->typ == SDOOR) |
| 1742 | what = "ceiling"; |
| 1743 | else |
| 1744 | what = "rock cavern"; |
| 1745 | |
| 1746 | return what; |
| 1747 | } |
| 1748 | |
| 1749 | const char * |
| 1750 | surface(coordxy x, coordxy y) |
no test coverage detected