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:
copperwater
2021-02-18 18:55:10 -05:00
committed by Pasi Kallinen
parent fa3041c9f9
commit 18dc88505d
6 changed files with 12 additions and 11 deletions

View File

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