Commit Graph

883 Commits

Author SHA1 Message Date
nhmall
80218a7855 boundary bit 2018-05-15 01:29:36 -04:00
nhmall
589bdb4e2d Merge branch 'win-tty-status' into win-minor 2018-05-15 00:26:26 -04:00
nhmall
26654ef079 a few cut-and-paste errors 2018-05-14 22:25:25 -04:00
nhmall
2e8b69d5ff some tty per field rendering and optimization 2018-05-14 21:13:37 -04:00
nhmall
860b9c35c1 testing build with STATUS_HILITES 2018-05-13 21:24:14 -04:00
Bart House
0afd2570cb Removing temporary debugging code and fixing compiler warnings. 2018-05-13 13:29:13 -07:00
nhmall
0d23e7b44d Merge branch 'tty-status' into win-tty-status 2018-05-13 15:21:46 -04:00
nhmall
3b2f7e86e0 more status updates
- prevent an overflow
- add make_things_fit()
2018-05-13 15:19:39 -04:00
Bart House
650d5230ec Fix memory leak. See bug 1169. 2018-05-12 19:45:16 -07:00
Bart House
1d31a49661 Some nttty.c clean-up. 2018-05-12 15:58:44 -07:00
nhmall
99474c864f Merge branch 'tty-status' into win-tty-status 2018-05-12 14:44:12 -04:00
nhmall
149fc5a4dd empty field suppression caught condition values unintentionally 2018-05-12 14:42:19 -04:00
nhmall
3598fcc929 more status handling updates
Suppress unneeded spaces from a couple of fields
	BL_LEVELDESC	- trailing spaces.
	BL_CAP		- it only contains a space
2018-05-12 14:10:52 -04:00
nhmall
9a87064cca some build fixes for compile issues reported 2018-05-12 06:57:34 -04:00
nhmall
ba057ef3de condition shrinkage when required 2018-05-12 02:18:42 -04:00
nhmall
a3ba46d732 remove some debug code 2018-05-12 01:10:43 -04:00
nhmall
dd04f5fcb5 more tty-status updates 2018-05-12 01:04:57 -04:00
nhmall
8c2dc7bb1c add some logging to debug 2018-05-10 18:48:02 -04:00
nhmall
1a19e449c7 Revert "some cross platform testing"
This reverts commit 3d1e086648.
2018-05-09 18:51:49 -04:00
nhmall
4dd535cbd2 cross platform testing 2018-05-09 18:47:19 -04:00
nhmall
3d1e086648 some cross platform testing 2018-05-09 18:31:18 -04:00
nhmall
778c8a56ab remove a commented out code line 2018-05-09 13:25:46 -04:00
nhmall
9bca6ecb8e tty status updates
some status code cleanup

It should be ready to merge tty-status changes into NetHack-3.6.0.
2018-05-09 13:12:11 -04: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
nhmall
b524c26da5 intermediate update to wintty.c as work continues 2018-05-07 18:52:50 -04:00
nhmall
71bead4e39 do some performance optimizations on highlighting of tty status 2018-05-05 19:43:10 -04:00
nhmall
d4ebae12f1 default to using latest SDK available on build machine
From Bart...
Modified build configuration to use latest SDK available by default.
This change will eliminate the need for us to hard code an SDK
version into our configuration file and will eliminate the need
for developers to set the SDK version when they do not have the
matching SDK version installed. Updated the Install.nt file removing
the mention of having to set the SDK version.
2018-04-26 23:02:17 -04:00
Alex Kompel
bcd6b3dbcd win32-gui: fix message window text display
text dimension calculations were inconsistent across multiple functions.
this resulted in occassional text display oddities.
2018-04-26 08:19:32 -07:00
keni
0f58af6f37 add missing copyright info 2018-04-25 16:54:50 -04:00
keni
09502df9f1 force expand unexpanded substitution variables 2018-04-25 15:36:11 -04:00
keni
d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -04:00
keni
11f1983253 update .gitattributes files for substitution and copyright headers 2018-04-25 14:52:43 -04:00
nhmall
93e0cb5235 nethackw clear after getlin
Alex wrote: in nethackw, getlin clears message
window, so any unread messages are scrolled off the screen without
"--more--" prompt. If vary_msgcount is set to 1 and "potion shatters", it
is not easy to see the effect to name the potion correctly.
2018-04-24 08:15:36 -04:00
PatR
77da2fdc65 tty EDIT_GETLIN fix for wrapped prompt
When a getlin() response is being typed, it wraps to second line if
the cursor tries to go past COLNO-1, but if a previous response is
treated as part of the prompt, using pline() to write prompt+space+text
wraps at a whole word boundary.  tty's getlin() assumes that the screen
position can be derived from that prompt+space+text_so_far but that
doesn't match if wrapping at a word boundary leaves blank space at end
of the top line.

When a prompt is accompanied by default answer, output the answer
separately instead of pretending it is part of the prompt.  Line-wrap
should occur at same point as when it was originally typed and avoid
the confusion about how far to back up when deleting characters.

This hasn't been exhaustively tested but it seems to work correctly
for ordinary input, input erased one character at a time, and input
killed all at once.  One thing which definitely hasn't been tested is
having the prompt itself be so long that it needs to wrap.
2018-04-13 04:32:05 -07:00
PatR
ac2634b603 EDIT_GETLIN fix for tty
After about the third time typing '#' and getting a prompt of "# K", I
decided that it wasn't clumsy typing.  The call chain for get_ext_cmd()
was passing an uninitialized output buffer to [hooked_tty_]getlin()
which treated random junk as the previous result to be used as current
default.  Other interfaces may need a similar fix.
2018-04-03 16:05:08 -07:00
Pasi Kallinen
2548d68dd3 Fix some warnings
Remove an unused variable, add missing FALLTHRUs, and use the same
FALLTHRU wording where it wasn't recognized by gcc
2018-03-30 19:42:50 +03:00
Pasi Kallinen
a2f6a7bec9 Support EDIT_GETLIN for win32
... but only without popup_dialog
2018-03-27 20:24:05 +03:00
Pasi Kallinen
94ad7512a6 Compile-time option to allow some prompts remember the input
Define EDIT_GETLIN to make the tty, X11, and Qt4 windowports to
remember the input strings for wishing and annotation.
2018-03-26 23:04:53 +03:00
Alex Kompel
d6e43a32ec win32-gui: fix truncated status fields call to get dimensions of the text bounding rectangle needs to be made after the font is set in order to get the accurate reading 2018-03-18 23:00:23 -07:00
Alex Kompel
60454b4f92 win32-gui: Do not auto-assign non-alphabet accelerator characters to menu items. Picking up pile that contains gold forces accelerators to start with $ so the next one becomes %, ... 2018-03-18 23:00:16 -07:00
nhmall
4e086caceb ensure tty_curs() behaves the same whether DEBUG defined or not
ensure tty_curs() behaves the same whether DEBUG defined or not
when it comes to positioning the cursor.

The return statement, in the debug case only, was preventing
the cursor from being moved following a range check, so the
next output was written whereever the cursor happened to be
previously.

The messaging that detects the failed range check will get
written in the DEBUG defined case hopefully allowing resolution
to the range check failure, but now the cmov will still
be attempted just as it is in the case where DEBUG is not
defined.
2018-03-11 23:29:06 -04:00
Pasi Kallinen
4f459a9532 Fix WINCHAIN compilation 2018-03-10 21:48:22 +02:00
nhmall
a120d99005 msc makefiles update timestamp on copied files 2018-03-04 10:30:17 -05:00
nhmall
dee2fea82d msc Makefile 2018-03-04 10:25:11 -05:00
nhmall
939bd356a4 more msc makefile tweaks 2018-03-04 09:54:29 -05:00
nhmall
eddfcc4422 windows cmdline Makefile 2018-03-04 09:07:16 -05:00
nhmall
5370c0d337 resolve part of H4422 related to .exe versions
I also saw
 that looking at the details of both windows .exes that they indicate file
 version 3.5.0.0. Shouldn't it be 3.6.0.0 for the NH version 3.6.0
2018-02-25 12:20:50 -05:00
nhmall
2cfbd682a1 VS community editions are freely downloadable. Maintain only 2 most recent.
Changes to be committed:
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/Makefile.msc
	modified:   sys/winnt/nhsetup.bat
	deleted:    win/win32/vs2010/NetHack.sln
	deleted:    win/win32/vs2010/NetHackW.vcxproj
	deleted:    win/win32/vs2010/dgncomp.vcxproj
	deleted:    win/win32/vs2010/dgnstuff.vcxproj
	deleted:    win/win32/vs2010/dlb_main.vcxproj
	deleted:    win/win32/vs2010/levcomp.vcxproj
	deleted:    win/win32/vs2010/levstuff.vcxproj
	deleted:    win/win32/vs2010/makedefs.vcxproj
	deleted:    win/win32/vs2010/recover.vcxproj
	deleted:    win/win32/vs2010/tile2bmp.vcxproj
	deleted:    win/win32/vs2010/tilemap.vcxproj
	deleted:    win/win32/vs2010/tiles.vcxproj
	deleted:    win/win32/vs2010/uudecode.vcxproj
	deleted:    win/win32/vs2013/NetHack.sln
	deleted:    win/win32/vs2013/NetHack.vcxproj
	deleted:    win/win32/vs2013/NetHackW.vcxproj
	deleted:    win/win32/vs2013/dgncomp.vcxproj
	deleted:    win/win32/vs2013/dgnstuff.vcxproj
	deleted:    win/win32/vs2013/dlb_main.vcxproj
	deleted:    win/win32/vs2013/levcomp.vcxproj
	deleted:    win/win32/vs2013/levstuff.vcxproj
	deleted:    win/win32/vs2013/makedefs.vcxproj
	deleted:    win/win32/vs2013/nhdefkey.vcxproj
	deleted:    win/win32/vs2013/recover.vcxproj
	deleted:    win/win32/vs2013/tile2bmp.vcxproj
	deleted:    win/win32/vs2013/tilemap.vcxproj
	deleted:    win/win32/vs2013/tiles.vcxproj
	deleted:    win/win32/vs2013/uudecode.vcxproj
2017-12-03 08:42:38 -05:00
Pasi Kallinen
59d4ac02f7 TTY: Treat carriage return as newline
Before this change, more-prompts and input text -prompts could not
be accepted with carriage return. Now, just like in menus, carriage
return is treated the same as a newline.

To test, use 'stty -icrnl'
2017-11-14 16:14:06 +02:00
Pasi Kallinen
647ea55b1a Fix compile of tile2x11
I was too zealous changing fprintf to the Fprintf macro, which
ignores the return value.
2017-11-02 23:41:55 +02:00