Commit Graph

2182 Commits

Author SHA1 Message Date
nhmall
ca3e406601 some Qt6 Makefile tinkering
Adjust for a package available on ubuntu jammy jellyfish 22.04 LTS,
but one that doesn't seem to follow the norm.
2022-06-12 11:59:34 -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
fc0bb9631a synchronize some recent changes between linux.370 and macOS.370 2022-06-03 21:26:21 -04:00
PatR
b4a415848d curses locale.h fix 2022-06-03 13:12:27 -07:00
PatR
4c47b7f622 'make depend' update 2022-06-03 13:02:40 -07:00
nhmall
57cfd7e7ed another ncursesw follow-up 2022-06-02 17:14:42 -04:00
nhmall
168ee4c9a8 yet another follow-up for linux.370 ncursesw 2022-06-02 16:31:30 -04:00
nhmall
7b1528707b another follow-up for ncursesw and CURSES_UNICODE
Don't define CURSES_UNICODE without ncursesw being available
2022-06-02 15:26:48 -04:00
nhmall
ae1f5b8d2a follow-up on linux.370 ncursesw 2022-06-02 15:10:15 -04:00
nhmall
62014be6f8 use ncursesw on linux for curses support of enhanced1 2022-06-02 14:43:46 -04:00
nhmall
7d186332ae attempt to autodetect homebrew and macports
If homebrew is detected, and if the homebrew ncurses package
is installed, the set things up to use it.

Hopefully, this works okay for everyone right away, but it may need
some tweaking.
2022-05-31 08:17:29 -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
4d212e9864 Merge branch 'homebrewed-curses' of https://github.com/perryprog/NetHack into pr659 2022-05-27 16:16:25 -04:00
nhmall
95da0beffa fix MSDOS cross-compile
After some Make variables and additional override for CROSS_TO_MSDOS
is required.
2022-05-19 19:53:48 -04:00
nhmall
629b5d67a9 fix 'make all' from src directory 2022-05-19 19:00:47 -04:00
nhmall
27119907a7 use updated lua library name in make spotless 2022-05-19 08:18:52 -04:00
nhmall
f57555ae6b differentiate lua object library names by Lua ver 2022-05-19 07:44:29 -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
c5ec3fc248 Xcode project update 2022-05-11 16:38:27 -04:00
nhmall
c38e5cba5c correct the qt5 package instructions for ubuntu 2022-05-11 09:47:00 -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
281d959b8b revisit Qt6 macOS QSoundEffect
- After reverting previous related commit, add the QtMultimedia folder to
the include search path as suggested by PatR, and leave qt_bind.cpp alone
2022-04-27 19:06:06 -04:00
nhmall
75f3008123 Revert "Qt6 QSoundEffect on macOS"
This reverts commit f6149904c3.
2022-04-27 19:00:18 -04:00
nhmall
f6149904c3 Qt6 QSoundEffect on macOS 2022-04-27 13:56:01 -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
d7630ebff8 make zip file contents pathless for msdos pkg 2022-04-01 16:11:30 -04:00
nhmall
5478baa6ee giant ant tiles or right side of msdos display 2022-03-23 22:01:01 -04:00
nhkeni
3aed0c61bc xcode cleanup:
don't use git (so tarball distribution should work)
 name the build shell scripts
2022-03-16 17:03:54 -04:00
nhkeni
41203982be Fix xcode recover install 2022-03-16 15:06:55 -04:00
nhkeni
0b4fad3cb7 NetHack.xcodeproj: update handling of Lua 2022-03-16 15:05:19 -04:00
nhmall
a61586153f Windows nmake build - separate x86 and x64 objs 2022-03-13 21:17:08 -04:00
PatR
de02301b45 revise a couple of recent changes
include/.gitignore should continue to ignore old files in case
someone checks out an older version, builds, then checks out the
current version without running 'make spotless' first.

sys/unix/Makefile.utl:  tiletxt.o depends on tilemap.c in addition
to tiletxt.c.
2022-03-13 13:58:56 -07:00
nhmall
439087ec6d remove a commented out test line from Makefile.utl 2022-03-13 11:37:00 -04:00
nhmall
c7b63d5ef9 follow-up: missed one include/tile.h 2022-03-13 11:24:19 -04:00
nhmall
2234cc256d some parallel Make glitches noticed
observed: parallel build attempts of makedefs that trampled over
one another.

attempted workaround: Add a dependency as per Pat R's suggestion.

observed: Concurrent header file movement collisions were sometimes
causing file busy errors and build failures.

workaround: Eliminate tile.h header file movement from the
Makefile build so that the collisions won't occur with that
particular file. Leave the header file tile.h in win/share as it
is in the distribution and just adjust the include path in the
rule for the specific files that use it.

observed: tiletxt.c created on-the-fly from Makefile echo statements
sometimes resulted in garbled and duplicate content in it when
parallel makes were involved, and that caused a build failure.

workaround: Instead of creating a tiletxt.c on-the-fly via echo
statements in the Makefile, simplify things and use that
same #include "tilemap.c" approach but make it an actual file
in the distribution. That makes it available for other platforms
too.
2022-03-13 11:06:45 -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