Commit Graph

16660 Commits

Author SHA1 Message Date
Pasi Kallinen
cad4d87101 wishtest fix
left-over bit from testing
2024-03-16 17:09:54 +02:00
Pasi Kallinen
9d97835686 Minor wishing alias improvement
Previously when wishing for "ring of protection from shape shifters",
you got a random ring instead of the protection from shape changers,
because the string matching alias was "protection from shape shifters"
without the object class.  Now, we'll check if the wish matched any
object class, but not existing object or alias, and try matching
the aliases again, but only those of the already matching obj class.

Add an alias for the ring of increase accuracy: "ring of accuracy",
and tests for it.
2024-03-16 16:59:58 +02:00
nhkeni
54c3dd35ac Merge branch 'keni-staticfn' into NetHack-3.7 2024-03-16 09:38:21 -04:00
Pasi Kallinen
c91d8d9450 Curses: unnecessary window erasing
When removing a temporary (menu, text, popup) window, the code
was erasing it from memory and then refreshing the screen.
This is unnecessary, as we're refreshing all the windows anyway.
2024-03-16 13:58:28 +02:00
nhkeni
fabbb491e8 Avoid a complaint from GCC's analyzer. Patch from Pat. 2024-03-15 20:46:10 -04:00
nhmall
3b75501937 get rid of a couple of warnings if -Wassign-enum is used
symbols.c:429:7: warning: integer constant not in range of enumerated type 'enum symparse_range' [-Wassign-enum]
  429 |     { 0, 0, (const char *) 0 } /* fence post */
      |       ^
windows.c:1765:32: warning: integer constant not in range of enumerated type 'enum from_core_requests' [-Wassign-enum]
 1765 |                              { 0, 0, { NO_COLOR, ATR_NONE }}};
      |                                ^
2024-03-15 16:24:49 -04:00
nhmall
79648c6ce2 some variables not referenced in another translation unit made static
Also adds some cross-refence comments for some variables that are
referenced in another translation unit.
2024-03-15 16:00:14 -04:00
Pasi Kallinen
243f6410d2 Curses: simplify color handling
The map frame (background) colors were all over the place; the
code should be much cleaner now, and still work exactly the same
as before.

I tested this with terminals with 8, 16, and 256 COLORS.
2024-03-15 20:36:56 +02:00
nhkeni
96a74ccfbf Silence a compiler warning in cross-compile 2024-03-15 14:05:14 -04:00
Pasi Kallinen
464d0c9269 Curses: swap the grey and no-color initialization
The grey color was initialized as default foreground color,
and no-color as white.
2024-03-15 11:06:44 +02:00
nhkeni
9c0ed8ae63 NOSTATICFN for src/* 2024-03-14 17:41:51 -04:00
nhkeni
ab6d7cdc3b depend.awk: bugfix for commented out replacement text 2024-03-13 22:04:19 -04:00
nhmall
31a8b44312 fix error in copied dependencies from Makefile.src 2024-03-13 20:29:40 -04:00
nhmall
2911596c5b sys/windows/Makefile.nmake dependency update
Copy the dependencies from the tail of sys/unix/Makefile.src
and adjust them for the Windows nmake build.
2024-03-13 20:10:34 -04:00
nhmall
d80352a983 warning fix read.c
read.c:148:13: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
  147 |         "Ms. Palm's House of Negotiable Affection--A Very Reputable"
      |
      |                                                                     ,
  148 |             " House Of Disrepute",
      |             ^
read.c:147:9: note: place parentheses around the string literal to silence warning
  147 |         "Ms. Palm's House of Negotiable Affection--A Very Reputable"
      |         ^
1 warning generated.
2024-03-13 19:09:26 -04:00
PatR
9ee55d87eb fix pull request #1223 - wand of striking by monst
Pull request by elunna with assistance by entrez tried to fix up
wand of striking discovery when the wand is zapped by a monster.

The fix didn't match the intended behavior (which may or may not be
the desired behavior...), so this skips the code in the pull request.
[I can't post comments on github anymore since I declined to switch
to their 2-factor authentication.  But I can still read submissions
without logging in.]

This also tries to fix a couple of inconsistencies between zapping
by the hero versus by a monster.  If the zap "boinged" :-) due to
target's magic resistance, zap by hero didn't discover the wand but
zap by monster did.  Conversely, a zap by the hero that reached a
target and missed did discover it but one by a monster did not.

Now a zap of not-yet-discovered wand of striking by the hero which
hits, whether or not the hit gets resisted, will become discovered
provided that the spot where target is hit can be seen (the target
itself need not be), and one which misses or which can't be seen
hitting something will no longer be.

Supersedes #1223
Closes #1223
2024-03-13 13:28:05 -07:00
PatR
ff82541b74 comment typo fix... 2024-03-13 13:04:05 -07:00
PatR
2006ec6ca3 read.c bits
Add a comment to seffects_remove_curse().  Also shorten a handful of
wide lines.
2024-03-13 12:41:41 -07:00
PatR
68312f7feb magic trap uncursing vs scroll of remove curse
Reported directly to devteam:  if a magic trap gave its uncurse
effect, scroll of remove curse could become discovered.

Turns out that it would happen if hero was wielding a stack of
unholy water potions.  It didn't matter whether they were known
as water or known to be cursed or whether hero was carrying any
scrolls of remove curse.
2024-03-13 12:39:50 -07:00
nhkeni
d523041b60 zap.c as a demo for NOSTATICFN 2024-03-13 11:40:50 -04:00
nhkeni
59486fb8ad something concrete for discussion:
infrastructure for NOSTATICFN, replacing NOSTATICCORE
2024-03-13 11:39:24 -04:00
nhmall
a13b9da286 Makefile.mingw32 update
$(HLHACKLIB) was missing from the dependency list for NetHack.exe
2024-03-12 17:27:21 -04:00
nhmall
dcc6890cee hacklib comment bit 2024-03-12 16:54:49 -04:00
nhw_cron
2d3eb0da0b This is cron-daily v1-Dec-5-2024. 000files updated: Files 2024-03-12 16:53:50 -04:00
nhmall
14c139746d yet more disabled code removal 2024-03-12 16:39:23 -04:00
nhmall
629badfbd9 more code cleanup
remove disabled code from makedefs.c because it uses a function in hacklib
now.
2024-03-12 16:18:23 -04:00
nhmall
a11898bef5 some code cleanup following recent code relocations 2024-03-12 16:13:33 -04:00
nhmall
2fae2b1a25 update tested versions of Visual Studio 2024-03-12 2024-03-12 15:23:04 -04:00
PatR
6ca54852ee perm_invent initialization fix
Using
|OPTIONS=windowtype:Foo
|OPTIONS=perm_invent
or
|NETHACKOPTIONS='perm_invent,windowtype:Foo'
would enable perm_invent if interface "Foo" supported it, but using
|OPTIONS=perm_invent
|OPTIONS=windowtype:Foo
or
|NETHACKOPTIONS='windowtype:Foo,perm_invent'
or combined
|OPTIONS=perm_invent
|NETHACKOPTIONS='windowtype:Foo'
would only enable perm_invent if both "Foo" and the default interface
supported it.

Using '--windowtyp:Foo' on the command line didn't have this issue
because command line interface selection replaces the default one
before configuration file and environment options are processed.
2024-03-12 11:19:35 -07:00
nhmall
f9f9641fd4 typo fix README-hints 2024-03-12 13:02:19 -04:00
nhmall
605c6c19b6 add a doc outlining some .370 hints file build options 2024-03-12 12:30:57 -04:00
nhmall
66ce95a034 Cross-compiling update
mips
2024-03-12 11:55:11 -04:00
nhmall
bb4bcb400e cross-compiling update 2024-03-12 10:06:37 -04:00
PatR
1922dd96eb theme room vampire fix
From a reddit thread:  a 'mausoleum' theme room picked a vampire for
its occupant and applied the wait-for-you strategy to it.  Hero's ESP
or monster detection showed a meditating vampire bat.  Change monster
creation by the special level loader (which also handles theme rooms)
to force such a creature into its normal vampire form.

That revealed an older bug which wouldn't have been exercized prior
to theme rooms:  a meditating vampire could and would shape change
without ceasing meditation.  Make it not shape change rather come out
of its trance.
2024-03-11 17:40:01 -07:00
nhw_cron
51eea440dc This is cron-daily v1-Dec-5-2024. 000files updated: Files 2024-03-11 17:32:31 -04:00
nhw_cron
2d1c1f03cb This is cron-daily v1-Dec-5-2024. 005guidebook updated: doc/Guidebook.txt 2024-03-11 17:31:32 -04:00
nhmall
bed6747342 line-length follow-up bit 2024-03-11 12:02:47 -04:00
nhmall
2bece65394 README update 2024-03-11 11:59:59 -04:00
nhmall
33ea32dbe3 warning fix in end.c 2024-03-11 11:41:26 -04:00
nhkeni
4e11d526da Show only active .c.o commands; clean up temp file from make depend 2024-03-10 21:53:33 -04:00
nhkeni
faeb6285e7 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2024-03-10 19:54:25 -04:00
nhkeni
0edfb577f7 Two more bug fixes:
split depend target so "make depend" and "make updatedepend"
 get the right dependencies (this puts back the previously
 temporarily removed dependencies)

deterministically pull out the right source so moc rules
 are correct
2024-03-10 19:51:55 -04:00
nhkeni
2980c55f5c report.c: silence some compiler warnings for clang + nhmd4 2024-03-10 19:51:55 -04:00
nhkeni
eba390f1cb Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2024-03-10 18:36:10 -04:00
nhkeni
998240d5f5 remove gmake-specific code from Makefile.src
The awk script for NOSTATICCORE is currently broken.
2024-03-10 18:35:19 -04:00
nhkeni
a9494b1385 report.c: silence some compiler warnings for clang + nhmd4 2024-03-10 17:36:51 -04:00
nhkeni
387b145b58 more fixes
removal of depend target dependencies is temporary
2024-03-10 16:23:20 -04:00
nhkeni
917c574537 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2024-03-10 16:17:26 -04:00
nhkeni
ae82f6494e bug fixes 2024-03-10 15:46:20 -04:00
nhkeni
7d2362c98d hack: put back recent make depend output until I can fix whatever I just broke 2024-03-10 12:51:11 -04:00