Commit Graph
100 Commits
Author SHA1 Message Date
Pasi Kallinen 46217bbda2 Qt4: Put yn queries in message history
When using OPTIONS=popup_dialog, or compiling with USE_POPUPS,
the yes/no -questions weren't put into the message history.
2017-10-11 09:50:22 +03:00
Pasi Kallinen 76a47b5e34 Qt4: Save message history to dumplog 2017-10-11 01:06:07 +03:00
Pasi Kallinen c6f0058e3d Qt4: Handle saving/loading message history 2017-10-11 00:32:39 +03:00
Pasi Kallinen 2fcf1ad139 Qt4: put and get message history 2017-10-10 22:55:30 +03:00
Pasi Kallinen 4dff3a707e Qt4: Pile mark 2017-10-10 21:47:35 +03:00
Pasi Kallinen dbacc98a1d Qt4: Fix wrong condition in search blocking 2017-10-10 21:13:37 +03:00
Pasi Kallinen 257f17f8df Qt4: Don't segfault with QT_COMPACT 2017-10-10 20:18:04 +03:00
Pasi Kallinen 2fa61f9038 Qt4: Use generic putmixed routine 2017-10-10 19:56:51 +03:00
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
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
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
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
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
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
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
Pasi Kallinen 2804e750a0 Default status hilites for Windows 2017-10-01 17:44:41 +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
Pasi Kallinen 69f7a78dba Hilite Status: Improved
Allow defining multiple stops per field. Add hitpointbar.
2017-09-26 10:04:25 +03:00
Pasi Kallinen 596bc64341 Add option to make commands ask an inventory item via menu
Turning the boolean option force_invmenu makes all the commands
that ask for an inventory item pop up a menu instead of asking
a text query.  This should be much more friendlier to new
players, and is very useful for window ports on systems
with touch screens and no physical keyboard, such as cell phones.
2017-09-23 22:47:14 +03:00
Pasi Kallinen db23363d3f Fix mention_walls reporting secret doors as solid stone 2017-09-22 16:33:20 +03:00
Pasi Kallinen 5aaec6a990 Lint for strncpy return value 2017-09-19 14:12:10 +03:00
Pasi Kallinen b82b41cb5a Fix possible buffer overrun 2017-09-19 14:09:01 +03:00
Pasi Kallinen 98383f7a46 Win32GUI: Prevent ampersand-escaped mnemonics in menus 2017-09-18 15:30:52 +03:00
Pasi Kallinen 5e05cdc570 Change some regex stuff to use config errors 2017-09-17 13:43:48 +03:00
Pasi Kallinen 45401a13bb Show regex error before asking for color
When entering a new menucolor via options, show regex error
immediately afterwards, instead of asking for color and attribute
before showing the error.

Also actually show config errors even if config error handler
hasn't been initialized.
2017-09-17 13:20:28 +03:00
Pasi Kallinen 78e5c9a10a Win32GUI: Allow empty separator lines in menus 2017-09-17 12:17:46 +03:00
Pasi Kallinen 11863dd5e9 Read symbols with config file handler
Also, make config file error handler able to cope with recursion.
2017-09-17 10:15:08 +03:00
Pasi Kallinen 2db7e20116 Fix invisible gold symbol in status lines 2017-09-16 23:49:28 +03:00
Pasi Kallinen f36d1036de Show in wizmode level teleport menu your current location 2017-09-16 18:19:25 +03:00
Pasi Kallinen 52ed881b2c Remove overview for wizmode regenerated map
The wizmakemap command throws away the current level, so don't keep
the overview data for it around.
2017-09-15 14:45:51 +03:00
Pasi Kallinen f8bd77ae03 Use symbolic names for shop repair costs
...and add costs to two places where the door you touched
blew up (picking the lock and opening the door).
2017-09-14 21:07:18 +03:00
Pasi Kallinen cfedd8659d Minor reformat, fix warnings 2017-09-14 14:40:11 +03:00
Pasi Kallinen 0753a0751e Move BoH item loss into separate function 2017-09-14 14:11:09 +03:00
Pasi Kallinen 127f74bb24 Fix more warnings 2017-09-13 14:12:38 +03:00
Pasi Kallinen 1e22a9aaf7 Win32GUI: Allow toggling mouse_support off
Prevents accidental mouse clicks on the map
2017-09-13 14:02:43 +03:00
Pasi Kallinen bd7568b71d Fix compile warnings 2017-09-13 13:59:25 +03:00
Pasi Kallinen b6737fd1f6 config parse return values and error msgs 2017-09-13 13:26:37 +03:00
Pasi Kallinen 2c688a12d5 Handle config file reading at single function
The function handles comments, empty lines, config sections,
CHOOSE, and line continuation, while calling another function
for other lines.

Currently used for config file, sysconf, and WIZKIT.
2017-09-13 12:27:38 +03:00
Pasi Kallinen cbd5934a1a No secure config errors in linux hints file
The linux hints file is for a single-user build, no need for this.
2017-09-10 21:31:41 +03:00
Pasi Kallinen 9c118b5b6b Secure config errors
If user can make NETHACKOPTIONS point to a file, that user could then
get the file contents via the extended config file error reporting.
Add CONFIG_ERROR_SECURE compile-time option to make that case output
only the first error, no line number or error context.
2017-09-10 21:05:51 +03:00
Pasi Kallinen a4becd6970 Last of the config error handling 2017-09-09 18:10:15 +03:00
Pasi Kallinen b9c52ff31c Even more config error handling 2017-09-09 17:41:08 +03:00
Pasi Kallinen 873590afc1 More options parse return values 2017-09-09 14:03:28 +03:00
Pasi Kallinen cfb09c9bf8 Handle windowtype and CHOOSE config errors 2017-09-09 13:50:34 +03:00
Pasi Kallinen 87f991ecfc Show error on unknown line 2017-09-09 13:25:46 +03:00
Pasi Kallinen f8211f69f2 Improve config file error reporting
Show the original line from the config file, followed by the line number and
a specific error message. Also show all errors from the config file before
waiting for key press.
2017-09-09 13:04:08 +03:00
Pasi Kallinen 697d2953ff Fix proto decl 2017-09-02 18:51:45 +03:00
Pasi Kallinen 27b483c1a8 Remove unused variable 2017-09-02 15:22:42 +03:00
Pasi Kallinen bfad877fba Add optional config file sections, selected with CHOOSE
Allows the user to define arbitrarily named optional sections
in the config file, and select which of those sections are used.

For example:

  OPTIONS=color
  CHOOSE=char A,char B

  [char A]
  OPTIONS=role:arc,race:dwa,align:law,gender:fem

  [char B]
  OPTIONS=role:wiz,race:elf,align:cha,gender:mal
2017-09-02 12:21:51 +03:00
Pasi Kallinen 26328d28ab Default menucolors for Windows 2017-09-01 12:45:28 +03:00
Pasi Kallinen ecdebff121 Typofix 2017-09-01 12:20:21 +03:00
Pasi Kallinen ffb3f12997 Fix pile display when picking up items while invisible
Reported directly to the devteam. Set hilite_pile on, become
invisible, pick up all but one item from a pile on the floor,
the pile symbol was still there afterwards.

This is yet another case of evil hack, because the gbuf doesn't
distinguish between object piles and single items, see
commit 854fe40609
2017-09-01 09:43:36 +03:00
Pasi Kallinen 7e793a09d7 Add database entry for "martial arts" the skill 2017-08-28 20:40:41 +03:00
Pasi Kallinen 30aea05f47 Minor Guidebook tweakage 2017-08-24 22:59:46 +03:00
Pasi Kallinen 23be1b81d2 Typofix in Guidebook.tex 2017-08-24 10:34:37 +03:00
Pasi Kallinen ef9d198d53 Explain "no travel path" in Guidebook 2017-08-24 10:33:23 +03:00
Pasi Kallinen d1b4253307 Fix reversed stinking cloud targeting logic
...and give indication when blessed scroll of fire was targeted
at illegal position.
2017-08-24 09:04:54 +03:00
Pasi Kallinen c7d13d6fa3 Make blessed scroll of fire useful
Blessed scroll of fire allows to choose the explosion location like
scroll of stinking cloud does. This should make it somewhat useful
in the early game.
2017-08-23 23:35:53 +03:00
Pasi Kallinen 73d36b59dd Typofix 2017-08-21 12:00:08 +03:00
Pasi Kallinen 1854d21dd7 Update NetHackW.exe version details 2017-08-20 23:44:35 +03:00
Pasi Kallinen 1eca824321 Add sysconf BONES_POOLS to allow more bones-files per level
Reduce the chance of a player playing on a public server encountering
their own bones, by implementing separate bones pools. The pool a player
belongs to is determined at game start, and only bones in that pool
are used. The sysconf BONES_POOLS allows the sysadmin to define how
many pools there are.
2017-08-20 23:04:59 +03:00
Pasi Kallinen 7bb4cb1b1e Silence some warnings 2017-08-19 19:23:47 +03:00
Pasi Kallinen a2b51de481 Add stuff for compiling with Visual Studio 2015 2017-08-19 15:21:24 +03:00
Pasi Kallinen 831ce24a57 Enable dumplog for winnt 2017-08-19 14:29:18 +03:00
Pasi Kallinen 189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00
Pasi Kallinen 9eae5a8c4b Fix thinko on preprocessor conditional 2017-08-19 13:47:41 +03:00
Pasi Kallinen 42a3f9d906 Silence another warning 2017-08-19 13:44:08 +03:00
Pasi Kallinen d1c1fd5faf Fix syntax error 2017-08-19 13:40:47 +03:00
Pasi Kallinen a552956f7a Silence some warnings 2017-08-19 13:38:38 +03:00
Pasi Kallinen bbc3cee759 Fix minor diffs between Guidebook.mn and .tex 2017-08-17 23:30:36 +03:00
Pasi Kallinen 00aae6b684 Remove erroneous bolding from Guidebook.mn 2017-08-17 23:18:41 +03:00
Pasi Kallinen 152ddf4a4b Unify strength string 2017-08-06 22:56:07 +03:00
Pasi Kallinen 1f671b962c Demangle clang formatted code 2017-08-06 20:27:48 +03:00
Pasi Kallinen 4e05de9bff Add whatis_moveskip option to change fast-moving cursor
Previously the "fast-moving" when getting a target location
was always by 8 units. If this option is on, fast-moving
will instead skip the same map glyphs. This should be much more
useful for blind players.
2017-08-06 15:41:31 +03:00
Pasi Kallinen 4d7d63814a Throne room's throne is occupied by a king
Based on a patch by Leon Arnott
2017-08-04 23:15:30 +03:00
Pasi Kallinen b6d1ee3320 Using a cursed tin whistle in a vault summons the guard
...since guards respond to shrill whistles.
Based on a patch by Leon Arnott.
2017-08-04 22:41:26 +03:00
Pasi Kallinen e2904012b7 Show current timeouts in #wizintrinsic 2017-08-04 21:41:04 +03:00
Pasi Kallinen b4e4d70008 Fix couple static code analyzer warnings 2017-08-02 19:48:44 +03:00
Pasi Kallinen b13bae91dc Add way to cycle through valid locations for polearm or jump target 2017-07-31 19:10:26 +03:00
Pasi Kallinen 439028dcae Add whatis_filter option to filter eligible map locations for travel
Compound option whatis_filter, filters the eligible map locations
when getting a cursor location for targeting. Accepts 'n' (none),
'v' (map locations in view), or 'a' (map locations in the same area,
eg. room or corridor).
2017-07-31 16:58:23 +03:00
Pasi Kallinen 8180310630 Make #wizmakemap handle unpaid items and punishment 2017-06-28 00:40:00 +03:00
Pasi Kallinen 05e6255bf8 Show more properties in wizmode #timeout 2017-06-25 16:13:23 +03:00
Pasi Kallinen 60443a4ee7 Add sanity checking for long worms 2017-06-16 18:27:25 +03:00
Pasi Kallinen 08fe086124 Show control key combos with uppercase alpha
Instead of ^r, show ^R, as that one is used everywhere.
2017-03-13 20:32:46 +02:00
Pasi Kallinen f9438f6e53 Document explicitly what m-prefix does to each command 2017-03-13 17:17:58 +02:00
Pasi Kallinen 7d8b4d4f97 Add end-of-game dumplogs
This is based on the "new" dumplog patch for 3.6.0, by Maxime Bacoux.

Define DUMPLOG to enable. By default only enabled for the TTY linux.
2017-02-19 15:33:27 +02:00
Pasi Kallinen 76d7044872 Fix #H5056/bz1086: Bug in Achievement Recording
Bug report was:

> "Completed sokoban" achievement was logged when picking up
> a randomly generated bag of holding in the gnomish mines.

The picking-up code was missing checks for the branches, so
you could get the achievements outside the correct branches.
2017-02-06 16:52:40 +02:00