From: nhmall Date: Fri, 6 Mar 2020 15:59:50 +0000 (-0500) Subject: Merge March 2020 changes into NetHack 3.7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2af37f44d425e2ee062b7abc16bd039f8ca9e8f8;p=nethack Merge March 2020 changes into NetHack 3.7 --- 2af37f44d425e2ee062b7abc16bd039f8ca9e8f8 diff --cc Files index e72cda145,6208fb475..2fb8424db --- a/Files +++ b/Files @@@ -136,17 -114,18 +136,17 @@@ vault.c version.c vision.c wea windows.c wizard.c worm.c worn.c write.c zap.c sys/amiga: - (files for Amiga versions - untested for 3.6.5) + (files for Amiga versions - untested for 3.6.6) Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf amidos.c amidos.p amifont.uu amifont8.uu amigst.c -amii.hlp amimenu.c amirip.c amisnd.c amistack.c -amitty.c amiwind.c amiwind.p clipwin.c colorwin.c -cvtsnd.c grave16.xpm ifchange mkdmake txt2iff.c -winami.c winami.p winchar.c windefs.h winext.h -winfuncs.c winkey.c winmenu.c winproto.h winreq.c -winstr.c xpm2iff.c +amii.hlp amimenu.c amirip.c amistack.c amitty.c +amiwind.c amiwind.p clipwin.c colorwin.c grave16.xpm +ifchange mkdmake txt2iff.c winami.c winami.p +winchar.c windefs.h winext.h winfuncs.c winkey.c +winmenu.c winproto.h winreq.c winstr.c xpm2iff.c sys/atari: -(files for Atari version - untested for 3.6.6) +(files for Atari version - untested for 3.7) Install.tos atarifnt.uue nethack.mnu setup.g tos.c unx2atar.sed diff --cc README index a3f43615e,3b4ebacb7..77a09965d --- a/README +++ b/README @@@ -1,66 -1,29 +1,66 @@@ - NetHack 3.6.6 -- General information March 2020 + NetHack 3.7.0 work-in-progress -- General information -NetHack 3.6 is an enhancement to the dungeon exploration game NetHack, +NetHack 3.7 is an enhancement to the dungeon exploration game NetHack, which is a distant descendent of Rogue and Hack, and a direct descendent of -NetHack 3.4 as there was no NetHack 3.5 release. +NetHack 3.6. -NetHack 3.6.6 is the official release of NetHack that follows NetHack 3.6.5 -and contains bug fixes since 3.6.5, including a security fix that affected -versions 3.6.1, 3.6.2, 3.6.3, 3.6.4 and 3.6.5. +NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version, +and still very early in its development cycle, there has already been changes +made, and there will continue to be many more prior to an eventual release. +The file doc/fixes37.0 in the source distribution will be updated with a list +of fixes as they are committed. -The file doc/fixes36.6 in the source distribution has a full list of fixes. +In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as +released code, and if stability is paramount, then the most recent +NetHack 3.6.5 release is safest for you. + +We're making the .0 work-in-progress available so that you can observe, test +out, and contribute to its development. Constructive suggestions, GitHub pull +requests, and bug reports are all welcome and encouraged. + +The file doc/fixes37.0 in the source distribution has a full list of bug-fixes +included so far, as well as brief mentions of some of the other code changes. The text in there was written for the development team's own use and is -provided "as is", so please do not ask us to further explain the entries in -that file. Some entries might be considered "spoilers", particularly in the +provided "as is", so please do not ask us to further explain the entries in +that file. Some entries might be considered "spoilers", particularly in the "new features" section. -Below you will find some other general notes that were not considered -spoilers: - - * invalid status highlight color could be maliciously used to corrupt memory - * formatting corpse names used internal buffers differently from formatting - * other objects and could potentially clobber memory - * avoid divide by 0 crash if 'bogusmon' (file of bogus monster types) is empty - * avoid #wizrumorcheck crash if either 'rumors.tru' or 'rumors.fal' or both - * were empty when makedefs built 'rumors' +Along with the game improvements and bug fixes, NetHack 3.7 strives to make +some general architectural improvements to the game or to its building +process. Among them: + + * Remove barriers to building NetHack on one platform and operating system, + for later execution on another (possibly quite different) platform and/or + operating system. That capability is generally known as "cross-compiling." + See the file "Cross-compiling" in the top-level folder for more information + on that. + + * Replace the build-time "yacc and lex"-based level compiler, the "yacc and + lex"-based dungeon compiler, and the quest text file processing done + by NetHack's "makedefs" utility, with Lua text alternatives that are + loaded and processed by the game during play. + + * Write game savefiles and bonesfiles in a more portable and consistent way + to open up the possibility of utilizing them between different platforms, + such as between your desktop computer and your hand-held device. + + * Add support to make the game restartable without exit (a.k.a. "play again" + support). Toward that end, many previously scattered and separate variables + have been gathered into a central 'g' structure in decl.h/decl.c. That + will benefit the porting effort to some platforms that are under + consideration. + +Here are some other general notes on the changes in NetHack 3.7 that were not +considered spoilers: + - automatic annotation "gateway to Moloch's Sanctum" for vibrating square + level once that square's location becomes known (found or magic + mapped); goes away once sanctum temple is found (entered or high altar + mapped) + - savefile: add support to deconstruct internal data structures down into + their individual fields and save those fields instead of the entire + struct + - savefile: use little-endian format for fields where that makes a difference - + - - - - - - - - - - - Please read items (1), (2) and (3) BEFORE doing anything with your new code. diff --cc doc/Guidebook.mn index b88d35d46,bad63a86a..4cd2b1476 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@@ -1,7 -1,7 +1,7 @@@ - .\" $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.372 $ $NHDT-Date: 1581817474 2020/02/16 01:44:34 $ -.\" $NHDT-Branch: NetHack-3.6-Mar2020 $:$NHDT-Revision: 1.347 $ $NHDT-Date: 1583508684 2020/03/06 15:31:24 $ ++.\" $NHDT-Branch: NetHack-3.7-Mar2020 $:$NHDT-Revision: 1.347 $ $NHDT-Date: 1583508684 2020/03/06 15:31:24 $ .\" .\" This is an excerpt from the 'roff' man page from the 'groff' package. -.\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines. +.\" Guidebook.mn currently does *not* fully adhere to these guidelines. .\"||| .\"| o Never include empty or blank lines in a roff document. Instead, use .\"| the empty request (a line consisting of a dot only) or a line comment @@@ -32,10 -21,10 +32,10 @@@ .ds h0 "NetHack Guidebook .ds h1 .ds h2 % -.ds vr "NetHack 3.6 +.ds vr "NetHack 3.7 .ds f0 "\*(vr .ds f1 - .ds f2 "February 17, 2020 + .ds f2 "March 8, 2020 . .\" A note on some special characters: .\" \(lq = left double quote diff --cc doc/Guidebook.tex index c3aa22c94,c34f6fa80..b73452961 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@@ -44,8 -44,8 +44,8 @@@ %.au \author{Original version - Eric S. Raymond\\ -(Edited and expanded for 3.6 by Mike Stephenson and others)} +(Edited and expanded for 3.7 by Mike Stephenson and others)} - \date{February 17, 2020} + \date{March 8, 2020} \maketitle diff --cc doc/Guidebook.txt index 58615d912,7a9234dbe..12ba25c1e --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@@ -13,9 -13,9 +13,9 @@@ Original version - Eric S. Raymond - (Edited and expanded for 3.6 by Mike Stephenson and others) + (Edited and expanded for 3.7 by Mike Stephenson and others) - February 17, 2020 + March 4, 2020 @@@ -6418,10 -6062,22 +6421,10 @@@ - - - - - - - - - - - From time to time, some depraved individual out there in - netland sends a particularly intriguing modification to help out + From time to time, some depraved individual out there in + netland sends a particularly intriguing modification to help out - - - NetHack 3.6 March 4, 2020 - - - - - - NetHack Guidebook 93 - - - with the game. The NetHack Development Team sometimes makes note - of the names of the worst of these miscreants in this, the list + of the names of the worst of these miscreants in this, the list of Dungeoneers: Adam Aronow J. Ali Harlow Mikko Juola Alex Kompel Janet Walz Nathan Eady @@@ -6493,42 -6136,3 +6496,40 @@@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NetHack 3.7 February 17, 2020 + - - diff --cc src/rumors.c index 9a37dd220,ac82b44fe..73ec5f4c0 --- a/src/rumors.c +++ b/src/rumors.c @@@ -1,4 -1,4 +1,4 @@@ - /* NetHack 3.6 rumors.c $NHDT-Date: 1582364450 2020/02/22 09:40:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.51 $ */ -/* NetHack 3.6 rumors.c $NHDT-Date: 1583445339 2020/03/05 21:55:39 $ $NHDT-Branch: NetHack-3.6-Mar2020 $:$NHDT-Revision: 1.38 $ */ ++/* NetHack 3.7 rumors.c $NHDT-Date: 1583445339 2020/03/05 21:55:39 $ $NHDT-Branch: NetHack-3.6-Mar2020 $:$NHDT-Revision: 1.38 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@@ -145,11 -157,12 +145,12 @@@ boolean exclude_cookie exercise(A_WIS, (adjtruth > 0)); } else { couldnt_open_file(RUMORFILE); - true_rumor_size = -1; /* don't try to open it again */ + g.true_rumor_size = -1; /* don't try to open it again */ } - /* this is safe either way, so do it always since we can't get the definition - * out of makedefs.c - */ + + /* this is safe either way, so do it always since we can't get the + * definition out of makedefs.c + */ #define PAD_RUMORS_TO #ifdef PAD_RUMORS_TO /* remove padding */ @@@ -175,11 -188,9 +176,9 @@@ rumor_check( winid tmpwin; char *endp, line[BUFSZ], xbuf[BUFSZ], rumor_buf[BUFSZ]; - if (true_rumor_size < 0L) { /* we couldn't open RUMORFILE */ + if (g.true_rumor_size < 0L) { /* we couldn't open RUMORFILE */ - no_rumors: + no_rumors: pline("rumors not accessible."); - if (rumors) - (void) dlb_fclose(rumors); return; } @@@ -189,31 -200,29 +188,29 @@@ long ftell_rumor_start = 0L; rumor_buf[0] = '\0'; - if (true_rumor_size == 0L) { /* if this is 1st outrumor() */ + if (g.true_rumor_size == 0L) { /* if this is 1st outrumor() */ init_rumors(rumors); - if (true_rumor_size < 0L) { + if (g.true_rumor_size < 0L) + rumors = (dlb *) 0; /* init_rumors() closes it upon failure */ goto no_rumors; /* init failed */ + } } tmpwin = create_nhwindow(NHW_TEXT); /* * reveal the values. */ - - Sprintf( - rumor_buf, - "T start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)", - (long) g.true_rumor_start, g.true_rumor_start, g.true_rumor_end, - (unsigned long) g.true_rumor_end, g.true_rumor_size, - (unsigned long) g.true_rumor_size); + Sprintf(rumor_buf, + "T start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)", - (long) true_rumor_start, true_rumor_start, - true_rumor_end, (unsigned long) true_rumor_end, - true_rumor_size, (unsigned long) true_rumor_size); ++ (long) g.true_rumor_start, g.true_rumor_start, ++ g.true_rumor_end, (unsigned long) g.true_rumor_end, ++ g.true_rumor_size,(unsigned long) g.true_rumor_size); putstr(tmpwin, 0, rumor_buf); - - Sprintf( - rumor_buf, - "F start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)", - (long) g.false_rumor_start, g.false_rumor_start, g.false_rumor_end, - (unsigned long) g.false_rumor_end, g.false_rumor_size, - (unsigned long) g.false_rumor_size); + Sprintf(rumor_buf, + "F start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)", - (long) false_rumor_start, false_rumor_start, - false_rumor_end, (unsigned long) false_rumor_end, - false_rumor_size, (unsigned long) false_rumor_size); ++ (long) g.false_rumor_start, g.false_rumor_start, ++ g.false_rumor_end,(unsigned long) g.false_rumor_end, ++ g.false_rumor_size,(unsigned long) g.false_rumor_size); putstr(tmpwin, 0, rumor_buf); /*