Commit Graph

126 Commits

Author SHA1 Message Date
nhmall
b40ef88e1e nmake warning
NMAKE : warning U4004: too many rules for target 'o\x86\cppregex.o'
2022-10-23 12:38:22 -04:00
Ray Chason
426ef4d8d2 Add Unicode support to the map 2022-10-16 21:42:18 -04:00
nhmall
e157224edc MinGW build update 2022-10-12 12:24:59 -04:00
nhmall
a8cd11ee8a transcribe dependencies from sys/unix/Makefile.src
Transcribe the dependencies from sys/unix/Makefile.src
to sys/msdos/Makefile.GCC and sys/windows/Makefile.nmake
to bring them up to date.
2022-10-09 10:39:50 -04:00
nhmall
c92e232a99 update tested versions of Visual Studio 2022-09-21 2022-09-21 14:55:34 -04:00
nhmall
8df41a6ba2 Revert "NEED_VARARGS followup"
This reverts commit 4d34e153e0.
2022-09-17 15:57:52 -04:00
nhmall
4d34e153e0 NEED_VARARGS followup 2022-09-17 14:22:20 -04:00
nhmall
a5d462b194 more inconsistencies 2022-09-16 10:44:39 -04:00
nhmall
25fc7ea2f5 update tested versions of Visual Studio 2022-08-21 11:51:15 -04:00
Pasi Kallinen
24e94b70d4 Windows: Default boulder symbol to 0
Set the boulder symbol to 0 in the Windows config template file.
2022-08-02 13:09:25 +03:00
nhmall
cf352377a9 Windows stubs.c follow-up 2022-08-01 02:03:38 -04:00
nhmall
174a7e5e78 Windows stubs.c fix 2022-08-01 01:52:55 -04:00
nhmall
0649783a6d some windows startup
noticed that "do you want to destroy the savefile" was not being
handled correctly in Windows startup.
2022-07-16 20:43:24 -04:00
nhmall
cb036d11e2 update tested versions of visual studio 2022-07-16 09:19:03 -04:00
nhmall
c84e0ba6e1 rework TTY_PERM_INVENT; update window port interface
Change the inner workings of the experimental TTY_PERM_INVENT.

Switch to delivering the content to tty for the experimental perm_invent
via the existing window port interface (start_menu(), add_menu(), end_menu).

This also adds a new window port interface call ctrl_nhwindow() for
delivering information to the window port, and/or obtaining specific
information from the window port. The information and requests can
be extended as required. To be documented later once the changes settle
down.

Due to the intrusive nature of these changes and the possibility of
some bugs in the new code, I'm going to leave TTY_PERM_INVENT commented
out in the repository for a day or two.  Anyone wishing to test it out
can do so by uncommenting TTY_PERM_INVENT in config.h.
2022-07-03 00:35:32 -04:00
nhmall
3004cf2d34 be more consistent with coordinates 2022-07-02 09:10:03 -04:00
nhmall
aebf77ada1 update visual studio project files 2022-07-01 11:47:02 -04:00
nhmall
1e17efe143 Windows console limits 2022-07-01 08:37:10 -04:00
nhmall
f228fefabd updated window_procs
Add a non-string identifier to window_procs for use in runtime
identification of the current window port being used.

Use a macro WPID to add the identification at the top of the
various existing window_procs declarations. It expands to the
existing text string, as well as the newly added field wp_id
with a wp_ identifier.

For example, WPID(tty) expands to: "tty", wp_tty

The generated wp_tty must be present in the wp_ids enum at
the top of include/winprocs.h.

The WINDOWPORT(x) macro has been updated to expand to a simple
value comparison (port.wp_id == wp_x), instead of a
string comparison.
2022-06-29 23:21:19 -04:00
nhmall
a518d82c54 no quotes in WINDOWPORT macro invocation 2022-06-29 22:13:28 -04:00
nhmall
d2ca61a0a0 TTY_PERM_INVENT tweaks 2022-06-25 22:26:18 -04:00
nhmall
2770223d10 interface groundwork for core-side color decisions
(user-side decisions really, but as it stands right now
user-side decisions/options are made and processed by the core)

add a parameter to add_menu so color can be passed
2022-06-25 13:21:51 -04:00
nhmall
65659b2cab experimental config option TTY_PERM_INVENT
Add a rudimentary experimental always-up inventory display
capability to tty when the perm_invent option is in effect.
It requires an additional 28 rows available on the terminal
underneath the bottom status line.

It hasn't been optimized for performance as of yet.
2022-06-20 10:40:55 -04:00
nhmall
828de37450 suppress warnings during vs 3rd party x64 builds
These warning are in 3rd party library builds (one
in Lua relating to padding due to alignment), and
a few in pdcurses. We won't be addressing the code
in  those.
2022-06-09 20:02:19 -04:00
nhmall
e2e3c1f8de Re: [NetHack/NetHack] Prompts can overwrite copyright notice on the
starting screen (Issue #783)

On 2022-06-01 12:22 p.m., NetSysFire wrote:
> Steps to reproduce:
>
>1. Get any prompt and answer it. In my case it was a horribly old
>   save I forgot about or when I wiztested something and forgot
>   about that save, too.
>2. See that the copyright information got overwritten by the prompt:
>
>There is already a game in progress under your name. Destroy old game? [yn] (n)
>         By Stichting Mathematisch Centrum and M. Stephenson.
>         Version 3.7.0-59 Unix Work-in-progress, built May 31 2022 12:28:31.
>         See license for details.
>
>
> Shall I pick character's race, role, gender and alignment for you? [ynaq]
>
> Expected behavior:
>
> Redraw after a prompt was answered, so the prompt vanishes and the
> entirety of the starting screen will be shown.
>
> NetHack, Copyright 1985-2022
>          By Stichting Mathematisch Centrum and M. Stephenson.
>          Version 3.7.0-59 Unix Work-in-progress, built May 31 2022 12:28:31.
>          See license for details.
>
>
> Shall I pick character's race, role, gender and alignment for you? [ynaq]
>
> Proposed severity: low. Not gamebreaking, it is cosmetic only and does
> not have any other consequences.
>

The Copyright notice is placed by tty internal routines writing onto
the BASE_WINDOW fairly early in the startup sequence.

The prompt to "Destroy old game? [yn] (n)" is using the in-game
routine to write to the message window at the top of the screen and
prompt there, just like in-game prompts and messages.

If the player answered 'y' to that, the prompt for
"Shall I pick character's race, role, gender and alignment..."
appeared immediately after. That one, however, is written using
the BASE_WINDOW routines in tty, like the copyright notice.

This change does the following:

It moves the copyright lines down a little bit leaving room for the
"Destroy.." prompts.

It places the "Shall I pick characters's..." prompt further down the
screen by default, leaving some room for about 3 raw_print startup
messages after the copyright notice, just in case there are any.
The "Shall I pick character's..." prompt will still appear immediately
if there is a prompt such as "Destroy old game?..."

There were a couple of other issues around raw_print startup messages
too. Those are delivered using a raw_print mechanism to ensure they
are written even if the window-port is not fully operational. However,
they were only on the screen for the blink of an eye. This call
sequence in restore.c made them disappear almost immediately:
     docrt() -> cls()

Put in a mechanism to detect the presence of raw_print messages
from the early startup, and if there were some, wait for a
keypress before obliterating the unread notifications.
2022-06-08 23:41:45 -04:00
nhmall
4a8deefaa3 replace leading tabs in several more files 2022-05-30 12:38:22 -04:00
nhmall
0aba9ff77e restrict a Windows console message to debug 2022-05-27 16:33:22 -04:00
nhmall
fafe54869d tested newer versions of visual studio
Also fixes a missing ')' typo in Makefile.nmake
2022-05-18 12:17:00 -04:00
nhmall
66e965f878 Don't include /fsanitize=address in vs 2017
Closes #759
2022-05-12 08:05:28 -04:00
nhmall
0a171bb862 clear a warning during build with vs project
src/nhlua.c(93,16): warning C4324: 'nhl_user_data': structure was padded
due to alignment specifier
2022-05-07 11:34:24 -04:00
nhmall
eb802a8371 Visual studio project updates 2022-05-07 11:19:59 -04:00
nhmall
cb0c21e91d ENHANCED_SYMBOLS
A new feature, enabled by default to maximize testing, but one which can
be disabled by commenting it out in config.h

With this, some additional information is added to the glyphmap entries
in a new optional substructure called u with these fields:
    ucolor          RGB color for use with truecolor terminals/platforms.
                    A ucolor value of zero means "not set." The actual
                    rgb value of 0 has the 0x1000000 bit set.
    u256coloridx    256 color index value for use with 256 color
                    terminals, the closest color match to ucolor.
    utf8str         Custom representation via utf-8 string (can be null).

There is a new symset included in the symbols file, called enhanced1.

Some initial code has been added to parse individual
OPTIONS=glyph:glyphid/R-G-B entries in the config file.

The glyphid can, in theory, either be an individual glyph (G_* glyphid)
for a single glyph, or it can be an existing symbol S_ value
(monster, object, or cmap symbol) to store the custom representation for
all the glyphs that match that symbol.

Examples:
   OPTIONS=glyph:G_fountain/U+03A8/0-150-255

(Your platform/terminal font needs to be able to include/display the
character, of course.)

The NetHack core code does parsing and storing the customized
entries, and adding them to the glyphmap data structure.

Any window port can utilize the additional information in the glyphinfo
that is passed to them, once code is added to do so.

Also, consolidate some symbol-related code into symbols.c, and remove it from
files.c and options.c
2022-05-07 10:25:13 -04:00
nhmall
63a0a63730 rename sys/windows/Makefile.msc
rename sys/windows/Makefile.msc to sys/windows/Makefile.nmake
2022-04-25 15:16:41 -04:00
nhmall
407f08c4d1 tested Windows command line build with latest VS
- Microsoft Visual Studio 2017 Community Edition v 15.9.47
- Microsoft Visual Studio 2019 Community Edition v 16.11.13
- Microsoft Visual Studio 2022 Community Edition v 17.1.5
2022-04-25 09:36:33 -04:00
nhmall
d20b2772eb visual studio comment follow-up 2022-04-12 14:49:34 -04:00
nhmall
1daa2806f9 build tested with updated Visual Studio versions
VS 2017 (Apr 12, 2022 version 15.9.46)
VS 2019 (Apr 12, 2022 version 16.11.12)
VS 2022 (Apr 12, 2022 version 17.1.4)
2022-04-12 14:43:28 -04:00
nhmall
4d1caf8e3a Windows keyhandling 2022-04-11 15:24:55 -04:00
nhmall
b9abd2a185 fix a Windows initializer 2022-04-10 17:18:48 -04:00
nhmall
e74f3c607a Windows build test with Visual Studio 2022 17.1.3 2022-04-02 13:45:04 -04:00
nhmall
a61586153f Windows nmake build - separate x86 and x64 objs 2022-03-13 21:17:08 -04:00
nhmall
2bb26da9fa Windows visual studio project updates
hide a couple of warnings in non-nethack code
get rid of an obsolete file reference
2022-03-13 10:20:41 -04:00
nhmall
3fc39f273a missed band for windows Makefile.msc 2022-03-11 07:51:12 -05:00
nhmall
fa4ad397dc some sys/windows build updates
Place built libraries for Lua and pdcurses into lib instead of the
more transient src/o subfolder.

Remove a kludge involving sys/windows/stub-pdcscrn.c.

Don't link pdcurses into NetHackW.exe (required a couple of stubs
since NetHack.exe and NetHackW.exe currently share object files
under the visual studio nmake build.

(Note: This may require a couple of follow-on minor modifications
to the mingw build. If so, the CI will flag that for us after this
commit)
2022-03-09 12:02:37 -05:00
nhmall
cceef37c8b Windows nmake build fix 2022-03-07 07:35:35 -05:00
nhmall
f845df9eeb build tested with visual studio 2022 17.1.0 2022-02-16 15:57:03 -05:00
nhmall
a7009e2a54 obsolete nhlan.c follow-up
- visual studio project files
- .gitattributes
2022-02-15 15:22:34 -05:00
nhmall
c0a4b38bf6 remove obsolete function and references 2022-02-15 08:13:27 -05:00
nhmall
246abbbf5c update tested versions of visual studio 2022-02-10 18:58:06 -05:00
nhmall
19ff846645 prevent Windows back_buffer_flip() early on 2022-02-06 10:47:41 -05:00
nhmall
787d184570 some Makefile.mingw32 tweaking 2022-02-06 01:02:27 -05:00