Convert room 'joined' and 'needjoining' into booleans
des.region() accepted booleans for the joined field, whereas des.room accepted xchars. These were only being used as truth values, so this converts the room ones into booleans for consistency. I don't think accidentally using an int or a boolean wrongly would actually crash the level generator, but consistency is good. This converts an schar field in struct mkroom into a boolean; on most systems these are probably 1-byte types and save files won't be broken, but it might be best to treat this as a save breaker anyway.
This commit is contained in:
committed by
Pasi Kallinen
parent
fa3041c9f9
commit
18dc88505d
@@ -14,7 +14,7 @@ struct mkroom {
|
||||
schar orig_rtype; /* same as rtype, but not zeroed later */
|
||||
schar rlit; /* is the room lit ? */
|
||||
schar needfill; /* sp_lev: does the room need filling? */
|
||||
schar needjoining; /* sp_lev */
|
||||
boolean needjoining; /* sp_lev: should the room connect to others? */
|
||||
schar doorct; /* door count */
|
||||
schar fdoor; /* index for the first door of the room */
|
||||
schar nsubrooms; /* number of subrooms */
|
||||
|
||||
@@ -185,7 +185,8 @@ typedef struct _room {
|
||||
Str_or_Len parent;
|
||||
xchar x, y, w, h;
|
||||
xchar xalign, yalign;
|
||||
xchar rtype, chance, rlit, needfill, joined;
|
||||
xchar rtype, chance, rlit, needfill;
|
||||
boolean joined;
|
||||
} room;
|
||||
|
||||
struct mapfragment {
|
||||
|
||||
Reference in New Issue
Block a user