Commit Graph

2675 Commits

Author SHA1 Message Date
PatR
1f36b98b8f 'selectsaved' extension
Instead of a menu listing
 a - hero1
 b - hero2
 n - New game
 q - Quit
show
 a - hero1-role1-race1-gend1-algn1
 b - hero2-role2-race2-gend2-algn2
 n - New game
 q - Quit
or
 a - - hero1-role1-race1-gend1-algn1
 b - X hero2-role2-race2-gend2-algn2
 c - D wizard-role3-race3-gend3-algn3
 n - New game
 q - Quit
when any game in the list wasn't saved during normal play.  (Those
are sorted by character name; the playmode is just coincidence.)

The dash for 'normal' doesn't look great but -/X/D are codes used in
entries written to paniclog.  The whole playmode prefix doesn't look
particularly good but I suspect that most players relying on restore
via menu won't see it.

It should work when the character name has dashes in it but that
hasn't been properly tested.

The gender and alignment suffices reflect their value at the time of
save rather than at the start of the game.  That might be considered
a bug but it was easiest.

Increments EDITLEVEL; existing save and bones files are invalidated.
2024-10-10 23:14:25 -07:00
nhmall
ac3031932f update tested versions of Visual Studio 2024-10-10 2024-10-10 18:14:57 -04:00
nhmall
a70ad42d22 address Windows windsys.c analyzer complaints
sys/windows/windsys.c(419): warning C6387: 'hMod' could be '0':
  this does not adhere to the specification for the function 'GetProcAddress'.

sys/windows/windsys.c(437): warning C28159:
  Consider using 'GetTickCount64' instead of 'GetTickCount'.
  Reason: GetTickCount overflows roughly every 49 days.  Code that does not
          take that into account can loop indefinitely.
          GetTickCount64 operates on 64 bit values and does not have that
          problem
2024-10-08 11:57:46 -04:00
nhmall
19d8ec6d12 address Windows consoletty.c analyzer complaints
sys/windows/consoletty.c: warning C6388: '&reserved' might not be '0':
  this does not adhere to the specification for the function 'WriteConsoleA'.
sys/windows/consoletty.c(2514): warning C28159:
  Consider using 'IsWindows*' instead of 'GetVersion'. Reason: Deprecated.
Use VerifyVersionInfo* or IsWindows* macros from VersionHelpers.
2024-10-08 11:32:58 -04:00
nhmall
0e68118c53 follow-up: Makefile_utl.vms 2024-10-06 09:02:01 -04:00
nhmall
b61c3e5138 repair msdos cross-compile (take 2) 2024-10-05 17:40:03 -04:00
nhmall
575030548a repair msdos cross-compile 2024-10-05 16:48:52 -04:00
nhmall
fb70aadbb5 improve copy_bytes() maintenance
Remove the copy_bytes() function from files.c and util/recover.c
and place a single copy into hacklib.
2024-10-05 15:55:20 -04:00
nhmall
5af723669e some static analyzer items 2024-10-04 12:34:09 -04:00
G. Branden Robinson
d116052796 Build *roff documents with groff warnings enabled.
...some of them, at any rate.  We shut off (1) warnings provoked by Matt
Bishop's "mn" macro package, and (2) warnings spuriously emitted by
groff 1.23 and previous when "-wall" (or "-ww") is specified.

Also update explanatory comments.
2024-09-14 09:58:12 -05:00
nhmall
33652b8288 remove extraneous script file (Windows) 2024-09-07 10:13:04 -04:00
nhkeni
aa542afe53 Merge branch 'NetHack-3.7' into keni-prefix 2024-09-06 15:07:19 -04:00
nhkeni
6b4173688f Documentation cleanup and streamlining. 2024-09-06 12:44:19 -04:00
nhmall
9a09bcdfc9 remove extraneous change from pr 2024-09-03 12:22:37 -04:00
Peter de Vroomen
fd3b3cfcf9 Fix project for Macos builds with Xcode. Builds for MacOs Sequoia (15) and Xcode 16 beta 3. 2024-09-03 12:18:10 -04:00
nhmall
78042680b8 update tested versions of Visual Studio 2024-09-01 2024-09-01 09:39:56 -04:00
nhkeni
3f2d46823a add nhlua target (for internal use) 2024-08-10 16:25:35 -04:00
nhmall
2ed95119f1 update tested versions of Visual Studio 2024-08-02 2024-08-02 13:24:20 -04:00
nhkeni
90cfeccdfd Merge branch 'NetHack-3.7' into keni-fetchlua 2024-07-29 17:07:17 -04:00
nhmall
4353ee49d8 sed substitution went too far (wasm cross-compile)
Also, link with hacklib
2024-07-28 12:27:02 -04:00
nhkeni
93ece2c9b4 update fetch-lua-TARGET targets 2024-07-27 18:24:41 -04:00
nhkeni
190aeb921b fetch-lua bits
make it clearer how to change the fetch try order
avoid odd output if more than one lua .gz file exists
make it clearer if we don't have a checksum for a fetched file
2024-07-26 21:19:41 -04:00
nhkeni
e3cabd95ee Merge branch 'NetHack-3.7' into keni-fetchlua 2024-07-26 20:20:34 -04:00
nhkeni
3913cebdb4 make "make fetch-lua" handle multiple lua versions 2024-07-26 14:47:16 -04:00
nhmall
a7240f8689 update tested versions of Visual Studio 2024-07-17 2024-07-17 10:02:25 -04:00
nhmall
0eb7f109e0 follow-up, program_state 2024-07-13 16:31:35 -04:00
nhmall
6c0ae092c6 distinguish global variables that get written to savefile
The g? structs had a mix of variables that were written to
the savefile, and those that were not.

For better clarity and to distinguish those that end up in
the savefile, relocate some g? variables that get written
directly to the savefile into different structs.

This updates EDITLEVEL, although technically it probably
didn't need to, since savefile contents are not changing.

Details:

    gb.bases            -> svb.bases
    gb.bbubbles         -> svb.bbubbles
    gb.branches         -> svb.branches
    gc.context          -> svc.context
    gd.disco            -> svd.disco
    gd.dndest           -> svd.dndest
    gd.doors            -> svd.doors
    gd.doors_alloc      -> svd.doors_alloc
    gd.dungeon_topology -> svd.dungeon_topology
    gd.dungeons         -> svd.dungeons
    ge.exclusion_zones  -> sve.exclusion_zones
    gh.hackpid          -> svh.hackpid
    gi.inv_pos          -> svi.inv_pos
    gk.killer           -> svk.killer
    gl.lastseentyp      -> svl.lastseentyp
    gl.level            -> svl.level
    gl.level_info       -> svl.level_info
    gm.mapseenchn       -> svm.mapseenchn
    gm.moves            -> svm.moves
    gm.mvitals          -> svm.mvitals
    gn.n_dgns           -> svn.n_dgns
    gn.n_regions        -> svn.n_regions
    gn.nroom            -> svn.nroom
    go.oracle_cnt       -> svo.oracle_cnt
    gp.pl_character     -> svp.pl_character
    gp.pl_fruit         -> svp.pl_fruit
    gp.plname           -> svp.plname
    gp.program_state    -> svp.program_state
    gq.quest_status     -> svq.quest_status
    gr.rooms            -> svr.rooms
    gs.sp_levchn        -> svs.sp_levchn
    gs.spl_book         -> svs.spl_book
    gt.timer_id         -> svt.timer_id
    gt.tune             -> svt.tune
    gu.updest           -> svu.updest
    gx.xmax             -> svx.xmax
    gx.xmin             -> svx.xmin
    gy.ymax             -> svy.ymax
    gy.ymin             -> svy.ymin

Related note:
There are some pointer variables that are heads of chains that were not
moved from 'g?' to 'sv?', because they are not actually written to the
savefile directly, but the objects/monst/trap/lightsource/timer in the
chains they point to are. That can be changed, if desired.
Examples: gi.invent, gm.migrating_objs, gb.billobjs, gm.migrating_mons,
          gf.ftrap, gl.light_base, gt.timer_base
2024-07-13 14:57:50 -04:00
nhkeni
70d0bc25f8 fetch-lua bits
Add a local copy of the lua source file.
Re-organize the sh code to avoid duplication and add (a little) clarity.
2024-06-23 13:04:28 -04:00
nhkeni
c8b04a67f6 git prefix for Makefile.mingw32 and Makefile.nmake (untested) 2024-06-22 13:05:57 -04:00
nhkeni
a8b5e88744 add the git prefix to the long version output
Tested on MacOS, written and not tested for Linux, not attempted for Windows
2024-06-19 12:28:13 -04:00
nhmall
a86b9e6899 update tested versions of Visual Studio 2024-06-13 2024-06-13 09:05:01 -04:00
Mika Kuoppala
20f8af224b hints/linux.370: Add support for ubsan (undefined behaviour sanitizer) for gcc
This will add an option to compile and link nethack executable
with ubsan and catch undefined behaviour errors on runtime.
2024-06-09 09:34:57 -04:00
nhmall
16ac21297a update tested versions of Visual Studio 2024-05-04 2024-06-04 07:45:23 -04:00
nhmall
26b12f83fe update tested versions of Visual Studio 2024-05-16 2024-05-16 12:27:56 -04:00
nhmall
68169708dc follow-up
replace dependency that was removed but should not have been
2024-05-13 08:54:56 -04:00
nhmall
29bf3646e0 add makedefs options for producing individual files
This may be useful for some build environments to avoid parallel make
issues, and artificially-concocted order dependencies, leaving the ordering
up to that specified in the Makefile.

The related makedefs options are now:

       ‐s     Generate the bogusmon , engrave and epitaph files.

       ‐1     Generate the epitaph file.

       ‐2     Generate the engrave file.

       ‐3     Generate the bogusmon file.

Also resolves an existing issue encountered in doc/makedefs.6 where "and epitaphfiles"
was being produced in the result.
2024-05-13 08:45:11 -04:00
nhmall
97916007ef restrict font fallback to legacy Windows console
It was misbehaving with ENHANCED_SYMBOLS so restrict the font fallback
to the legacy Windows console for now.
2024-05-12 08:12:30 -04:00
nhmall
38e8e99565 Windows symbols copying
Avoid leaving outdated symbols file in place when there is a newer one.
2024-05-12 08:06:41 -04:00
nhmall
fce82ac0f3 Merge branch 'patch-4' of https://github.com/nikolas/NetHack into NetHack-3.7 2024-05-07 10:15:17 -04:00
nhmall
1d7abb0b58 cross-compile requires two distinct hacklib.a libraries
One to link with the stuff that needs to be built and executed on
the build host during the build, such as makedefs.

One to link with the stuff that will run on the target platform.
2024-04-27 17:24:47 -04:00
nhmall
59bd1ce687 update tested versions of Visual Studio 2024-04-19 2024-04-19 14:17:47 -04:00
nhmall
7e6dab38c5 work around a conflict with visual studio build 2024-04-15 12:45:49 -04:00
nhmall
2ce6df8be5 yet another follow-up 2024-04-15 12:28:00 -04:00
nhmall
8b48032e74 follow-up for Makefile.mingw32 2024-04-15 12:24:59 -04:00
nhmall
53e4e2e12a update Makefile.mingw32 res file dependencies 2024-04-15 12:12:47 -04:00
nhmall
453eacdcb6 include the manifest in NetHackW res 2024-04-15 12:09:23 -04:00
RainRat
af3a321acb Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-13 23:45:32 -07:00
RainRat
262c9e763c Merge branch 'NetHack:NetHack-3.7' into NetHack-3.7 2024-04-13 09:15:39 -07:00
nhmall
936096d5e3 Windows build fix
consoletty.o : error LNK2005: _tty_change_color already defined in wintty.o
consoletty.o : error LNK2005: _tty_get_color_string already defined in wintty.o
2024-04-13 09:11:27 -04:00
Pasi Kallinen
a57d0e6f4f Curses: add support for the palette config option
Depends on CHANGE_COLOR compile-time option.

Also allow multiple palette-definitions in the config file.
2024-04-13 12:01:43 +03:00