MCPcopy Index your code
hub / github.com/NetHack/NetHack / ceiling

Function ceiling

src/dungeon.c:1713–1747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711}
1712
1713const char *
1714ceiling(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
1749const char *
1750surface(coordxy x, coordxy y)

Callers 15

peffect_gain_levelFunction · 0.85
peffect_levitationFunction · 0.85
spoteffectsFunction · 0.85
use_pick_axe2Function · 0.85
zap_digFunction · 0.85
cant_reach_floorFunction · 0.85
toss_upFunction · 0.85
throwitFunction · 0.85
throw_goldFunction · 0.85
doloot_coreFunction · 0.85
fall_throughFunction · 0.85
trapeffect_rocktrapFunction · 0.85

Calls 2

in_roomsFunction · 0.85
In_questFunction · 0.85

Tested by

no test coverage detected