Update mkmap.c

szy_
pmje2o5iu 1 year ago
parent 6a7fd62579
commit fdb66a87fe

@ -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

Loading…
Cancel
Save