MCPcopy Create free account
hub / github.com/NetHack/NetHack / ledger_to_dlev

Function ledger_to_dlev

src/dungeon.c:1418–1426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1416}
1417
1418RESTORE_WARNING_UNREACHABLE_CODE
1419
1420/* return the level of the dungeon this ledgerno exists in */
1421xint16
1422ledger_to_dlev(xint16 ledgerno)
1423{
1424 return (xint16) (ledgerno
1425 - svd.dungeons[ledger_to_dnum(ledgerno)].ledger_start);
1426}
1427
1428/* returns the depth of a level, in floors below the surface
1429 (note levels in different dungeons can have the same depth) */

Callers 3

lev_by_nameFunction · 0.85
show_overviewFunction · 0.85
migrate_to_levelFunction · 0.85

Calls 1

ledger_to_dnumFunction · 0.85

Tested by

no test coverage detected