diff --git a/src/NetHack_3.7/src/mkmap.c b/src/NetHack_3.7/src/mkmap.c index 18e4be5..a467ac5 100644 --- a/src/NetHack_3.7/src/mkmap.c +++ b/src/NetHack_3.7/src/mkmap.c @@ -27,9 +27,9 @@ init_map(schar bg_typ) for (i = 1; i < COLNO; i++) for (j = 0; j < ROWNO; j++) { - levl[i][j].roomno = NO_ROOM; - levl[i][j].typ = bg_typ; - levl[i][j].lit = FALSE; + levl[i][j].roomno = NO_ROOM; // Set room number to NO_ROOM + levl[i][j].typ = bg_typ; // Set cell type to the specified background type + levl[i][j].lit = FALSE; // Set the cell as not lit } } @@ -250,9 +250,9 @@ join_map_cleanup(void) for (x = 1; x < COLNO; x++) for (y = 0; y < ROWNO; y++) - levl[x][y].roomno = NO_ROOM; - gn.nroom = gn.nsubroom = 0; - gr.rooms[gn.nroom].hx = gs.subrooms[gn.nsubroom].hx = -1; + levl[x][y].roomno = NO_ROOM; // Set room number to NO_ROOM + gn.nroom = gn.nsubroom = 0; // Reset the number of rooms and subrooms + gr.rooms[gn.nroom].hx = gs.subrooms[gn.nsubroom].hx = -1; // Reset room boundaries } static void