Remove the per dungeon level door limit

Number of doors in a room-and-corridor style level was fixed
at 120; now the doors-array is dynamically allocated when needed.

Breaks saves and bones.
This commit is contained in:
Pasi Kallinen
2022-09-09 12:58:45 +03:00
parent c6a8519fec
commit a733004912
10 changed files with 85 additions and 62 deletions

View File

@@ -817,7 +817,8 @@ struct instance_globals {
char toplines[TBUFSZ];
coord bhitpos; /* place where throw or zap hits or stops */
boolean in_steed_dismounting;
coord doors[DOORMAX];
int doors_alloc; /* doors-array allocated size */
coord *doors; /* array of door locations */
struct menucoloring *menu_colorings;
schar lastseentyp[COLNO][ROWNO]; /* last seen/touched dungeon typ */
struct spell spl_book[MAXSPELL + 1];

View File

@@ -400,7 +400,7 @@ extern struct nomakedefs_s nomakedefs;
#define MAXNROFROOMS 40 /* max number of rooms per level */
#define MAX_SUBROOMS 24 /* max # of subrooms in a given room */
#define DOORMAX 120 /* max number of doors per level */
#define DOORINC 120 /* number of doors per level, increment */
#define BUFSZ 256 /* for getlin buffers */
#define QBUFSZ 128 /* for building question text */

View File

@@ -16,7 +16,7 @@ struct mkroom {
schar needfill; /* sp_lev: does the room need filling? */
boolean needjoining; /* sp_lev: should the room connect to others? */
schar doorct; /* door count */
schar fdoor; /* index for the first door of the room */
int fdoor; /* index for the first door of the room */
schar nsubrooms; /* number of subrooms */
boolean irregular; /* true if room is non-rectangular */
schar roomnoidx;

View File

@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 62
#define EDITLEVEL 63
/*
* Development status possibilities.