Commit Graph

806 Commits

Author SHA1 Message Date
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
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
Pasi Kallinen
6b51f6ce09 Qt4: Use TIMED_DELAY and same delay as tty 2017-10-08 11:28:28 +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
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
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
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
69f7a78dba Hilite Status: Improved
Allow defining multiple stops per field. Add hitpointbar.
2017-09-26 10:04:25 +03:00
Pasi Kallinen
98383f7a46 Win32GUI: Prevent ampersand-escaped mnemonics in menus 2017-09-18 15:30:52 +03:00
Pasi Kallinen
78e5c9a10a Win32GUI: Allow empty separator lines in menus 2017-09-17 12:17:46 +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
Bart House
70ac8a12af Improvements to build.bat scripts used to build Windows builds. Remove CRT Secure warnings. 2017-09-05 13:14:13 +03:00
Bart House
51f7cb5e9d Fix build errors with Visual Studio 2017 using latest SDK. We have yet another global namespace collision between window headers and nethack headers. This time it is the macro Protection that is defined before it is used in a function prototype in the windows headers. 2017-09-04 12:56:20 +03:00
Bart House
1bc3cbac7f Additional changes needed to support Visual Studio 2017. 2017-09-04 12:56:20 +03:00
Bart House
8a5351c079 Upgrade to VS2017 and newer SDK. 2017-09-04 12:56:20 +03:00
Bart House
3614059379 Fix line endings (CRLF and extra space). 2017-09-04 12:56:20 +03:00
Bart House
5b08481637 Adding vs2015 solution file to starting set of files. 2017-09-04 12:56:19 +03:00
Bart House
ceaf2f6109 Create initial vs2017 files from vs2015 files. 2017-09-04 12:56:19 +03:00
Bart House
be4e0992e6 Fix crash that occurs when closing application window while invetory is displayed. 2017-09-04 12:52:18 +03:00
Bart House
497a0b47c8 Fixed compiler warhing of casting int to pointer. 2017-09-04 12:41:53 +03:00
Bart House
4a4193ab37 Fixed compiler warning using pointer as UINT. 2017-09-04 12:41:53 +03:00
Bart House
c9a82e8ae6 Fix compiler warning where we cast 32bit value to pointer. 2017-09-04 12:41:53 +03:00
Bart House
78bee88b83 Turning off CRT secure warnings. 2017-09-04 12:41:53 +03:00
Bart House
b54382ec78 Improvements to Visual Studio 2015 build. 2017-09-01 12:14:10 +03:00
Bart House
f9a6cf2bf7 Improvements to Visual Studio 2015 build. 2017-09-01 12:14:04 +03:00
Bart House
77bd37b435 Visual Studio 2015 build improvements. 2017-09-01 12:13:58 +03:00
Bart House
98266801b6 Improve Visual Studio 2015 build. 2017-09-01 12:13:52 +03:00
Bart House
e5dadd525f Visual Studio 2015 build improvements. 2017-09-01 12:13:30 +03:00
Bart House
5a4df357ab Improvements to vs2015 build. 2017-09-01 12:12:58 +03:00
Pasi Kallinen
1854d21dd7 Update NetHackW.exe version details 2017-08-20 23:44:35 +03:00
Pasi Kallinen
a2b51de481 Add stuff for compiling with Visual Studio 2015 2017-08-19 15:21:24 +03:00
Pasi Kallinen
189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00
PatR
e4d4becfa2 fix #H5781 - missing fprintf args in wc_trace.c
This compiles cleanly after the fixes, but is otherwise untested.
2017-07-30 18:33:28 -07:00
PatR
b4240e1772 fix #H5780 - file pointer freed twice
win/share/tileset.c seems only to be used by the MSDOS port, but it
compiles cleanly on OSX after these changes.

A file pointer was passed to fclose() twice, second time potentially
causing problems.  There were cases of potentially null pointers
being passed to free() too.  That should be safe these days, but it's
something we've tried to hard to avoid and would probably trigger
complaints from our own MONITOR_HEAP code if that ever got applied
here.
2017-07-30 18:17:00 -07:00
PatR
6ba906b234 maybe fix #H5264 - screen clears on prompting
I couldn't reproduce the reported problem of the "In what direction?"
being issued after the screen was cleared, but bypassing pline() in
favor of putstr(WIN_MESSAGE) for tty prompts did also bypass
  if (vision_full_recalc) vision_recalc(0);
  if (u.ux) flush_screen(1);
done in pline().  Inadvertent loss of the latter could conceivably be
responsible for the problem.  If so, the escape code used by cl_end()
may be broken for somebody's termcap or terminfo setup since clearing
to the end of the line in the message window shouldn't erase the rest
of the screen.

Regardless, the prompting change also bypassed the ability to show
the prompt with raw_printf() if the display wasn't fully intialized
yet, so some change to the revised prompting was necessary anyway.

Switching back from putstr(WIN_MESSAGE) to pline() resulted in
duplicated entries in DUMPLOG message history, one with bare prompt
followed by another with response appended, so more tweaking was
needed.  The result is use of new custompline() instead of normal
pline().  custompline() accepts some message handling flags to give
more control over pline()'s behavior.  It's a more general variation
of Norep() but its caller needs to specify an extra argument.
2017-03-30 14:14:38 -07:00
PatR
82620d16f5 tty prompting fix and DUMPLOG of prompts+answers
Update DUMPLOG's message history to include player responses to
most queries.  For tty, both getlin() and yn_function().  For other
interfaces, only yn_function() is covered.  (It's intercepted by a
core routine that can take care of the logging; getlin() isn't.)
Also includes saved messages from previous session(s), for the
interfaces which support that (tty), to fill out the logging when
a game ends shortly after a save/restore cycle.

The tty interface was using pline() to display prompt strings.
Having 'MSGTYPE=hide "#"' or 'MSGTYPE=hide "yn"' in .nethackrc
would suppress many prompt strings (in the two examples mentioned,
entering extended commands or the vast majority of yes/no questions,
respectively) and generally lead to substantial confusion even if
done intentionally, so switch to putstr(WIN_MESSAGE) instead.
2017-03-20 19:11:48 -07:00
Pasi Kallinen
63b0db8724 Fix Valgrind complaint of uninitialized memory 2017-01-24 20:56:15 +02:00