Commit Graph
61 Commits
Author SHA1 Message Date
Bart House 360ee21861 Revert "Hint file for macOS X with curses."
This reverts commit f7fbbb8cb0.
2018-11-18 11:45:36 -08:00
Bart House 444d1ec50a Merge branch 'win-curses' of https://rodney.nethack.org:20040/git/NHsource into win-curses 2018-11-18 09:30:11 -08:00
Bart House f7fbbb8cb0 Hint file for macOS X with curses. 2018-11-18 09:28:45 -08:00
Bart House 6ba270563c Build curses if PDCurses is available.
There are two ways to enable curses in the build.  Either set the
environment variable PDCURSES to a folder containing a PDCurses repository
OR place the PDCurses folder alongside the NetHack source repository.
2018-11-17 23:56:31 -08:00
Bart House afe828507a Getting build working. 2018-11-17 14:48:38 -08:00
Bart House d2436d9f3c Map curso blinking controlled by win32_cursorblink. 2018-11-16 21:48:00 -08:00
Bart House dcac95b4b3 Delete GDI objects when map window is destroyed. 2018-11-16 13:50:12 -08:00
Bart House 90562f23c0 Menu check boxes drawn correctly when scaled.
Changed from using pattern brush to strech blt when rendering check box.
2018-11-16 13:29:59 -08:00
Bart House 94c4acc144 Made map cursor blink a compile time option. 2018-11-16 13:00:02 -08:00
Bart House 52cbbdafae Completed map back buffer work and implemented map cursor blink.
Map back buffer work is done eliminating all flickering caused by
clears of the front buffer during partial updates.

Implemented a cursor blink in both ascii and tile modes.

Fixed bug where we would lose fit to screen when entering rogue level.
2018-11-16 12:39:04 -08:00
Bart House 3f4090ac38 Remap unicode control codes.
When running NetHack.exe in a console set to code page 850, the
multi-byte to wide character mapping will generate unicode values
in the unicode control code range.  These values need to be re-mapped
to unicode renderable glyphs using the same mappings we use for
control page 437 otherwise the console font might not render a character
for these unicode control values.
2018-11-15 21:42:23 -08:00
Bart House fdd4e129a1 Removed temporary comment left in by mistake. 2018-11-15 20:58:15 -08:00
Bart House 1f8c78fb40 Remove commented out line. 2018-11-14 21:08:59 -08:00
Bart House 093dc076ed Modified RIP dialog to take into account monitor DPI. 2018-11-14 20:44:02 -08:00
Bart House 489abb45f5 Added monitor dpi awareness to NetHackW splash dialog. 2018-11-13 20:48:56 -08:00
Bart House 8069659912 Adjust menu item rendering based on monitor dpi. 2018-11-12 22:40:36 -08:00
Bart House f67e7c0614 Merge branch 'win-minor' of https://rodney.nethack.org:20040/git/NHsource into win-minor 2018-11-12 21:39:05 -08:00
Bart House 4912149ff2 Implemented back buffer rendering to improve fit to screen rendering
quality.
2018-11-12 21:38:32 -08:00
Bart House 0bbc7cb6db Adjust tile size to bounds of text meterics when in ascii mode. 2018-11-12 19:36:08 -08:00
Bart House 3bb759a9ab Started work to support per monitor DPI. Using DPI to scale tiles
appropriately.

Renamed ntassert to nhassert.  (Naming mistake caused by using ntassert
at work).

Re-ordered a few more includes to get window headers included before
nethack headers.
2018-11-12 17:45:22 -08:00
Bart House f3bc4af242 Removing support for Visual Studio 2015 solution. 2018-11-12 09:13:51 -08:00
Bart House 8944235282 Enforced the inclusion of windows headers before nethack headers.
Moved the code page 437 mapping table to winnt.c so that it could be
used in window and console clients.
Added check that fonts support unicode values we use from code page 437.
Use unicode to draw text if font supports it otherwise use ASCII.
2018-11-12 01:58:56 -08:00
Bart House 26171ed9f5 Ignore .vs hidden folders generated by visual studio 2017. 2018-11-10 20:33:30 -05:00
Bart House 20e8482e6e Fix crash that can occur when panic is called early. 2018-11-10 20:26:20 -05:00
Bart House 0a3f6d17df Removed the defining of WIN32CONNDEBUG for NethackW.
Defined NOTTYGRAPHICS for NethackW.
2018-11-10 20:25:49 -05:00
Bart House 1f877dbca1 Additional changes to xputc_core() and early_raw_print() to manage
the cursor position correctly.  This is needed to handle raw printing
correctly.  Added check for when we might be running off the bottom
of the screen when handling msmsg().  Added runtime checks to keep
cursor always within bounds.
2018-05-13 20:46:43 -07:00
Bart House 53c7cb8c78 Changes to xputc_core to handle cursor correctly. 2018-05-13 18:54:20 -07:00
Bart House 0afd2570cb Removing temporary debugging code and fixing compiler warnings. 2018-05-13 13:29:13 -07:00
Bart House 3dbbd188d9 Fixing typo. 2018-05-13 12:49:52 -07:00
Bart House 650d5230ec Fix memory leak. See bug 1169. 2018-05-12 19:45:16 -07:00
Bart House 039687cf5f Fix for bug 324 (aka H4216). We now will use nhraykey by default if the
players keyboard layout is non-english.  nhraykey properly handles
non-english input.  We also now support changing altkeyhandler in game.
2018-05-12 18:06:23 -07:00
Bart House 1d31a49661 Some nttty.c clean-up. 2018-05-12 15:58:44 -07:00
Bart House 3467b9f087 Added ntassert() mechanism for Windows based port use. 2018-05-12 13:59:06 -07:00
Bart House f7e665be98 Fix for bug H7132.
In nethackw, there can be conflicts between menu accelerators and an extra
choice accelerator.  For example, when engraving the using fingers options
conflicts with the unselect all menu accelerator.  The extra choice
accelerator should take precedence.
2018-05-08 07:25:24 -07:00
Bart House b7f351fdbb Updated console back buffer support to correctly size the buffers as
appropriate.
2018-05-06 13:22:36 -07:00
Bart House 6322aec829 Win32TTY: Fix using a console font with wide glyphs
Added support to detect when the current console font has glyphs
that are too wide and will cause rendering errors in the console.
If detected, we warn the user and change the code page to 437
and the font to Consolas. At exit, if we had changed the font
and code page then we will restore to the original font and code page.
2017-10-25 10:59:11 +03:00
Bart House a588541a27 Win32GUI: Gather raw_print text and display it all in single dialog
Defined strbuf_t and related routines to support dynamically sized
strings. Modified strip_newline() to strip the last newline in a string
instead of the first.

Simplified splash window code using new strbuf_t.

Prior to exiting game, re-enable getreturn and call wait_synch() in
case there is buffered raw prints that must be displayed to user.
2017-10-25 10:34:27 +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
Bart House 8656807b4d Windows GUI supports WC2_HILITE_STATUS
Avoids raw_print on startup
2017-10-08 01:56:18 +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
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
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
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 878a18388c Fixed coding error. strlen() returns size_t causing a size_t sized value pushed onto stack instead of long. On x64 builds, size_t != long. Caught via compiler warning in x64 build. 2017-09-04 12:41:53 +03:00
Bart House ee61f1b730 Use %p for formatted output of pointers (needed to support x86 and x64 cleanly). 2017-09-04 12:41:53 +03:00
Bart House 1374d148d7 Removing unused function which also contained coding error (calling putc instead of fputc). 2017-09-04 12:41:53 +03:00
Bart House 78bee88b83 Turning off CRT secure warnings. 2017-09-04 12:41:53 +03:00