Commit Graph

6509 Commits

Author SHA1 Message Date
Pasi Kallinen
4f95d19ab7 Qt4: Prevent selecting all in pick-one menus 2017-10-10 19:28:03 +03:00
Pasi Kallinen
f06cf62a35 Qt4: Allow clicking anywhere in menus
Instead of requiring clicking on the checkbox, allow clicking
anywhere in a selectable line to select it.
2017-10-10 19:19:20 +03:00
Pasi Kallinen
76d223c178 Qt4: handle menu page selector keys
Qt4 doesn't do menu paging, so handle the select page, invert page,
and unselect page like selecting, inverting or unselecting all.
2017-10-10 18:20:34 +03:00
Pasi Kallinen
e2b367102a Complain if hints file does not exist 2017-10-10 17:50:39 +03:00
Pasi Kallinen
7f495a1ee3 Add context menu for the location next to you 2017-10-10 16:49:07 +03:00
Pasi Kallinen
99c6b7f4da Add context menu for current location
Add a new boolean option herecmd_menu. If this is on, and using
a windowport that supports mouse, clicking on your character pops
up a menu of actions doable in that location. Basically this is
nothing new, as almost all of the same actions were done before
on the mouse click.

You can also pop up the context menu with the #herecmdmenu
extended command
2017-10-10 15:35:33 +03:00
PatR
19663e157f hurtling into unseen monsters
Expand "You bump into it." into something more comprehensive when
encountering an unseen monster while hurtling.  Tested with jumping
but other forms of hurtling should behave the same.
2017-10-09 17:34:02 -07:00
PatR
9b3d358989 fix #H6203 - jumping over water doesn't
Accidentally caused by my grappling hook fix 2 months ago, attempting
to jump over water made hero enter that water and drown (or crawl out).
hurtle_step() was originally intended to be used for recoil while
levitating, but it is used in other situations where not levitating
and behavior for the two circumstances should be different.

This doesn't fix things properly, just gets jumping working again.
2017-10-09 15:27:24 -07:00
Bart House
c64ae2d28d Win32GUI: Clear selection counts for perm invent 2017-10-09 23:32:13 +03:00
Bart House
1ec7bed529 Win32GUI: Use a back buffer for all status rendering
This eliminates all flickering when status is updated.
2017-10-09 20:43:36 +03:00
Bart House
7c24b420a9 Win32GUI: Fix bug with specifying no color for status hilite.
We were mapping NO_COLOR to white instead of the default foreground color.
2017-10-09 14:57:34 +03:00
Bart House
b1f7bd3791 Win32GUI: Set main window background brush to black.
Black is a better choice given that the map background
will always be black. This also creates a better polished
experience when all window backgrounds are set to black.
2017-10-09 14:56:46 +03:00
PatR
024e9e1225 fix #6144 - strength loss from severe hunger
It was possible to arbitrarily boost strength (up to its race-specific
limit) by wearing a ring of sustain ability, becoming weak from hunger
(but not actually losing strength due to Fixed_abil), removing the ring,
eating enough to stop being Weak, then repeat as desired.  I think you
could substitute polymorph for wearing ring, and rehumanize for removing
ring and get similar results, although that would be more tedious.

My first attempt to fix this was a lot more complicated.  This one puts
the temporary strength loss in ATEMP(A_STR) where it carries over from
normal form to polymophed form and back.  Fixed_abil doesn't prevent the
loss any more, nor its recovery.

One side-effect of the change is that the possibility of dying when
becoming weak from hunger (if Str gets down to 3, further attempts to
lower it take away HP instead of Str) no longer exists.  Using ATEMP()
instead of directly manipulating ABASE() means that current strength is
less but underlying base strength does not actually drop any more.
2017-10-08 18:12:08 -07:00
Pasi Kallinen
4659c55b5c Win32GUI: increase scroll_margin
Scrolling when 5 tiles from the edge is far too little,
you could get zapped from farther away.
2017-10-08 18:56:10 +03:00
Pasi Kallinen
61e2960c02 win32: Turn off autopickup by default
Watching new players stream NetHack, the conclusion is that
everyone turns off autopickup by default... once they learn how
to do it.
2017-10-08 18:36:57 +03:00
PatR
5c77360023 still more Master Key of Thievery
Make #untrap while carrying the non-cursed (for rogues) or blessed
(for non-rogues) Key work the same as #invoke has been doing (without
regard to its bless/curse state):  when used on trapped door or chest,
that trap will always be found and disarming it will always succeed.

It should work when carried by monsters too:  if they try to open a
trapped door while carrying the Key (must be blessed since they're
not rogues) the trap will be automatically disarmed.  (Caveat:  that
hasn't been adequately tested.)

TODO (maybe...):  change the #invoke property to detect unseen/secret
door detection instead of #untrap.  The latter isn't completely
redundant; it works when the Key is cursed.  But quest artifacts
strongly resist becoming cursed so that isn't a particularly useful
distinction.

Also, trap hints when wielding the Key without gloves didn't notice
adjacent door and chest traps.  Now it does.  And the behavior is
slightly different:  known traps covered by objects or monsters are
treated like unknown traps as far as the hot/cold hints go.
2017-10-08 03:29:16 -07:00
Pasi Kallinen
6b51f6ce09 Qt4: Use TIMED_DELAY and same delay as tty 2017-10-08 11:28:28 +03:00
Pasi Kallinen
a69c57b865 Automatically define LINUX, ifdef __linux__ 2017-10-08 10:44:59 +03:00
Pasi Kallinen
e8ef27d985 Enable dumplogs for X11 and Qt4 2017-10-08 03:04:52 +03:00
Bart House
8656807b4d Windows GUI supports WC2_HILITE_STATUS
Avoids raw_print on startup
2017-10-08 01:56:18 +03:00
Pasi Kallinen
583edab99f Qt4: Add menucolors
The Qt4 windowport already supported my 3.4.3 menucolors patch, so
adding that was simple.
2017-10-08 01:45:50 +03:00
Bart House
b744e2ce1f Win32GUI: Fix permanent inventory window going away
Fix bug where permanent inventory window would go away after
any operation that used the inventory window to pick items. Since
we were hiding the permanent inventory window, this would also
leave a space filled with white, creating jarring visual if
using dark themed window backgrounds.
2017-10-08 01:26:24 +03:00
Pasi Kallinen
ed335dd0a7 Add Qt4 windowport
Originally by Ray Chason for 3.4.3, based on the Qt windowport by
Warwick Allison. The look and feel is mostly the same.

Some improvements over the Qt 3 interface are:

* Panes are resizable
* Full support for IBMgraphics, and walls and corridors are drawn with
  graphical primitives for a continuous appearance no matter what the font
  says
* Lots of irritating glitches fixed
* Menus support proportional fonts correctly

Adding this because the old Qt windowport cannot be compiled on Qt4,
even with Qt3 compatibility stuff.

TODO:
 - background map glyphs
 - status hilites
 - menucolors
2017-10-08 01:15:02 +03:00
Pasi Kallinen
a4706b0928 Use enums for skills 2017-10-07 17:10:46 +03:00
Pasi Kallinen
9b82b72c6e Unmap invisible glyphs when cleaving and no monster present 2017-10-07 16:30:17 +03:00
Pasi Kallinen
4b7aea0eac Fold invisible glyph unmapping into single function 2017-10-07 16:24:49 +03:00
Bart House
f8760093cc Set the local working directory when debugging to $BinDir.
This is needed to ensure the defaults.nh is found.
2017-10-07 14:25:21 +03:00
PatR
468fc1a925 more Master Key of Thievery: lock/unlock vs traps
Always find traps when using the rogue's quest Key to lock or unlock a
trapped door or chest provided that the Key is not cursed (for rogues)
or is blessed (for non-rogues).  When a trap is found, the player is
given the opportunity to disarm it, and doing so will always succeed.
(It isn't disarmed automatically; the player may prefer to leave traps
in place, presumably hoping to set up a dangerous bones file.  Or he
or she may be unaware of the guaranteed success and be too timid to
risk trying to disarm the trap.)

TODO:  make #untrap of a door or chest while carrying that Key always
find traps (with same bless/curse requirements as above).  And maybe
change its #invoke property from untrap to detect unseen/secret door
detection since current invoke power would become redundant.

Also, move a bunch of new artifact abilities from the fixes section to
the new features section in fixes36.1.
2017-10-07 02:28:20 -07:00
PatR
9a6c3b4192 master key of thievery data.base entry
Make the description of the rogue's Key be more accurate:  it disarms
trapped door and check locks rather than "any trap".
2017-10-06 01:13:17 -07:00
Pasi Kallinen
22ad104318 Master Key of Thievery warns about undetected traps
If the key is wielded and touching skin (that is, you're not
wearing gloves), it will give heat-related messages like
minesweeper, counting the undetected traps around player.
2017-10-06 01:21:06 +03:00
PatR
605227c0d6 untrap() formatting bits 2017-10-05 02:38:25 -07:00
PatR
e8b9805124 STATUS_HILITES vs multiple interface binary
My tty+X11 binary was letting me see and modify status highlights under
X11 even though they don't do anything.  Options parsing has to accept
them since we don't know which interface will be chosen, but interactive
option handling does know and shouldn't show inappropriate options.

initoptions_finish() should probably we validating all the wc and wc2
options, but I only added a check for trying to enable statushilites
when they're unavailable.
2017-10-05 02:01:18 -07:00
PatR
5aa1f3aa08 set_uasmon
Noticed while looking at something else, merging status highlighting
changes introduced a redundant call to polysense() in set_uasmon().
2017-10-04 18:18:21 -07:00
PatR
d9a5190f4d options vs !BACKWARD_COMPAT
Give sensible feedback for obsolete options if options.c is modified
to #undef BACKWARD_COMPAT.  Affects boulder, DECgraphics, IBMgraphics,
and MACgraphics.
2017-10-04 17:51:48 -07:00
nhmall
cadd123dc8 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0 2017-10-04 19:58:42 -04:00
nhmall
aac1d21255 reference the added file sys/msdos/vesa.h in Files 2017-10-04 19:57:31 -04:00
nhmall
c60db38725 missed file in vesa inclusion back in 2016 2017-10-04 19:55:40 -04:00
Pasi Kallinen
856034d585 Cleaver can hit three monsters with one swing
When hitting a monster with the Cleaver, you swing it in an
arc, possibly hitting the monsters to the left and right of
the targeted monster.

Based on code by Fredrik Ljungdahl
2017-10-04 22:01:28 +03:00
nhmall
429288cac9 first build in a long while, clear up a warning
..\src\options.c(4005) : warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(void)'
2017-10-04 12:21:05 -04:00
PatR
8a45da0e8d feature options (#version output)
I've sometimes seen
  , and basic NetHack features.
as the last line of the features section from '#version'.  I thought
it was due to the way feature phrases were split into individual words
by makedefs, but it turned out to be due to inserting pattern matching
method at run-time.  That dynamic options update had a second problem:
if the final phrase "and basic NetHack features" was split across two
lines, the run-time substitution didn't find it and the pattern matching
entry ended up being left out.  This fixes both problems, but if future
dynamic entries become more complex, the phrase-splitting/word-wrapping
being done by makedefs may need to be moved into nethack.

Also, add entries for XLOGFILE and PANICLOG to makedefs' options and
re-order a couple of existing ones alphabetically (a failry hopeless
endeavor).
2017-10-02 18:25:09 -07:00
PatR
67aaf4ef4c more !STATUS_HILITES - option parsing
When built without STATUS_HILITES, don't treat highlighting options as
if they were unknown.  This may need some tweaking; the feedback feels
a bit intrusive so perhaps 'statushilites' and 'hilite_status' should
just be ignored when not available.

'hitpointbar' now relies on wc2 handling instead of being conditionally
present.
2017-10-01 18:49:47 -07:00
PatR
63953bc062 !STATUS_HILITE warning fixes
Mostly declarations of static functions which don't exist (due to being
conditionally excluded).  One unused local variable.
2017-10-01 17:20:30 -07:00
PatR
835c4ae075 yet another comment typo 2017-10-01 16:51:07 -07:00
PatR
f18524bef9 hmon() arg fix
The call to hmon() in flooreffects() was passing a boolean where int
is expected.  The 'thrown' argument may have once been a boolean, but
it is 'int' for as far back as the repository history goes.
2017-10-01 08:16:56 -07:00
Pasi Kallinen
2804e750a0 Default status hilites for Windows 2017-10-01 17:44:41 +03:00
Bart House
78756c9bd6 Addressing bug with the use of static dieroll in uhitm.c. 2017-10-01 14:39:35 +03:00
Bart House
d51f74a507 Fix flashing issue that is seen with STATUS_HILITES in Windows port. 2017-10-01 14:32:43 +03:00
Pasi Kallinen
1027eacbca Give feedback when released from a bear trap 2017-09-28 22:38:08 +03:00
Pasi Kallinen
e2e7e6464d hitpointbar is also available on Windows GUI 2017-09-26 17:45:25 +03:00
Pasi Kallinen
f6070be9e8 Use the existing othropt options array for the menu items 2017-09-26 10:58:26 +03:00