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

Function remove_boundary_syms

src/sp_lev.c:1015–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013}
1014
1015staticfn void
1016remove_boundary_syms(void)
1017{
1018 /*
1019 * If any CROSSWALLs are found, must change to ROOM after REGION's
1020 * are laid out. CROSSWALLS are used to specify "invisible"
1021 * boundaries where DOOR syms look bad or aren't desirable.
1022 */
1023 coordxy x, y;
1024 boolean has_bounds = FALSE;
1025
1026 for (x = 0; x < COLNO - 1; x++)
1027 for (y = 0; y < ROWNO - 1; y++)
1028 if (levl[x][y].typ == CROSSWALL) {
1029 has_bounds = TRUE;
1030 break;
1031 }
1032 if (has_bounds) {
1033 for (x = 0; x < gx.x_maze_max; x++)
1034 for (y = 0; y < gy.y_maze_max; y++)
1035 if ((levl[x][y].typ == CROSSWALL) && SpLev_Map[x][y])
1036 levl[x][y].typ = ROOM;
1037 }
1038}
1039
1040/* used by sel_set_door() and link_doors_rooms() */
1041staticfn void

Callers 2

lspo_finalize_levelFunction · 0.85
load_specialFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected