]> granicus.if.org Git - nethack/log
nethack
3 years agoDon't 'fall' and self-stone when flying down
Michael Meyer [Fri, 14 Jan 2022 16:48:46 +0000 (11:48 -0500)]
Don't 'fall' and self-stone when flying down

When a flying hero deliberately "swoops" through a trap door or hole,
consider the movement down to the next level to be controlled flight
rather than falling, preventing the sort of inadvertent touching of a
carried cockatrice corpse that happens when falling between levels.

3 years agotested Jan 11 visual studio updates
nhmall [Fri, 14 Jan 2022 02:45:05 +0000 (21:45 -0500)]
tested Jan 11 visual studio updates

3 years agoyet more help
PatR [Fri, 14 Jan 2022 00:56:32 +0000 (16:56 -0800)]
yet more help

Add an extra couple of sentences explantion for control and meta.
Noticed an omitted command in the process.

3 years agomore user help
PatR [Fri, 14 Jan 2022 00:32:37 +0000 (16:32 -0800)]
more user help

A couple of additional things witnessed in between the frequent adds
shown by youtube (top prize goes to the recurring popup ad advertising
popup blocking).

He knew that ^D meant a control character but thought that he had to
type Ctrl+Shift+d instead of just being able to type Ctrl+d.  And he
had no idea what "meta key" meant.  (I don't think I've ever seen a
key labeled that myself.)

3 years agolinking with Qt6 support on Linux
nhmall [Thu, 13 Jan 2022 23:27:21 +0000 (18:27 -0500)]
linking with Qt6 support on Linux

3 years ago'O' assistance
PatR [Thu, 13 Jan 2022 22:25:01 +0000 (14:25 -0800)]
'O' assistance

I don't care for this very much at all, but making it shorter will
reduce its usefullness.  It addresses one of the struggles exhibited
in the "a man and his cat" youtube video, where he was baffled when
selecting booleans didn't change their values and he later used Esc
instead of Enter after eventually finding number_pad.

This inserts some explanatory text (around three dozen lines,
unfortunately) at the start of 'O's menu.  Some of it is general menu
stuff, some is specific options stuff, and some attempts to fend off
various bug reports about options that do or don't persist across
save and restore or RC revisions that seem to have no effect.

The new introductory text can be disabled by turning off cmdassist.
Players who already do that don't need to see this.  Many who ignore
cmdassist and occasionally endure an outburst of compass directions
are likely to be goaded into turning it off.  I hope we won't need a
new 'optassist' for players who want to skip this but leave cmdassist
in general on.

It doesn't attempt to address his attempt to use arrow keys (possibly
arrows overloaded on number pad keys, or perhaps just digits on the
number pad while numpad mode was off) to navigate the menu then having
the Windows port 'helpfully' change those into hjkl which resulted in
selecting and subsequently unintentionally toggling some options on
the first page.  One was 'color' which he did notice and then re-run
'O' to successfully toggle it back on.  There was at least one other
which he either didn't notice to didn't both to reverse.

3 years agoremove a couple of debugging lines
nhmall [Thu, 13 Jan 2022 19:35:07 +0000 (14:35 -0500)]
remove a couple of debugging lines

3 years agotypo fix
nhmall [Thu, 13 Jan 2022 19:30:52 +0000 (14:30 -0500)]
typo fix

3 years agobuild with Qt6 support on Linux
nhmall [Thu, 13 Jan 2022 19:09:41 +0000 (14:09 -0500)]
build with Qt6 support on Linux

3 years agomove_update()
PatR [Wed, 12 Jan 2022 07:42:13 +0000 (23:42 -0800)]
move_update()

Some changes I made while investigating the unpaid_code impossible.
Shouldn't produce any noticeable changes in behavior.

3 years agofix #K3514 - unpaid_cost() impossible
PatR [Wed, 12 Jan 2022 07:32:13 +0000 (23:32 -0800)]
fix #K3514 - unpaid_cost() impossible

Fix the reported bug of using Passes_walls to carry an unpaid item
from inside a shop into the wall it shares with another shop
producing a situation where examining inventory issued an impossible
"unpaid_cost: object wasn't on any bill" when trying to append the
cost to the formatted inventory line.  u.ushops[], u.ushops0[], and
others are lists that can have up to four entries and the relevant
code was only checking the first one.

Not mentioned in the report:  continuing another step into the other
shop didn't get recognized as robbing the first shop, for a similar
reason.

For either of these bugs, digging a breach in the wall, paying off
the miffed shopkeeper, then stepping into the breach before it gets
repaired will probably trigger the same results without the need for
polymorphing into a xorn or earth elemental.  But not on the tourist
goal level test case since walls there are undiggable.

I didn't go looking for other instances of not checking all relevant
shopkeepers.  It wouldn't surprise me if there are some more.

3 years agomore Qt player selection
PatR [Tue, 11 Jan 2022 22:56:33 +0000 (14:56 -0800)]
more Qt player selection

Mostly expands the comment about the layout of the selection dialog.
Also adds filtering available roles and races by the currently checked
alignment.

3 years agomonnum_to_glyph() followup
PatR [Tue, 11 Jan 2022 22:42:28 +0000 (14:42 -0800)]
monnum_to_glyph() followup

This was a fix for missing parentheses, but that just became redundant.
Add it anyway, for the reformatting.

3 years agoGuidebook.txt update from cron job
nhmall [Tue, 11 Jan 2022 22:38:46 +0000 (17:38 -0500)]
Guidebook.txt update from cron job

3 years agoThis is cron-daily v1-Jan-11-2022. 001datesub updated: ./doc/Guidebook.tex ./doc...
nhw_cron [Tue, 11 Jan 2022 22:24:08 +0000 (17:24 -0500)]
This is cron-daily v1-Jan-11-2022.  001datesub updated: ./doc/Guidebook.tex ./doc/Guidebook.mn

3 years agomacro argument monnum_to_glyph
nhmall [Tue, 11 Jan 2022 22:00:31 +0000 (17:00 -0500)]
macro argument monnum_to_glyph

In file included from ../include/hack.h:217,
                 from ../win/Qt/qt_plsel.cpp:18:
../win/Qt/qt_plsel.cpp: In member function ‘void nethack_qt_::NetHackQtPlayerSelector::populate_roles()’:
../win/Qt/qt_plsel.cpp:378:53: warning: enumerated and non-enumerated type in conditional expression [-Wextra]
  378 |         gf = monnum_to_glyph(roles[i].malenum, is_f ? FEMALE : MALE);
../include/display.h:610:27: note: in definition of macro ‘monnum_to_glyph’
  610 |                         ((gnd == MALE) ? GLYPH_MON_MALE_OFF : GLYPH_MON_FEM_OFF))
      |                           ^~~
../win/Qt/qt_plsel.cpp: In member function ‘void nethack_qt_::NetHackQtPlayerSelector::populate_races()’:
../win/Qt/qt_plsel.cpp:407:53: warning: enumerated and non-enumerated type in conditional expression [-Wextra]
  407 |         gf = monnum_to_glyph(races[j].malenum, is_f ? FEMALE : MALE);
../include/display.h:610:27: note: in definition of macro ‘monnum_to_glyph’
  610 |                         ((gnd == MALE) ? GLYPH_MON_MALE_OFF : GLYPH_MON_FEM_OFF))
      |                           ^~~

3 years agoMerge branch 'keni-datesub2' into NetHack-3.7
Kenneth Lorber [Tue, 11 Jan 2022 21:49:21 +0000 (16:49 -0500)]
Merge branch 'keni-datesub2' into NetHack-3.7

3 years agoFix shopkeeper Kop summons causing segfault
Pasi Kallinen [Tue, 11 Jan 2022 20:55:40 +0000 (22:55 +0200)]
Fix shopkeeper Kop summons causing segfault

... if it happened on a level with no downstairs, such as the tourist quest.

3 years agoEnable automated date generation on the Guidebook source files.
Kenneth Lorber [Tue, 11 Jan 2022 20:39:20 +0000 (15:39 -0500)]
Enable automated date generation on the Guidebook source files.

3 years agosuppress obsolete restore_attrib()
PatR [Tue, 11 Jan 2022 19:25:04 +0000 (11:25 -0800)]
suppress obsolete restore_attrib()

moveloop() has been calling restore_attrib() every turn, and
restore_attrib() loops through all six characteristics every time
to check for ones that have temporary adjustments timing out.  But
ATIME(characteristic) is never set anywhere and no time outs would
occur.  So delete the call to restore_attrib() from moveloop().

This leaves that no-longer-called routine in place and updates it
to handle Wounded_legs properly in case it ever does get used.

Also, add a comment about "restore ability" not fixing temporarily
lost characteristics due to hunger or wounded legs.  And update
unfixable_trouble_count() to check for those so that restore ability
won't say "you feel great" when it fails to fix them.

3 years agofix recent Wounded_legs fix
PatR [Tue, 11 Jan 2022 18:25:50 +0000 (10:25 -0800)]
fix recent Wounded_legs fix

Wounded_legs was changed from (HWounded_legs || EWounded_legs) to
just (HWounded_legs), but when the timeout code decremented the timer
to 0, HWounded_legs became 0 and heal_legs() operated as if there was
nothing to repair and hero didn't recover from temporarily lost Dex.
Change Wounded_legs back to (HWounded_legs || EWounded_legs).

3 years agoQt player selection dialog
PatR [Mon, 10 Jan 2022 21:23:09 +0000 (13:23 -0800)]
Qt player selection dialog

During role/race/gender/alignment selection, when gender gets toggled
replace the gender-specific role titles and their icons to reflect
new gender value.  And enable or disable Valkyrie choice depending
upon the gender value, not just current race value.

This ended up revising a lot of the NetHackQtPlayerSelector code,
eliminating some redundancies and being more careful with the use of
validrace()/validgend()/validalign().  That still isn't bulletproof.

It also changes the two instances of buttonPressed that were drawing
Qt6 warnings from connect() at run-time with buttonClicked.  That
works as intended with Qt5 and might eliminate those.

The code to use female player character tiles looks correct to me
but when I toggle gender, role titles change but their icons don't.
I don't know what's going on here.  Some ealier code always specifies
MALE but that code isn't used according to various prints to stderr
that I temporarily inserted.

3 years agoremove some dev code
nhmall [Mon, 10 Jan 2022 19:18:12 +0000 (14:18 -0500)]
remove some dev code

Closes #648

3 years agoMore "user canceled" extended command return values
Pasi Kallinen [Mon, 10 Jan 2022 15:37:48 +0000 (17:37 +0200)]
More "user canceled" extended command return values

3 years agofix typo in Guidebook.tex
SHIRAKATA Kentaro [Mon, 10 Jan 2022 12:33:34 +0000 (21:33 +0900)]
fix typo in Guidebook.tex

3 years agoX11 fixes
PatR [Sun, 9 Jan 2022 21:27:23 +0000 (13:27 -0800)]
X11 fixes

Fix the warnings issued when compiling win/X11/.  The error handler
one is presumeably due to a change in /usr/include/X11/Intrinsic.h
between different releases of X11 and is inconsequential.  The
indentation ones represented real bugs.  The X11 convention of using
'foo(); argcount++;' requires braces when preceded by 'if' or 'else'.
I don't know why the convention doesn't use comma instead of semi-colon
between the function that adds an entry to an argument list and the
accumulating count of the number of those arguments.

A few years ago I added code to zero out various argument lists prior
to their use, which shouldn't have been necessary.  The wrong argument
count being used when the 'if (whatever)' check fails could possibly
have been the reason that pre-zeroing solved mystery problems.  I don't
remember enough details to attempt to go back and retest with this fix
in place.

3 years agowhitelist several non-literal format strings
nhmall [Sun, 9 Jan 2022 19:18:10 +0000 (14:18 -0500)]
whitelist several non-literal format strings

djgpp cross-compiler was griping about several.

This also removes these lines from sys/unix/hints/include/compiler.370.
    CFLAGS+=-Wno-format-nonliteral
    CCXXFLAGS+=-Wno-format-nonliteral

-Wformat-nonliteral should not be incompatible with the printf
argument-checking capabilities on literal format strings and there
shouldn't be any new warnings created.

-- &< --

artifact.c: In function 'artifact_hit':
artifact.c:1309:23: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1309 |                       mon_nam(mdef));
      |                       ^~~~~~~
artifact.c:1328:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1328 |                 pline(behead_msg[rn2(SIZE(behead_msg))], wepdesc, "you");
      |                 ^~~~~

ball.c: In function 'drop_ball':
ball.c:896:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  896 |                 pline(pullmsg, "pit");
      |                 ^~~~~
ball.c:899:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  899 |                 pline(pullmsg, "web");
      |                 ^~~~~
ball.c:904:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  904 |                 pline(pullmsg, hliquid("lava"));
      |                 ^~~~~
ball.c:908:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  908 |                 pline(pullmsg, "bear trap");
      |                 ^~~~~

dig.c: In function 'liquid_flow':
dig.c:747:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  747 |         pline(fillmsg, hliquid(typ == LAVAPOOL ? "lava" : "water"));
      |         ^~~~~

fountain.c: In function 'floating_above':
fountain.c:28:5: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
   28 |     You(umsg, what);
      |     ^~~

invent.c: In function 'hold_another_object':
invent.c:1018:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1018 |                 pline(drop_fmt, drop_arg);
      |                 ^~~~~
invent.c:1073:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1073 |         pline(drop_fmt, drop_arg);
      |         ^~~~~
invent.c: In function 'silly_thing':
invent.c:1811:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1811 |         pline(silly_thing_to, word);
      |         ^~~~~

lock.c: In function 'pick_lock':
lock.c:375:19: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  375 |             pline(no_longer, "hold the", what);
      |                   ^~~~~~~~~
lock.c:379:19: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  379 |             pline(no_longer, "reach the", "lock");
      |                   ^~~~~~~~~
lock.c: In function 'pick_lock':
lock.c:375:19: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  375 |             pline(no_longer, "hold the", what);
      |                   ^~~~~~~~~
lock.c:379:19: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  379 |             pline(no_longer, "reach the", "lock");
      |                   ^~~~~~~~~
mcastu.c: In function 'cast_cleric_spell':
mcastu.c:670:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  670 |             pline(fmt, Monnam(mtmp), what);
      |             ^~~~~

mhitu.c: In function 'hitmsg':
mhitu.c:68:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
   68 |             pline(pfmt, Monst_name);
      |             ^~~~~

mkobj.c: In function 'insane_object':
mkobj.c:2848:20: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2848 |         impossible(altfmt, mesg, fmt_ptr((genericptr_t) obj), where_name(obj),
      |                    ^~~~~~
mkobj.c:2852:20: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2852 |                    objnm);
      |                    ^~~~~

mon.c: In function 'mon_givit':
mon.c:1469:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1469 |         pline(msg, Monnam(mtmp));
      |         ^~~~~
mon.c: In function 'mondead':
mon.c:2485:33: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2485 |                                 | SUPPRESS_INVISIBLE), FALSE));
      |                                 ^

muse.c: In function 'mon_reflects':
muse.c:2438:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2438 |             pline(str, s_suffix(mon_nam(mon)), "shield");
      |             ^~~~~
muse.c:2445:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2445 |             pline(str, s_suffix(mon_nam(mon)), "weapon");
      |             ^~~~~
muse.c:2450:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2450 |             pline(str, s_suffix(mon_nam(mon)), "amulet");
      |             ^~~~~
muse.c:2458:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2458 |             pline(str, s_suffix(mon_nam(mon)), "armor");
      |             ^~~~~
muse.c:2464:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2464 |             pline(str, s_suffix(mon_nam(mon)), "scales");
      |             ^~~~~
muse.c: In function 'ureflects':
muse.c:2476:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2476 |             pline(fmt, str, "shield");
      |             ^~~~~
muse.c:2483:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2483 |             pline(fmt, str, "weapon");
      |             ^~~~~
muse.c:2487:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2487 |             pline(fmt, str, "medallion");
      |             ^~~~~
muse.c:2493:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2493 |             pline(fmt, str, uskin ? "luster" : "armor");
      |             ^~~~~
muse.c:2497:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2497 |             pline(fmt, str, "scales");
      |             ^~~~~

polyself.c: In function 'polyman':
polyself.c:201:5: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  201 |     urgent_pline(fmt, arg);
      |     ^~~~~~~~~~~~

potion.c: In function 'make_hallucinated':
potion.c:423:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  423 |             pline(message, verb);
      |             ^~~~~
potion.c: In function 'peffect_gain_level':
potion.c:1033:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1033 |                 You(riseup, ceiling(u.ux, u.uy));
      |                 ^~~
potion.c:1044:21: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1044 |                     You(riseup, ceiling(u.ux, u.uy));
      |                     ^~~

priest.c: In function 'intemple':
priest.c:487:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  487 |                 You(msg1, msg2);
      |                 ^~~

read.c: In function 'doread':
read.c:522:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  522 |         pline(silly_thing_to, "read");
      |         ^~~~~

shk.c: In function 'shk_names_obj':
shk.c:2576:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2576 |         pline(fmtbuf, obj_name, (obj->quan > 1L) ? "them" : "it", amt,
      |               ^~~~~~
shk.c:2579:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2579 |         You(fmt, obj_name, amt, plur(amt), arg);
      |         ^~~
shk.c: In function 'shk_chat':
shk.c:4506:13: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 4506 |             pline(Izchak_speaks[rn2(SIZE(Izchak_speaks))], shkname(shkp));
      |             ^~~~~
shk.c: In function 'check_unpaid_usage':
shk.c:4633:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 4633 |         verbalize(fmt, arg1, arg2, tmp, currency(tmp));
      |         ^~~~~~~~~

sounds.c: In function 'dosounds':
sounds.c:66:21: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
   66 |                     pline(throne_msg[2], uhis());
      |                     ^~~~~
sounds.c:259:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  259 |                 You_hear(msg, halu_gname(EPRI(mtmp)->shralign));
      |                 ^~~~~~~~

timeout.c: In function 'choke_dialogue':
timeout.c:269:26: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  269 |                          body_part(NECK));
      |                          ^~~~~~~~~
timeout.c:274:17: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  274 |                 urgent_pline(str, hcolor(NH_BLUE));
      |                 ^~~~~~~~~~~~
timeout.c: In function 'levitation_dialogue':
timeout.c:339:26: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  339 |                          danger ? surface(u.ux, u.uy) : "air");
      |                          ^~~~~~
timeout.c: In function 'slime_dialogue':
timeout.c:379:34: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  379 |                     urgent_pline(buf, hcolor(NH_GREEN));
      |                                  ^~~
timeout.c:381:30: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
  381 |                 urgent_pline(buf, an(Hallucination ? rndmonnam(NULL)
      |                              ^~~

uhitm.c: In function 'hmon_hitmon':
uhitm.c:1398:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1398 |         pline(fmt, whom);
      |         ^~~~~
uhitm.c:1421:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1421 |         pline(fmt, whom);
      |         ^~~~~
uhitm.c: In function 'stumble_onto_mimic':
uhitm.c:5301:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 5301 |         pline(fmt, what);
      |         ^~~~~

../win/tty/wintty.c: In function 'tty_clear_nhwindow':
../win/tty/wintty.c:1649:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 1649 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_display_nhwindow':
../win/tty/wintty.c:2339:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2339 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_dismiss_nhwindow':
../win/tty/wintty.c:2432:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2432 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_destroy_nhwindow':
../win/tty/wintty.c:2477:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2477 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_curs':
../win/tty/wintty.c:2503:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2503 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_putsym':
../win/tty/wintty.c:2599:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2599 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_add_menu':
../win/tty/wintty.c:2967:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 2967 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_end_menu':
../win/tty/wintty.c:3032:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 3032 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~
../win/tty/wintty.c: In function 'tty_select_menu':
../win/tty/wintty.c:3140:15: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
 3140 |         panic(winpanicstr, window);
      |               ^~~~~~~~~~~

3 years agoUse visctrl like in other places
Pasi Kallinen [Sun, 9 Jan 2022 17:27:47 +0000 (19:27 +0200)]
Use visctrl like in other places

3 years agoperm_invent update when applying a bag of tricks
Pasi Kallinen [Sun, 9 Jan 2022 14:40:35 +0000 (16:40 +0200)]
perm_invent update when applying a bag of tricks

3 years agolibnh follow-up
nhmall [Sun, 9 Jan 2022 01:38:22 +0000 (20:38 -0500)]
libnh follow-up

3 years agoparsebindings() vs commas
PatR [Sat, 8 Jan 2022 20:32:49 +0000 (12:32 -0800)]
parsebindings() vs commas

The set-but-not-used warning for 'ret' revealed an actual bug this
time.  Parsing sysconf cares whether any errors were encountered
when parsing its contents, but BINDINGS=key1:cmd1,key2:cmd2 only
returned the result of the first key in the comma-separated list
because the result from recursive calls was lost to the set-but-
not-used variable.  Just adding use of that variable would have
ended up reporting success if any key bound succesfully rather than
requiring that they all do as sysconf parse handling intends.

Also, binding comma to a command required that it be specified by
its numeric value because parsing via recursion ate up the actual
commas.  Now allow "BINDINGS=,:cmd" or "keyM:cmdM,,:cmdN" or
"BINDINGS=\,:cmd" or "keyM:cmdM,\,:cmdN".

It also recognizes "BINDINGS=',':cmd" and "keyM:cmdM,',':cmdN" but
that yields an invalid key error for "','".  I thought txt2key()
supported that but it doesn't.  I've left this in because the error
about ',' not being recognized as a key seems better than one about
"'" not being a valid key bind and then accidentally binding single
quote via post-comma "':command".

3 years agohmonas() unused 'nsum'
PatR [Sat, 8 Jan 2022 18:57:16 +0000 (10:57 -0800)]
hmonas() unused 'nsum'

Get rid of set-but-not-otherwise-used variable 'nsum'.  At one time
it was used to figure out hmonas()'s return value, but that changed
three years ago.  And hmonas()'s only caller discards that return
value anyway.

3 years agotone down a comment
nhmall [Sat, 8 Jan 2022 18:41:47 +0000 (13:41 -0500)]
tone down a comment

3 years agoAdd "user canceled" as extended command return value
Pasi Kallinen [Sat, 8 Jan 2022 18:04:54 +0000 (20:04 +0200)]
Add "user canceled" as extended command return value

Instead of returning ECMD_OK, the commands now return ECMD_CANCEL
when user declined to pick a direction or an object to act on.

Note that this can be ORed with ECMD_TIME, if the command still
took a turn.

For now this has no gameplay meaning.

3 years agoRemove useless variable
Pasi Kallinen [Sat, 8 Jan 2022 17:15:02 +0000 (19:15 +0200)]
Remove useless variable

3 years agofix some libnh wasm build issues
nhmall [Sat, 8 Jan 2022 16:16:57 +0000 (11:16 -0500)]
fix some libnh wasm build issues

emcc: error: linker setting ignored during compilation: 'ASSERTIONS' [-Wunused-command-line-argument] [-Werror]
make[1]: *** [Makefile:1306: ../targets/wasm/allmain.o] Error 1

wasm-ld: error: ../targets/wasm/version.o: undefined symbol: nomakedefs

These ones look like actual NetHack issues that this particular compile is catching due to
default -Wunused-but-set-variable.

In the interest of time today, I mostly resorted to using nhUse() on them for now, but a
follow-up by someone might be useful.

options.c:6069:13: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
    boolean ret = FALSE;
            ^

restore.c:903:9: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable]
    int len = 0;
        ^

uhitm.c:4539:43: error: variable 'nsum' set but not used [-Werror,-Wunused-but-set-variable]
    int i, tmp, armorpenalty, sum[NATTK], nsum = MM_MISS,
                                          ^

3 years agoupdate_inventory arg change
nhmall [Sat, 8 Jan 2022 15:04:40 +0000 (10:04 -0500)]
update_inventory arg change

Commit dd4943129601a2482531c782852f9a744c7362e6 changed the window port
interface to add an argument to update_inventory, but neglected to fix
the win/shim files.

3 years agolibnh missing prototypes
nhmall [Sat, 8 Jan 2022 15:00:35 +0000 (10:00 -0500)]
libnh missing prototypes

3 years agotty: document the termcap codes
Pasi Kallinen [Fri, 7 Jan 2022 15:41:35 +0000 (17:41 +0200)]
tty: document the termcap codes

some of the termcap codes were missing document comments.

3 years agoFix a brain fart when ORing MM_NOMSG
Pasi Kallinen [Fri, 7 Jan 2022 05:24:21 +0000 (07:24 +0200)]
Fix a brain fart when ORing MM_NOMSG

3 years agoQt: force 'toptenwin' option On
PatR [Thu, 6 Jan 2022 20:25:17 +0000 (12:25 -0800)]
Qt: force 'toptenwin' option On

'toptenwin' defaults to false, so the high scores list at end of game
gets written to stdout by default.  stdout might be a bit bucket if
the game is started from a menu somewhere or from Explorer or Finder
or something comparable.  Even when started from a terminal, writing
to stdout is bad if running asynchronously ('nethack &').

Have Qt init force the 'toptenwin' option to true to show the high
scores in a pop-up text window.  The "since you were in wizard mode
your score is ignored" line also goes to a pop-up text window now too.
An extra <return> is needed to dismiss that when quitting if you go
through the full disclosure sequence.

'nethack -s' writes scores to stdout before interface initialization
takes place, so isn't affected by this change.  That's intentional so
that 'nethack -s > ~/myscores' can be used to capture the output.

3 years agoApply a wielded bullwhip with fire-command
Pasi Kallinen [Thu, 6 Jan 2022 15:12:30 +0000 (17:12 +0200)]
Apply a wielded bullwhip with fire-command

3 years agoDon't autoquiver aklys
Pasi Kallinen [Thu, 6 Jan 2022 12:39:27 +0000 (14:39 +0200)]
Don't autoquiver aklys

... even though it is a throwing weapon, it's meant to be wielded
and fired instead of fired from quiver.

3 years agoFixes entry
Pasi Kallinen [Thu, 6 Jan 2022 12:34:33 +0000 (14:34 +0200)]
Fixes entry

3 years agoAccessibility: give message for created monsters
Pasi Kallinen [Thu, 6 Jan 2022 12:00:52 +0000 (14:00 +0200)]
Accessibility: give message for created monsters

Always give a message when creating a detected monster
during gameplay (as opposed to during level creation).
To prevent the message, use the MM_NOMSG flag for makemon.

Most places already handled their own messaging, but there
were some, such as bag of tricks, create monster magic
and random monsters created during gameplay that didn't.

3 years agofixes entry for PR #651 - single-char engraving
PatR [Thu, 6 Jan 2022 09:44:45 +0000 (01:44 -0800)]
fixes entry for PR #651 - single-char engraving

Pull request from vultur-cadens:  when engraving with a weapon, the
occupation routine doesn't dull it on the last character, so engraving
a single character never dulled the weapon.  Didn't apply to engraving
with other types of items.

Closes #651

3 years agoFix single-character engraving not dulling the weapon.
vultur-cadens [Wed, 5 Jan 2022 02:31:53 +0000 (18:31 -0800)]
Fix single-character engraving not dulling the weapon.

3 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
Alex Smith [Wed, 5 Jan 2022 23:22:54 +0000 (23:22 +0000)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

3 years agoMessage fix for burden changes during end-of-turn updates
Alex Smith [Wed, 5 Jan 2022 23:17:27 +0000 (23:17 +0000)]
Message fix for burden changes during end-of-turn updates

This fixes the messages displayed when, e.g., the hero becomes
unburdened as a consequence of a corpse rotting away. (There are no
gameplay changes; the effective burden level is fixed between turns
under both the old and new mechanisms, and any other use of it will
recalculate it prior to using it.)

Not changed: the interaction of overexert_hp with burden changes due
to timeout. You were holding the corpse during your turn, so even if
it rots away at the end of the turn, you can still pass out from the
exertion you applied during that turn.

3 years agomakedefs revision
PatR [Wed, 5 Jan 2022 20:50:21 +0000 (12:50 -0800)]
makedefs revision

This started out as fix for a comment but ended up redoing 'limit()'
and its 'temp[]' because they seemed likely to someday interfere with
other uses of such generic names.

No change to observable behavior.

3 years agoAdd missing article
Pasi Kallinen [Wed, 5 Jan 2022 16:00:28 +0000 (18:00 +0200)]
Add missing article

3 years agoAllocate rects dynamically
Pasi Kallinen [Wed, 5 Jan 2022 15:35:30 +0000 (17:35 +0200)]
Allocate rects dynamically

... instead of hard-coding them to 50. New allocated value is
(COLNO*ROWNO)/30, which is slightly higher (56), and that formula
seems to work for hypothetical larger maps too.

3 years agoFix segfault in hypothetical case of huge COLNO
Pasi Kallinen [Wed, 5 Jan 2022 11:51:44 +0000 (13:51 +0200)]
Fix segfault in hypothetical case of huge COLNO

3 years agoFix X11 tombstone string overflow
Pasi Kallinen [Tue, 4 Jan 2022 20:28:00 +0000 (22:28 +0200)]
Fix X11 tombstone string overflow

3 years agoQt tile rendering
PatR [Tue, 4 Jan 2022 20:23:06 +0000 (12:23 -0800)]
Qt tile rendering

Get rid of the no longer used 'fem' argument for Qt's tile drawing
routines.  It's incorporated in the tile index these days.

3 years agoQt: more ant extermination
PatR [Tue, 4 Jan 2022 19:54:05 +0000 (11:54 -0800)]
Qt: more ant extermination

After the fairly recent glyph changes, the icons shown for roles and
races during the character selection dialog all were all depicted by
the giant ant tile.  I might have noticed this sooner but usually
have '-@' on the command line to bypass selection.

3 years agoUpdate lua api docs
Pasi Kallinen [Tue, 4 Jan 2022 19:29:06 +0000 (21:29 +0200)]
Update lua api docs

3 years agoMark extended commands accepting m-prefix in the command flags
Pasi Kallinen [Tue, 4 Jan 2022 17:29:15 +0000 (19:29 +0200)]
Mark extended commands accepting m-prefix in the command flags

3 years agofixes entry for ubuntu 21.10 change
nhmall [Tue, 4 Jan 2022 13:48:21 +0000 (08:48 -0500)]
fixes entry for ubuntu 21.10 change

Note: Previous commit incorrectly stated 20.10 when it should have
stated 21.10 for impish.

3 years agowork around ubuntu 20.10 build issue
nhmall [Tue, 4 Jan 2022 13:24:08 +0000 (08:24 -0500)]
work around ubuntu 20.10 build issue

NetHack was trying to suppress warn_unused_result
in include/tradstdc.h, by defining warn_unused_result
to an empty string. That began causing a build error
in a system-supplied header file cdefs.h
when using 20.10 ubuntu impish.

Try skipping that in tradstdc.h for any linux, unless
the NetHack build defines GCC_URWARN to force it into
play.

3 years agoReuse code to limit look region
Pasi Kallinen [Tue, 4 Jan 2022 11:10:33 +0000 (13:10 +0200)]
Reuse code to limit look region

3 years agoAdd a false rumor
Pasi Kallinen [Tue, 4 Jan 2022 09:14:12 +0000 (11:14 +0200)]
Add a false rumor

3 years agoMake the adventurer ghost asleep
Pasi Kallinen [Tue, 4 Jan 2022 08:55:09 +0000 (10:55 +0200)]
Make the adventurer ghost asleep

3 years agoupdate patchlevel.h copyright
nhmall [Tue, 4 Jan 2022 05:08:12 +0000 (00:08 -0500)]
update patchlevel.h copyright

3 years agotabs to spaces in tilemap.c
nhmall [Tue, 4 Jan 2022 01:52:57 +0000 (20:52 -0500)]
tabs to spaces in tilemap.c

3 years agogcc-11 warnings in tilemap.c
nhmall [Tue, 4 Jan 2022 01:44:45 +0000 (20:44 -0500)]
gcc-11 warnings in tilemap.c

../win/share/tilemap.c: In function ‘init_tilemap’:
../win/share/tilemap.c:705:61: warning: ‘%s’ directive writing up to 255 bytes into a region of size 122 [-Wformat-overflow=]
  705 |         Sprintf(tilemap[GLYPH_MON_MALE_OFF + i].name, "male %s", buf);
      |                                                             ^~   ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:705:9: note: in expansion of macro ‘Sprintf’
  705 |         Sprintf(tilemap[GLYPH_MON_MALE_OFF + i].name, "male %s", buf);
      |         ^~~~~~~
../win/share/tilemap.c:706:64: warning: ‘%s’ directive writing up to 255 bytes into a region of size 118 [-Wformat-overflow=]
  706 |         Sprintf(tilemap[GLYPH_PET_MALE_OFF + i].name, "%s male %s", "pet", buf);
      |                                                                ^~          ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 10 and 265 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:706:9: note: in expansion of macro ‘Sprintf’
  706 |         Sprintf(tilemap[GLYPH_PET_MALE_OFF + i].name, "%s male %s", "pet", buf);
      |         ^~~~~~~
../win/share/tilemap.c:707:67: warning: ‘%s’ directive writing up to 255 bytes into a region of size 113 [-Wformat-overflow=]
  707 |         Sprintf(tilemap[GLYPH_DETECT_MALE_OFF + i].name, "%s male %s", "detected", buf);
      |                                                                   ^~               ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 15 and 270 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:707:9: note: in expansion of macro ‘Sprintf’
  707 |         Sprintf(tilemap[GLYPH_DETECT_MALE_OFF + i].name, "%s male %s", "detected", buf);
      |         ^~~~~~~
../win/share/tilemap.c:708:67: warning: ‘%s’ directive writing up to 255 bytes into a region of size 115 [-Wformat-overflow=]
  708 |         Sprintf(tilemap[GLYPH_RIDDEN_MALE_OFF + i].name, "%s male %s", "ridden", buf);
      |                                                                   ^~             ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 13 and 268 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:708:9: note: in expansion of macro ‘Sprintf’
  708 |         Sprintf(tilemap[GLYPH_RIDDEN_MALE_OFF + i].name, "%s male %s", "ridden", buf);
      |         ^~~~~~~
../win/share/tilemap.c:709:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 119 [-Wformat-overflow=]
  709 |         Sprintf(tilemap[GLYPH_BODY_OFF + i].name, "%s %s", "body of", buf);
      |                                                       ^~              ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:709:9: note: in expansion of macro ‘Sprintf’
  709 |         Sprintf(tilemap[GLYPH_BODY_OFF + i].name, "%s %s", "body of", buf);
      |         ^~~~~~~
../win/share/tilemap.c:710:63: warning: ‘%s’ directive writing up to 255 bytes into a region of size 111 [-Wformat-overflow=]
  710 |         Sprintf(tilemap[GLYPH_BODY_PILETOP_OFF + i].name, "%s %s", "piletop body of", buf);
      |                                                               ^~                      ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 17 and 272 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:710:9: note: in expansion of macro ‘Sprintf’
  710 |         Sprintf(tilemap[GLYPH_BODY_PILETOP_OFF + i].name, "%s %s", "piletop body of", buf);
      |         ^~~~~~~
../win/share/tilemap.c:732:62: warning: ‘%s’ directive writing up to 255 bytes into a region of size 120 [-Wformat-overflow=]
  732 |         Sprintf(tilemap[GLYPH_MON_FEM_OFF + i].name, "female %s", buf);
      |                                                              ^~   ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:732:9: note: in expansion of macro ‘Sprintf’
  732 |         Sprintf(tilemap[GLYPH_MON_FEM_OFF + i].name, "female %s", buf);
      |         ^~~~~~~
../win/share/tilemap.c:733:65: warning: ‘%s’ directive writing up to 255 bytes into a region of size 116 [-Wformat-overflow=]
  733 |         Sprintf(tilemap[GLYPH_PET_FEM_OFF + i].name, "%s female %s", "pet",
      |                                                                 ^~
  734 |                 buf);
      |                 ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 12 and 267 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:733:9: note: in expansion of macro ‘Sprintf’
  733 |         Sprintf(tilemap[GLYPH_PET_FEM_OFF + i].name, "%s female %s", "pet",
      |         ^~~~~~~
../win/share/tilemap.c:735:68: warning: ‘%s’ directive writing up to 255 bytes into a region of size 111 [-Wformat-overflow=]
  735 |         Sprintf(tilemap[GLYPH_DETECT_FEM_OFF + i].name, "%s female %s",
      |                                                                    ^~
  736 |                 "detected", buf);
      |                             ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 17 and 272 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:735:9: note: in expansion of macro ‘Sprintf’
  735 |         Sprintf(tilemap[GLYPH_DETECT_FEM_OFF + i].name, "%s female %s",
      |         ^~~~~~~
../win/share/tilemap.c:737:68: warning: ‘%s’ directive writing up to 255 bytes into a region of size 113 [-Wformat-overflow=]
  737 |         Sprintf(tilemap[GLYPH_RIDDEN_FEM_OFF + i].name, "%s female %s",
      |                                                                    ^~
  738 |                 "ridden", buf);
      |                           ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 15 and 270 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:737:9: note: in expansion of macro ‘Sprintf’
  737 |         Sprintf(tilemap[GLYPH_RIDDEN_FEM_OFF + i].name, "%s female %s",
      |         ^~~~~~~
../win/share/tilemap.c:739:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 119 [-Wformat-overflow=]
  739 |         Sprintf(tilemap[GLYPH_BODY_OFF + i].name, "%s %s", "body of", buf);
      |                                                       ^~              ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:739:9: note: in expansion of macro ‘Sprintf’
  739 |         Sprintf(tilemap[GLYPH_BODY_OFF + i].name, "%s %s", "body of", buf);
      |         ^~~~~~~
../win/share/tilemap.c:740:63: warning: ‘%s’ directive writing up to 255 bytes into a region of size 111 [-Wformat-overflow=]
  740 |         Sprintf(tilemap[GLYPH_BODY_PILETOP_OFF + i].name, "%s %s",
      |                                                               ^~
  741 |                 "piletop body of", buf);
      |                                    ~~~
In file included from ../include/config.h:643,
                 from ../include/hack.h:10,
                 from ../win/share/tilemap.c:20:
../include/global.h:254:24: note: ‘sprintf’ output between 17 and 272 bytes into a destination of size 127
  254 | #define Sprintf (void) sprintf
../win/share/tilemap.c:740:9: note: in expansion of macro ‘Sprintf’
  740 |         Sprintf(tilemap[GLYPH_BODY_PILETOP_OFF + i].name, "%s %s",
      |         ^~~~~~~
cc -rdynamic -lm -o tilemap tilemap.o ../src/objects.o  \
        ../src/monst.o  ../src/drawing.o

3 years agowounded legs fixes
PatR [Mon, 3 Jan 2022 21:44:05 +0000 (13:44 -0800)]
wounded legs fixes

Document 'HWounded_legs' vs 'EWounded_legs'; they aren't used the way
other properties use their intrinsic and extrinsic values.  And they
switch from hero to steed when riding.  (Can't start riding when
hero's legs are wounded and the steed's legs magically heal when hero
dismounts, so existing wounds never transfer from one to the other.)

Having one leg become injured when the other already was would cure
the other leg but keep the longer of their two timeouts for the new
injury.  Eliminate that mystery cure.  Since their timeouts aren't
tracked separately, the best that can be done is to make both legs
eventually recover at the same time.

Make ^X report which leg is the wounded one when only one of them is.
(It already implicitly reports the both-legs case by using plural.)

When zapping a wand of probing downward while riding, include wounded
leg feedback for the steed.

Simplify wounded leg feedback when probing self a little bit.

Make drinking blessed potions of full healing cure wounded legs for
hero when not mounted or for steed when mounted.  (The latter is a
bit strange--hero drinks potion, steed gets affected--but it's magic.)

Make drinking uncursed potions of full healing or blessed potions of
extra healing cure wounded legs for hero (but not steed; the magic
either isn't that strong or maybe not that reliable...).

3 years agoImprove wizmode-only command unavailability reporting
Pasi Kallinen [Mon, 3 Jan 2022 16:06:11 +0000 (18:06 +0200)]
Improve wizmode-only command unavailability reporting

3 years agoQt map
PatR [Sun, 2 Jan 2022 21:56:53 +0000 (13:56 -0800)]
Qt map

The second half of qt_map.cpp is suppressed by '#if 0'.  Make the
same change to prevent a column of giant ants shown for map column 0
in that unused code as was made for the active code.

3 years agoAdd theme room: Ghost of an Adventurer
Pasi Kallinen [Sun, 2 Jan 2022 17:51:32 +0000 (19:51 +0200)]
Add theme room: Ghost of an Adventurer

3 years agoAdd few hallu colors
Pasi Kallinen [Sun, 2 Jan 2022 13:10:32 +0000 (15:10 +0200)]
Add few hallu colors

3 years agoremove duplicate code in set_option_mod_status()
PatR [Sun, 2 Jan 2022 10:03:49 +0000 (02:03 -0800)]
remove duplicate code in set_option_mod_status()

Remove a duplicate option name lookup loop.  At one time the first
loop checked boolean options and second checked compound options,
but that changed a couple of years ago so that both loops check all
options and the second one became redundant.

3 years agoQt without tiles
PatR [Sun, 2 Jan 2022 09:48:07 +0000 (01:48 -0800)]
Qt without tiles

When tiles fail to load, the Qt interface switches to the text map.
But it wasn't inhibiting the player from trying to switch to tiles
map.  Also, when the text map was in use it was forcing the paper
doll inventory subset to be disabled regardless of whether the map
was by choice or because tiles wouldn't load.  Allow the paper doll
in combination with the text map if tiles got loaded successfully.

3 years agotiled_map option
PatR [Sun, 2 Jan 2022 08:35:52 +0000 (00:35 -0800)]
tiled_map option

It was possible to toggle ascii_map On (which toggles tiled_map Off)
and Off (so tiled_map On) during play, but tiled_map was marked as
config-file only so the converse pair of operations weren't allowed.
Allow tiled_map to be toggled On or Off during play.

3 years agoDefine extra sanity checks if not a release
Pasi Kallinen [Sat, 1 Jan 2022 23:14:16 +0000 (01:14 +0200)]
Define extra sanity checks if not a release

3 years agoensure a sane startup color for windows console
nhmall [Sat, 1 Jan 2022 22:44:14 +0000 (17:44 -0500)]
ensure a sane startup color for windows console

3 years agoInit variable just in case
Pasi Kallinen [Sat, 1 Jan 2022 14:58:34 +0000 (16:58 +0200)]
Init variable just in case

3 years agoAllow tipping container directly into another
Pasi Kallinen [Sat, 1 Jan 2022 14:15:29 +0000 (16:15 +0200)]
Allow tipping container directly into another

3 years agoadd Lua to Qt's "About nethack"
PatR [Sat, 1 Jan 2022 02:15:34 +0000 (18:15 -0800)]
add Lua to Qt's "About nethack"

Add "Lua" and its version number of the 'About' popup.  No copyright
information is included since neither nethack's nor Qt's is shown.

Lua copyright text is included in the output of '#version'.

3 years agoQt tiles file loading
PatR [Fri, 31 Dec 2021 23:29:10 +0000 (15:29 -0800)]
Qt tiles file loading

Redo how Qt retries if it can't load the primary tiles file.

3 years agomore NO_TILE_C
PatR [Fri, 31 Dec 2021 23:02:35 +0000 (15:02 -0800)]
more NO_TILE_C

When USE_TILES is disabled, don't let wc_tiled_map be the default.

Qt is capable of showing an (ugly) ascii map, and will do so if built
with NO_TILE_C after this fix (it defaults to tiles without this),
but it requires that a tiles file be loaded because it displays tiles
in other places besides the map, like role selection.  So it can't
skip them when wc_ascii_map is set.

3 years agoNO_TILE_C => no USE_TILES in tile.c
PatR [Fri, 31 Dec 2021 21:49:43 +0000 (13:49 -0800)]
NO_TILE_C => no USE_TILES in tile.c

Compiling with NO_TILE_C defined results in preventing USE_TILES
from being defined and that causes display.c to use alternate code.
Construct src/tile.c such that nethack links successfully if the
configuration specifies NO_TILE_C but the Makefile goes ahead and
builds tile.c, compiles it, and links with it, otherwise it conflicts
with that alternate code.  Prior to this, linking gave two complaints
about duplicate symbols and failed.

3 years agochange MacOSX to MacOS in version display
nhmall [Fri, 31 Dec 2021 21:44:15 +0000 (16:44 -0500)]
change MacOSX to MacOS in version display

3 years agomacOS homebrew qt@5
nhmall [Fri, 31 Dec 2021 21:06:30 +0000 (16:06 -0500)]
macOS homebrew qt@5

Once 'brew update' and 'brew upgrade' had been done, the qt@5
package did become available for installation and the original
line in the hints file worked, so put it back as it was.

3 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Fri, 31 Dec 2021 19:24:08 +0000 (14:24 -0500)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

3 years agoDefine engulfing_u, making clearer code
Pasi Kallinen [Fri, 31 Dec 2021 19:12:12 +0000 (21:12 +0200)]
Define engulfing_u, making clearer code

3 years agolinux-minimal hints was used with the CI
nhmall [Fri, 31 Dec 2021 19:02:35 +0000 (14:02 -0500)]
linux-minimal hints was used with the CI

3 years agoLeprechauns bury their gold after teleporting
Pasi Kallinen [Fri, 31 Dec 2021 16:48:44 +0000 (18:48 +0200)]
Leprechauns bury their gold after teleporting

3 years agoThis is cron-daily v1-Jan-20-2020. files updated: Files
nhw_cron [Fri, 31 Dec 2021 14:24:08 +0000 (09:24 -0500)]
This is cron-daily v1-Jan-20-2020.  files updated: Files

3 years agohints updates
nhmall [Thu, 30 Dec 2021 21:46:07 +0000 (16:46 -0500)]
hints updates

move out-of-date hints files to the outdated folder.

rename the hints files, and hints/include files that are currently
named *.2020 to *.370 (next release number).

3 years agoQt splash code
PatR [Fri, 31 Dec 2021 09:53:46 +0000 (01:53 -0800)]
Qt splash code

Move the handling for the Qt interface's splash window into its own
routine to unclutter the constructor for QtBind.  Also, don't load
nhsplash.xpm if OPTIONS=!splash has been specified.

3 years agosync linux.2020 topology with macOS.2020
nhmall [Thu, 30 Dec 2021 23:05:45 +0000 (18:05 -0500)]
sync linux.2020 topology with macOS.2020

3 years agoQt map column 0
PatR [Thu, 30 Dec 2021 22:07:59 +0000 (14:07 -0800)]
Qt map column 0

Column 0 ought to be suppressed like it is for tty and curses (not
sure about X11 or Windows GUI), but until that happens, display it as
'nothing'.  The glyph overhaul not too long ago resulted in it being
shown as a column of giant ants.

We ought to have some special 'none of the above' tile #0 that will
stand out enough to be reported and fixed.  Glyph #0 too.

3 years agoremove qt-specifc hints file
nhmall [Thu, 30 Dec 2021 21:27:02 +0000 (16:27 -0500)]
remove qt-specifc hints file

3 years agomacOS homebrew Qt5 build fix
nhmall [Thu, 30 Dec 2021 20:36:59 +0000 (15:36 -0500)]
macOS homebrew Qt5 build fix

I had to revert this line in order to build on macOS Monterey.

3 years agoMerge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into...
nhmall [Thu, 30 Dec 2021 20:15:39 +0000 (15:15 -0500)]
Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7

3 years agoqt6 support follow-up
nhmall [Thu, 30 Dec 2021 20:11:49 +0000 (15:11 -0500)]
qt6 support follow-up

encompass Qt6 support in the common hints file macOS.2020 instead
of a separate macOS.2020-qt6, which had already diverged and would
likely be a maintenance headache.

From the Makefile perspective:
WANT_WIN_QT=1 will default to Qt5
WANT_WIN_QT5=1 will assume Qt5
WANT_WIN_QT6=1 will assume Qt6

You must have the appropriate Qt installed, of course.
I expect some additional fine-tuning will be needed as this gets
tried out.

3 years agoQt vs C() macro
PatR [Thu, 30 Dec 2021 19:29:03 +0000 (11:29 -0800)]
Qt vs C() macro

Our C() macro conflicts with Qt6 usage, so #undef C has added.  Move
that from nearly every qt_*.cpp into qt_pre.h where other similar
fixups are handled.

3 years agoFix: chameleon quickmimic not reset after eating
Michael Meyer [Thu, 30 Sep 2021 04:26:01 +0000 (00:26 -0400)]
Fix: chameleon quickmimic not reset after eating

finish_meating was checking whether the monster in question was a
chameleon/shapechanger, rather than whether it was a mimic, in deciding
which monsters should be allowed to maintain their current appearance
once they finish eating.  This meant that true mimics had their
appearance reset, while a chameleon, vampire, etc, who ate a mimic
would maintain their appearance as a tripe ration even after they had
finished eating and resumed their normal behavior.  The result?  An
amazing living tripe ration which followed the hero around throughout
the level.

3 years agoHave the '$' command include gold in your pack
HMM [Mon, 18 Oct 2021 19:04:14 +0000 (15:04 -0400)]
Have the '$' command include gold in your pack

In verbose mode, the gold in your wallet is totaled separately from
that in containers in your pack, and the two are listed separately.
In terse mode, just print the total of both.

Only known gold is mentioned.