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

Function level_finalize_topology

src/mklev.c:1543–1574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1541}
1542
1543void
1544level_finalize_topology(void)
1545{
1546 struct mkroom *croom;
1547 int ridx;
1548
1549 bound_digging();
1550 mineralize(-1, -1, -1, -1, FALSE);
1551 gi.in_mklev = FALSE;
1552 /* avoid coordinates in future lua-loads for this level being thrown off
1553 * because xstart and ystart aren't saved with the level and will be 0
1554 * after leaving and returning */
1555 gx.xstart = gy.ystart = 0;
1556 /* has_morgue gets cleared once morgue is entered; graveyard stays
1557 set (graveyard might already be set even when has_morgue is clear
1558 [see fixup_special()], so don't update it unconditionally) */
1559 if (svl.level.flags.has_morgue)
1560 svl.level.flags.graveyard = 1;
1561 if (!svl.level.flags.is_maze_lev) {
1562 for (croom = &svr.rooms[0]; croom != &svr.rooms[svn.nroom]; croom++)
1563#ifdef SPECIALIZATION
1564 topologize(croom, FALSE);
1565#else
1566 topologize(croom);
1567#endif
1568 }
1569 set_wall_state();
1570 /* for many room types, svr.rooms[].rtype is zeroed once the room has been
1571 entered; svr.rooms[].orig_rtype always retains original rtype value */
1572 for (ridx = 0; ridx < SIZE(svr.rooms); ridx++)
1573 svr.rooms[ridx].orig_rtype = svr.rooms[ridx].rtype;
1574}
1575
1576void
1577mklev(void)

Callers 2

mklevFunction · 0.85
lspo_finalize_levelFunction · 0.85

Calls 3

bound_diggingFunction · 0.85
mineralizeFunction · 0.85
set_wall_stateFunction · 0.85

Tested by

no test coverage detected