Commit Graph

11730 Commits

Author SHA1 Message Date
PatR
0b1f5ea45e outdated vs Unix 'make depend'
After the most recent round of moving old stuff to 'outdated',
src/windows.c contained two references to non-existent files.
That broke 'make depend'.  Updating it to turn those two into
comments seems risky because someone might add an include for
some new interface later in the file.  So comment them out in
the source instead.  Also, redo previous 'make depend' update
from about three weeks ago to do the same thing.
2021-01-31 13:05:32 -08:00
nhw_cron
28f89ae3b2 This is cron-daily v1-Jan-20-2020. files updated: Files 2021-01-31 14:19:40 -05:00
nhmall
e53fcf0940 FDECL and NDECL 2021-01-31 14:15:08 -05:00
nhmall
5ec6a3f341 follow-up bit for QSORTCALLBACK entries 2021-01-31 14:06:56 -05:00
nhmall
41fc278cfb CFDECLSPEC -> QSORTCALLBACK
also remove one inappropriate use of CFDECLSPEC
2021-01-31 13:58:19 -05:00
nhmall
322293993f follow-up to remove some remnant wingem.h references
this should correct the broken mingw tty build
2021-01-31 13:44:15 -05:00
nhmall
979571e09e FDECL, NDECL in outdated 2021-01-31 13:40:15 -05:00
nhmall
b851b28cbe FDECL and NDECL in sys/vms 2021-01-31 12:49:22 -05:00
nhmall
fadc5f8a5e remnant FDECL 2021-01-31 09:20:25 -05:00
nhmall
4a6eb00c84 relocate some gem and Gnome files to outdated folder tree 2021-01-31 08:51:35 -05:00
nhmall
e2a3368837 remove Amiga cross-compile bits 2021-01-31 07:57:28 -05:00
Bart House
a54a8c6854 Remove awful kludges dealing with command counts. 2021-01-30 19:06:27 -08:00
PatR
38e69519d1 fix #K3257 - lichens' sticky attack holds hero
in the air.  can_reach_floor() was changed relatively recently
to return False if hero was held by a monster.  It wasn't
necessarily because the monster was lifting him or her off the
floor though.  Restricted movement could produce same effect.

Change the new behavior to only happen when holder has used a
hug attack, so that being held by a fungus or mimic doesn't
prevent access to the floor.

This may need to be revisited because the idea that the hero's
arms have been pinned by a hugging monster contradicts the
ability to attack that monster.  However, it matches the long-
standing inability to attack any other adjacent monster in
that circumstance.
2021-01-30 17:19:17 -08:00
PatR
aacea63f7c squeaky board message grammar bit
"You hear a [BCDG] note squeak in the distance" is ok, but
"you hear a [AEF] note squeak in the distance" isn't.

Squeaky board notes already had correct a/an handling but that
particular message explicitly suppressed it.
2021-01-30 16:42:36 -08:00
nhmall
143a7b3a06 another doc/options.doc update 2021-01-30 12:28:23 -05:00
nhmall
513bf63300 doc/options.doc update 2021-01-30 12:18:49 -05:00
Pasi Kallinen
933c7f215c Move the other options to alphabetical order 2021-01-30 19:07:58 +02:00
Pasi Kallinen
10cd5af500 Move other options into the options array 2021-01-30 18:43:21 +02:00
nhmall
5e5df4f6b9 remove an old #pragma from sp_lev.c that isn't actually accomplishing anything 2021-01-30 11:25:27 -05:00
Bart House
9862e19a36 Disable warning for LUA files in Visual Studio builds. 2021-01-29 20:49:37 -08:00
nhmall
262f0d11b5 a couple of curses warnings on one compiler 2021-01-29 23:14:16 -05:00
Bart House
a2d76d09b2 Fixing azure pipeline build to use correct project. 2021-01-29 16:56:05 -08:00
PatR
e8d44b8329 extcmdlist[] bit 2021-01-29 12:33:20 -08:00
nhmall
7b357463d3 azure-pipelines overrode a recent gcc change in the cross-compile
this makes it match, but doesn't fix the stray
2021-01-29 14:29:38 -05:00
PatR
30ab63165f extcmdlist[] formatting
Reformat the list of commands, making all of them take two lines
(except for a couple that need more) even if they fit on one.

Put "#wizmgender" into alphabetical order.  I don't think we need
it anymore, but if we keep the functionality then it should be
demoted from a command to a wizard mode boolean option.

Also wrap a handful of lines wider than the formatting threshold.
2021-01-29 10:48:35 -08:00
nhmall
ca1f7c88d4 deal with some win/win32 warnings
win/win32/mhdlg.c(137)   : warning C4456: declaration of 'wbuf' hides
                           previous local declaration
win/win32/mhdlg.c(62)    : note: see declaration of 'wbuf'
win/win32/mhdlg.c(875)   : warning C4189: 'gender': local variable is
                           initialized but not referenced
win/win32/mhdlg.c(874)   : warning C4189: 'race': local variable is
                           initialized but not referenced
win/win32/mhdlg.c(876)   : warning C4189: 'alignment': local variable is
                           initialized but not referenced
win/win32/mhdlg.c(873)   : warning C4189: 'role': local variable is
                           initialized but not referenced
win/win32/mhinput.h(24)  : warning C4201: nonstandard extension used:
                           nameless struct/union
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhinput.h(24)  : warning C4201: nonstandard extension used:
                           nameless struct/union
win/win32/mhinput.h(24)  : warning C4201: nonstandard extension used:
                           nameless struct/union
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhmenu.c(62)   : warning C4201: nonstandard extension used:
                           nameless struct/union
win/win32/mhmenu.c(1082) : warning C4456: declaration of 'monitorScale'
                           hides previous local declaration
win/win32/mhmenu.c(995)  : note: see declaration of 'monitorScale'
win/win32/mhmenu.c(1142) : warning C4456: declaration of 'wbuf' hides
                           previous local declaration
win/win32/mhmenu.c(986)  : note: see declaration of 'wbuf'
win/win32/mhmenu.c(1082) : warning C4189: 'monitorScale': local variable
                           is initialized but not referenced
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhmsgwnd.c(700): warning C4701: potentially uninitialized
                           local variable 'size' used
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhsplash.c(158): warning C4189: 'verstrsize': local variable
                           is initialized but not referenced
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhstatus.c(353): warning C4057: 'function':
                           'const unsigned char *' differs in indirection
                           to slightly different base types from 'const char *'
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/mhmsg.h(70)    : warning C4200: nonstandard extension used:
                           zero-sized array in struct/union
win/win32/NetHackW.c(181): warning C4456: declaration of 'buf' hides
                           previous local declaration
win/win32/NetHackW.c(90) : note: see declaration of 'buf'
win/win32/NetHackW.c(189): warning C4456: declaration of 'buf' hides
                           previous local declaration
win/win32/NetHackW.c(90) : note: see declaration of 'buf'
2021-01-29 13:00:00 -05:00
Dean Luick
7a07125ca3 Add missing fields in shown_stats[] in winstat.c
This eliminates a compiler initializer warning.
2021-01-29 11:44:39 -06:00
Dean Luick
3da8dca836 Add missing fields in extcmdlist[] in cmd.c
This eliminates a compiler initializer warning.
2021-01-29 11:41:12 -06:00
Dean Luick
2f4f7d22d3 Fix align type mixup wth align mask
Fix two cases of missed conversion of an alignment to an align mask.

Change induced_align()'s return type to unsigned int since it returns
an align mask (unsigned), not an align type (signed).
2021-01-29 09:31:08 -06:00
Dean Luick
2c38749cab Update code style for ANSI function prototypes 2021-01-29 09:01:15 -06:00
Dean Luick
cf3ad240ac Fix X11 warnings 2021-01-28 21:12:06 -06:00
Dean Luick
8ddab09cab Fix set but not used warnings 2021-01-28 21:11:21 -06:00
PatR
407acbf987 fix class discovery for fully discovered class
This was caused by a post-3.6 change I made when adding sorting
capability to '`' (and to '\' but that wasn't affected).  Cited
case was lack of "water" when all potions had been discovered.
Some other classes (but not all) were vulnerable too.
2021-01-28 17:10:18 -08:00
PatR
41956e5798 fix #K3255 - "death wand"
Prevent a wish request of "death wand" (as alternate spelling
for "wand of death") from matching "Death" monster and yielding
a random wand.

"death finger" and "death finger spellbook" produce a "spellbook
of finger of death" even without a similar fix.
2021-01-28 17:00:13 -08:00
nhmall
5bd95649de fix some warnings seen by Microsoft Visual Studio compiler
../src/nhlsel.c(467) : warning C4701: potentially uninitialized local variable 'x1' used
../src/nhlsel.c(591) : warning C4701: potentially uninitialized local variable 'x' used
../src/nhlsel.c(467) : warning C4701: potentially uninitialized local variable 'y1' used
../src/nhlsel.c(591) : warning C4701: potentially uninitialized local variable 'y' used
../src/nhlsel.c(469) : warning C4701: potentially uninitialized local variable 'x2' used
../src/nhlsel.c(469) : warning C4701: potentially uninitialized local variable 'y2' used
2021-01-28 09:45:16 -05:00
nhmall
0714ddcef8 update msdos djgpp cross-compiler gcc version 2021-01-28 08:02:45 -05:00
nhmall
f625a8c553 remove more FDECL, NDECL macro usage 2021-01-28 07:55:34 -05:00
Pasi Kallinen
b502a7d9b2 Remove leftover variables 2021-01-28 12:44:45 +02:00
nhmall
0b518d0cee Windows Makefile.msc update 2021-01-27 23:07:52 -05:00
nhmall
f01b4f0bf0 a couple of old-style function declarations in Windows code 2021-01-27 21:52:55 -05:00
nhmall
9d93e1e52a follow-up bits 2021-01-27 21:04:51 -05:00
nhmall
f963c5aca7 switch source tree from k&r to c99 2021-01-26 21:06:16 -05:00
PatR
a2a9cb7b4f X11 fancy status coloring cleanup
Fix a couple of warnings and do some reformatting.

Also tracks current color and attributes for each status field
and only updates them if they're being changed instead of every
time the value changes.  Not very thoroughly tested so far.

The only attribute being supported is inverse but tty-style
status supports the full set.  Also, changed values are always
highlighted in inverse even if there is no highlight rule.
That should probably only apply when 'statushilites' is 0,
giving the old fancy status highlighting when regular hilites
are turned off.
2021-01-26 13:54:43 -08:00
PatR
acbf423734 pull request #443 - X11 color status highlighting
for 'fancy status'.  This is from an emailed diff rather than
directly from git, and the git code has a bunch of commits,
so this may or may not match the latest.  It needs formatting
cleanup and triggers a couple of warnings on OSX.  Fix to follow.

Status highlight colors use the same names as menu coloring
but this uses different X11 colors for the two sets.  That
will have to be changed so that yellow either means yellow all
the time or goldenrod all the time instead of sometimes yellow
and sometimes goldenrod.

Adopts #443
2021-01-26 13:39:50 -08:00
nhmall
ea12c70e46 X11 warning on macOS 2021-01-26 10:27:51 -05:00
nhmall
939f20e2ea fix warning differently mklev.c 2021-01-26 08:48:38 -05:00
nhmall
62f25fd000 clear five warnings for "set but not used" variables
Note: the line numbers referenced in the warning messages below are not in sync
with the NetHack-3.7 branch and should be disregarded

files.c: In function 'get_saved_games':
files.c:1168:9: warning: unused variable 'n' [-Wunused-variable]
 1168 |     int n, j = 0;
      |         ^

mhitm.c: In function 'mdamagem':
mhitm.c:843:13: warning: variable 'cancelled' set but not used [-Wunused-but-set-variable]
  843 |     boolean cancelled;
      |             ^~~~~~~~~

mhitu.c: In function 'hitmu':
mhitu.c:943:9: warning: variable 'uncancelled' set but not used [-Wunused-but-set-variable]
  943 |     int uncancelled;
      |         ^~~~~~~~~~~

mklev.c: In function 'place_branch':
mklev.c:1214:20: warning: variable 'br_room' set but not used [-Wunused-but-set-variable]
 1214 |     struct mkroom *br_room;
      |                    ^~~~~~~

monmove.c: In function 'm_move':
monmove.c:874:43: warning: variable 'doorbuster' set but not used [-Wunused-but-set-variable]
  874 |     boolean can_open = 0, can_unlock = 0, doorbuster = 0;
      |                                           ^~~~~~~~~~
2021-01-25 12:57:47 -05:00
PatR
8a965b8cf9 \#wizintrinsic timeout values
Tell/remind wizard mode player how to specify timeout amounts
when using #wizintrinsic to set temporary timeouts.
2021-01-24 13:55:19 -08:00
PatR
8af63bf1a4 fix github issue #447 - casting area-effect spell
at self when blind.  Spell targetting would let player pick
hero's own spot but casting would reject it when blind because
hero didn't sense any monster there.  The player wanted to cast
skilled fireball at self to cure being turned into slime but
wasn't allowed.  (Targetting an adjacent spot would work for
fireball, but is only feasible when telepathy reveals a monster
there.)

While testing the one-line fix, I noticed that the message line
(tty) showed stale data (autodescribe info for target spot) as
the fireball I cast (when not blind) bounced around the vicinity.
Normally that's cleared when a message is issued or the when the
next command is requested, but skilled fireball causes multiple
explosion animations before either of those situations.
2021-01-24 13:00:44 -08:00
PatR
35b343b50b options parsing one more time
Manually created and maintained prototypes for optfn_FOO()
aren't needed once the conditionals in optlist.h and options.c
match each other.
2021-01-23 18:46:03 -08:00