Commit Graph

12778 Commits

Author SHA1 Message Date
PatR
bc6ca2b821 Qt 5 vs 6 'moc'
This is an attempt to address the issue of switching from Qt 5 to
Qt 6 or vice versa on Unix without running 'make spotless'.  Various
*.h files (but not all of them) in win/Qt/ are run through a program
called 'moc' to create new files *.moc that are included by *.cpp.
The problem is that the constructed files use the same names for Qt
5 or 6 but their contents apparently aren't compatible.  This adds
rules (specific to GNU make) that use a pair of timestamp files to
track which version of moc made src/*.moc and to destroy them when
switching Qt versions in order to force their re-creation.

As it stands, a hints file which includes hints/include/compiler.370
is now required in order to build the Qt interface with the Unix
Makefiles.  There's no change for platforms that don't use those and
I've no idea whether something comparable could be done for macOS
Xcode IDE.

The first time make is run with WANT_WIN_QT=1 after this is in place,
all the .moc files will be rebuilt and the subset of .cpp files which
include them will be recompiled.  After that, the .moc files will be
rebuilt as needed--and only as needed--just like any other constructed
files.
2022-02-01 13:50:12 -08:00
nhmall
c75e5d99d2 syntax in prototype 2022-02-01 13:03:41 -05:00
PatR
0e6456c9f4 tty_raw_print_bold() again
Redo the tty handling for raw_print_bold() intended to keep it working
after exit_nhwindows().  Don't assign static addresses to nh_HI and
nh_HE in case the routine to free dynamic termcap data somehow gets
called again.
2022-01-31 18:31:34 -08:00
PatR
532cddbd35 topten's so (standout) handling
This fixes the broken code that was using a boolean as an integer.
I didn't try to track down when it changed or what it looked like
before the change.  The intended effect is fairly straightforward;
just padding a bold line with spaces.  I've no idea why someone
deciced that that was useful though.

It also fixes something I broke six years ago:  tty_exit_nhwindows()
releases the termcap data needed for turning bold on and off, so
raw_print_bold() used by topten() stopped working on tty then.

Not fixed:  the code in really_done() for dealing with topten() vs
the 'toptenwin' option really ought to be redone.
2022-01-31 18:20:34 -08:00
nhmall
ae11c6e25d some warnings with clang version 13.0.0-9
---------------------
win/curses/cursstat.c:

../win/curses/cursstat.c:301:9: warning: variable 'height' set but not used [-Wunused-but-set-variable]
        height, width, w, xtra, clen, x, y, t, ex, ey,
        ^
1 warning generated.

---------------------
win/Qt/qt_menu.cpp:

../win/Qt/qt_menu.cpp:1123:9: warning: variable 'h' set but not used [-Wunused-but-set-variable]
    int h=0;
        ^
1 warning generated.

---------------------
/win/Qt/qt_yndlg.cpp:

../win/Qt/qt_yndlg.cpp:170:6: warning: variable 'x' set but not used [-Wunused-but-set-variable]
        int x=margin, y=extra+margin;
            ^
../win/Qt/qt_yndlg.cpp:170:16: warning: variable 'y' set but not used [-Wunused-but-set-variable]
        int x=margin, y=extra+margin;
                      ^
2 warnings generated.

Commenting out the x and y references, then leads to the following additional warnings,
so comment those out too:

../win/Qt/qt_yndlg.cpp:167:12: warning: unused variable 'margin' [-Wunused-variable]
        const int margin=8;
                  ^
../win/Qt/qt_yndlg.cpp:168:12: warning: unused variable 'gutter' [-Wunused-variable]
        const int gutter=8;
                  ^
../win/Qt/qt_yndlg.cpp:169:12: warning: unused variable 'extra' [-Wunused-variable]
        const int extra=fontMetrics().height(); // Extra for group
                  ^
3 warnings generated.

---------------------
2022-01-31 15:11:05 -05:00
Pasi Kallinen
ac3c005615 Fix fall depth from Castle to the Valley 2022-01-31 20:31:26 +02:00
Pasi Kallinen
2cad4ecec2 Covetous monsters will teleport to downstairs or upstairs
I accidentally swapped the covetous monsters teleport to stairs to heal
but instead of changing it back like it was, now make those monsters
teleport to either upstairs or downstairs - some of them will go up,
others go down.
2022-01-31 19:52:33 +02:00
Pasi Kallinen
218c0d4a3b Stinking clouds block line of sight
... you will also get a message when a seen stinking cloud
or the one surrounding the hero dissipates.

Original feature comes from Fourk, but this version (with some
minor changes) comes from xnethack by copperwater <aosdict@gmail.com>
2022-01-31 19:00:19 +02:00
PatR
260e015067 comment bit 2022-01-30 13:26:49 -08:00
nhmall
e86b926e54 more CI mingw tinkering
The default tar in the path withing the CI environment is not
the bsdtar variation of tar that comes with Windows (the one
which will extract zip files as well as tar files).

Try using powershell instead for the extraction instead.
2022-01-30 14:27:44 -05:00
nhmall
87d58c1c83 more ming32 build in CI 2022-01-30 08:58:49 -05:00
nhmall
1caf9821d2 fake mail follow-up tidbit 2022-01-29 23:33:58 -05:00
nhw_cron
70daee80e5 This is cron-daily v1-Jan-26-2022. 000files updated: Files 2022-01-29 23:26:59 -05:00
nhmall
087f3993f7 yet more fixes*.* rename 2022-01-29 22:57:22 -05:00
nhmall
0150692a94 rework the fake mail readmail() routine
Remove the dynamic memory allocation.
2022-01-29 22:32:40 -05:00
nhmall
b1b2c67d09 ensure MSYSTEM matches mingw tools used in CI 2022-01-29 20:41:49 -05:00
nhmall
988e241021 back out one of the pr624 changes
This one caused a build failure on a cross-compile.
2022-01-29 20:32:30 -05:00
nhw_cron
0d1f3de027 This is cron-daily v1-Jan-26-2022. 000files updated: Files 2022-01-29 18:29:53 -05:00
nhmall
bfb2a29f7a update .gitattributes for two windows folders 2022-01-29 18:16:07 -05:00
PatR
d0b69efc10 more fixes*.* rename
nethack 3.0, nethack 2.2, and hack 1.0 did not use a three component
version numbering scheme so their corresponding fixes files shouldn't
do so either.  Change those from fixesX-Y-0.txt to fixesX-Y--.txt.
2022-01-29 15:00:49 -08:00
nhw_cron
eb8f7999fa This is cron-daily v1-Jan-26-2022. 000files updated: Files 2022-01-29 17:53:37 -05:00
nhmall
fd792509da build doc updates and windows Makefile updates 2022-01-29 17:29:51 -05:00
nhkeni
1647125f89 rationalize extensions in doc directory
rename text files to have .txt extension, etc
    update references to changed filenames
2022-01-29 16:28:06 -05:00
nhkeni
6feb4f09bc enable NH_DATESUB for all .6 files 2022-01-29 16:09:26 -05:00
PatR
11c7643ea7 reformat dat/hh
For
 key name description
reduce the width of the first column from 8 spaces to 6 and increase
the width of the second column from 8 spaces to 10 so that fewer lines
have misaligned third column caused by long name.

Also a small amount of extra verbosity, mostly for I and A/P/R/T/W.
2022-01-29 12:26:22 -08:00
nhmall
8c7137613b move a file that is no longer used to outdated 2022-01-29 15:00:50 -05:00
PatR
a0964615af pull request #624 - Add missing const
git has me really confused right now, first requiring a merge, then
not needing any merge.  Anyway, add pull request #624 which was
unintentinoally closed and then couldn't re-opened.  Now it's been
incorporated so is intentionally closed.

Closes #624
2022-01-29 11:18:26 -08:00
SHIRAKATA Kentaro
cf810630de add missing const
If you want to declare a pointer which the address pointed to is constant,
you should declare it as like `static const char *const var = "...";`.

This commit supplies missing `const` and prevents some programming
error in the future.
2022-01-29 11:13:01 -08:00
nhmall
893d11f7d5 mingw symbols follow-up 2022-01-29 14:06:52 -05:00
nhmall
721db76189 do away with symbols.template in windows
If the one provided in the zip/distribution is newer, replace
the one used by the game after renaming the current one to
symbols.save.

If the one used by the game is newer, do nothing with it.
2022-01-29 14:04:20 -05:00
nhmall
9b38353833 update for mingw build within CI 2022-01-29 13:58:38 -05:00
nhmall
4db0afe785 fix a comment typo 2022-01-29 09:36:09 -05:00
nhmall
c03f24ceb7 try to work around a mingw shortcoming within CI
The mingw-w64 version on the CI platform is older and
is missing a sought copy of winres.h.

This attempts to work around that by having the Makefile
create a temporary copy of winres.h in the win/win32 directory
which that windres.exe is already search in. The file is
then immediately removed after windres uses it.

The contents of the temporary winres.h match the contents
of that file that is distributed with the more up-to-date msys2
distribution of mingw-w64.

It won't be known if this workaround solves all the CI issues
with the mingw build until after it is committed and observed.
2022-01-29 09:20:29 -05:00
nhmall
c2024b8990 remove some outdated references to travis 2022-01-29 08:34:58 -05:00
Pasi Kallinen
9f9551bdb3 Swap running and rushing modes back
I unintentionally swapped the shift and ctrl movement keys
when redoing the movement input - change them back to how
it was earlier.

Also change the number_pad meta-key bindings, and explain
in the comments why: We can't bind shift or ctrl numbers.
Meta (aka alt-key) works with number-pad numbers when
the altmeta-option is on. There was no altmeta in 3.4.3.

Here's a table of the flags.run/g.context.run values,
from 3.4.3 and 3.7 as of this commit:

             | num_pad:0 || num_pad:1
             | 343 | 370 || 343 | 370
-------------------------------------------------
 <dir>       |  0  |  0  ||  0  |  0
 shift-<dir> |  1  |  1  ||  0  | N/A
 ctrl-<dir>  |  3  |  3  ||  0  | N/A
 meta-<dir>  | N/A | N/A || N/A |  1 (with altmeta)
 m-prefix    |  0  |  -  ||  0  |  -
 G-prefix    |  3  |  3  ||  3  |  3
 g-prefix    |  2  |  2  ||  2  |  2
 5-prefix    | N/A | N/A ||  3  |  3
-------------------------------------------------

The m-prefix in 3.7 does not set the run-value, as it can now
be used with any movement key or prefix, which will set the run value.

New input system does not lose functionality when compared to 3.4.3.
Instead, the number_pad users gain the meta-<dir> running.

This doesn't fix the issue of three badly differentiated run values.
2022-01-29 12:58:06 +02:00
nhmall
b9228bd284 Jan 28 cron daily updates 2022-01-28 10:57:08 -05:00
Pasi Kallinen
af6f9b4594 X11 issue is already fixed 2022-01-28 17:28:54 +02:00
nhmall
fdaf6ab328 comment bit 2022-01-28 09:31:30 -05:00
nhmall
1b7ffcc87b Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2022-01-28 07:50:46 -05:00
nhmall
f5fd7e1557 CI mingw build should now invoke compile via gcc 2022-01-28 07:49:41 -05:00
Pasi Kallinen
c722962713 Cancellation explodes magical traps 2022-01-28 08:30:08 +02:00
nhmall
a6a7af368f mingw rc and lua version 2022-01-28 00:08:02 -05:00
nhmall
5d4fa475fa CI mingw build follow-up 2022-01-27 23:00:49 -05:00
nhmall
0431bcf3ac update CI build for mingw 2022-01-27 22:54:03 -05:00
PatR
03d1a2980b update male valkyrie tile
Basic stereotypical rendering:  shortens the hair and adds a beard;
removes the large, thin red X.  Needed when a valkyrie puts on an
amulet of change.
2022-01-27 16:15:07 -08:00
PatR
993477b48f X11 topten display
Make the same change as was done for Qt three or so weeks ago:  force
the 'toptenwin' option on in X11_init_nhwdinows() so that scores (or
wizard mode "your score is ignored") are shown in a popup text window
instead of being sent to stdout.
2022-01-27 16:11:22 -08:00
PatR
ea811e7087 X11 ant extermination
The X11 tiled map was being initialized to the tile for giant ant.
Visible during the role/race/&c selection dialog and if you get the
"already a game in progress under your name; destroy it?" prompt.
2022-01-27 16:10:11 -08:00
nhmall
b50d78231c fixes37.0 entry for pr#661
Makefile.mingw32 and Makefile.mingw32.depend are intended to replace
Makefile.gcc.
To use them:

cd /d/prj/NetHack/src
cp ../sys/windows/Makefile.mingw32* .
mingw32-make -f Makefile.mingw32 clean
mingw32-make -f Makefile.mingw32 depend
mingw32-make -f Makefile.mingw32
Improvements:

Add $(USE_LUADLL) to release lua-5.4.3.dll, instead of link static
lua.lib into .exe files.
Add windres "--target" option, to fix the NetHackW.exe startup problem.
Add "-s" option to $(LDFLAGS) in release mode, to make exe/dll smaller.
Add $(CLEAN_DIR) and $(CLEAN_FILE) to track what to clean.
Remove *.tag, but use "order-only prerequisites" to make directory
before any '.o' is built.
Use make variables and functions to improve readability.
Each project has its own directory to hold object files, to fix the
interference problem between different projects, like NetHack.exe object
files were built with "-DTILES".
Add "-mconsole" option when linking NetHack.exe, to fix that sometimes
GetStdHandle returned with invalid handle error.
Add ".PHONY" statements.
Use "gcc -E -MM -MT" to implement semi-auto "Prerequisites Generating".
2022-01-27 18:40:53 -05:00
Feiyun Wang
96de8d58d6 Some improvements in Makefile.mingw32.depend
- Change $(cce) to output .d file prerequisite too, the same as .o
- Replace $(CLEAN_FILE) handling w/ "clean: cleandep", for more encapsulation
2022-01-27 18:34:50 -05:00
nhmall
8a26e01397 remove sys/windows/Makefile.gcc
It has been superseded by sys/windows/Makefile.mingw32
2022-01-27 18:34:23 -05:00