_snprintf and snprintf have one very important semantic difference.
_snprintf does NOT add terminating null character when the buffer limit
is reached while snprintf guarantees a terminating null character. It
was a mistake to make this naming change hiding the fact that the
semantics don't match what the developer might expect.
When the game windows were initialized, the anhk icon for alignment
was centered relative to Lawful/Neutral/Chaotic label but during
the first status update it noticeably shifted left. Non-blank
hunger or encumbrance states could change from centered to left
justified when they were present and the icon was replaced. Oddly,
resetting the 'centered' attribute for the widget wasn't sufficient
to fix this. Running the resize code for that widget did. Another
case of trial and error to make things work the way they ought.
Also, don't highlight a change in alignment or dungeon location as
"got worse" if the internal numeric value went down instead of up;
always highlight as "got better" for those two fields. There ought
to be a third choice for just "changed" but that would have been
more complicated.
Three-way swap: move blindfold to alt-weapon slot, alt-weapon to
quiver slot, and quiver to former blindfold slot. Affects first
and third rows of the 6x3 grid.
Before |After
x H b | b H q
S a w | S a w
G C q | G C x
[x=alt-weapon, H=helmet, b=blindfold, S=shield, a=amulet, w=weapon,
G=gloves, C=cloak, q=quiver; bottom three rows not changed so not
shown.]
New for Qt, moving the mouse over one of the slots in the paperdoll
inventory subset and letting it pause there will use Qt's tool tip
mechanism to give a description of the item under the pointer, if
there is one, or of what the slot would contain when there isn't.
So "e - uncursed leather gloves (being worn)" or "no gloves" when
the pointer is over the glove slot. If you do something with the
keyboard to make the paperdoll change while the mouse is still
hovering, you'll need to move the pointer slightly to have Qt
recheck for tool tip at that spot. It may be feasible to force
an immediate update, but I'm satisfied with how it's working.
Interestingly, you can move pointer and hover while yn_function()
has asked you to pick an inventory item and is waiting for an
answer. Mostly useful for Take-off/Remove or #adjust.
The toolbar contains do-Again, Pick up, Drop, Kick, Throw, Fire,
Eat, and Rest. Insert Search in front of Rest since it's useful
in its own right and some players prefer it even when resting.
Includes a new 12x13 icon; a tiny magnifying glass shown straight
on is something I can manage.
Both the toolbar button for pick up and the action menu entry for
pick up were labeled "Get". That's confusing for an experienced
player who is looking for "Pick up". Rename both of them.
Also, consolidate repetitive code used to set up toolbar buttons.
An issue in the core made the "Zz" button in the Qt toolbar only
work if rest_on_space was enabled. cmd_from_func() was returning
' ' instead of '.' for the keystroke to run the rest command.
Because some Makefile.top dependencies triggered the build
of the host native lua library, the cross-compiles were
building it needlessly.
Make it a make variable so that it can be overridden by
cross-compile recipes in sys/unix/hints/include/cross-*.2020
Use ansimpleoname() instead of doname() to describe the key or
lock pick or credit card when reporting "You can't fix a chest's
broken lock with a <foo>." doname() includes BUC status when
known and feedback mentioning a particular bless/curse state on
the tool that can't be used to fix the lock suggests that some
other bless/curse state might be viable.
In file included from makedefs.c:213:0:
../src/mdlib.c: In function ‘runtime_info_init’:
../src/mdlib.c:808:12: warning: variable ‘timeresult’ set but not used [-Wunused-but-set-variable]
time_t timeresult;
^~~~~~~~~~
makedefs.c: In function ‘do_date’:
makedefs.c:1140:16: warning: unused variable ‘ind’ [-Wunused-variable]
const char ind[] = " ";
^~~
makedefs.c:1139:9: warning: unused variable ‘steps’ [-Wunused-variable]
int steps = 0;
^~~~~
makedefs.c: In function ‘do_monstr’:
makedefs.c:1934:12: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
int i, j;
^
Replace use of $(LINK) with $(CLINK) or $(CXXLINK) as warranted.
When the Qt interface is enabled, the utility programs were all
(except dlb) being linked with C++ support. That didn't cause
any problems, just looked wrong. Link them as C instead of C++.
Two actually do need C++ support (and still have it) but both
are dead: 'tile2beos' because the source file doesn't exist (not
even in 'outdated'), 'tileedit' because it won't build with Qt5.
I didn't bother with QUIETCC support for them.
There were still a couple of references to dgn_comp (for the lint
target; just in the name of a macro, not its value); remove those.
When qt_yn_function() or qt_more() is asking for a single character
response, typing anything will cause the prompt line in the message
window to stop being highlighted. If they reject what's been typed,
they beep (--More-- doesn't start beeping until second rejection);
change both of them to also rehighlight the prompt line to give a
visual indication that the question/acknowledgement is still being
asked.
Prevent a small inventory menu as the first one shown from forcing
all subsequent ones from being the same short height by forcing it
to have room for at least 15 lines. Temporary hack until someone
figures out why resizing the reused WIN_INVEN isn't working.
Does not affect non-inventory menus which get created on demand and
destroyed when done so don't need to change size to fit different
contents.