fix issue #1309 - secret doors in Garden rooms

Issue reported by elunna:  when a room gets converted into a theme
room with fill type Garden, its walls are changed to trees but any
secret doors in those walls are still displayed as regular walls.

This adds a new D_ARBOREAL flag for secret doors, used to force them
to be displayed as a tree instead of a wall.

Fixes #1309
This commit is contained in:
PatR
2025-04-12 17:21:40 -07:00
parent 8f344a30b5
commit e26a496088
5 changed files with 28 additions and 4 deletions
+10 -2
View File
@@ -76,8 +76,16 @@ boolean
set_levltyp(coordxy x, coordxy y, schar newtyp)
{
if (isok(x, y) && newtyp >= STONE && newtyp < MAX_TYPE) {
if (CAN_OVERWRITE_TERRAIN(levl[x][y].typ)) {
schar oldtyp = levl[x][y].typ;
schar oldtyp = levl[x][y].typ;
/* hack for secret doors in garden theme rooms */
if (oldtyp == SDOOR && newtyp == AIR) {
/* levl[][].typ stays SDOOR rather than change to AIR */
levl[x][y].doormask |= D_ARBOREAL;
return TRUE;
}
if (CAN_OVERWRITE_TERRAIN(oldtyp)) {
/* typ==ICE || (typ==DRAWBRIDGE_UP && drawbridgemask==DB_ICE) */
boolean was_ice = is_ice(x, y);