pull request #345 - theme room dimensions

"When a room is created and passed down to a contents function in
Lua, the width and height properties of that room are computed by
subtracting lx from hx and ly from hy, which means e.g. a room
which is 8 floor squares wide and 5 tall appears to the contents
function as having a width of 7 and height of 4.  This patch fixes
that off-by-one."

I don't understand the details here:  should a room's dimensions
include its boundary walls or just the inner amount?  This change
didn't seem to cause any problems so I've put it in.

Closes #345
This commit is contained in:
PatR
2020-09-23 17:57:19 -07:00
parent 10d80eb150
commit 9faaa1b25d
3 changed files with 18 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.307 $ $NHDT-Date: 1600863687 2020/09/23 12:21:27 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.308 $ $NHDT-Date: 1600909016 2020/09/24 00:56:56 $
General Fixes and Modified Features
-----------------------------------
@@ -342,6 +342,7 @@ replace worm tail placement code that reportedly led to a sanity_check warning
[no actual code problem found; might be compiler bug for 'xchar']
learn scroll of teleportation after reading even when random destination is
right by starting spot
fix off-by-one bug in dimensions of theme rooms
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support