]> granicus.if.org Git - nethack/commit
Convert room 'joined' and 'needjoining' into booleans
authorcopperwater <aosdict@gmail.com>
Thu, 18 Feb 2021 23:55:10 +0000 (18:55 -0500)
committerPasi Kallinen <paxed@alt.org>
Fri, 19 Feb 2021 15:09:41 +0000 (17:09 +0200)
commit18dc88505d70ffdbc712ebddc3f23173f0280e09
treed835e787c1c23514a7884b543bdf881471ee8ea5
parentfa3041c9f9cf86d515d77fac00678c863c06f71a
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.
dat/themerms.lua
doc/lua.adoc
include/mkroom.h
include/sp_lev.h
src/mklev.c
src/sp_lev.c