diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 19e95bd3a..6d4fa18a3 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1,4 +1,4 @@ -HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.892 $ $NHDT-Date: 1650963745 2022/04/26 09:02:25 $ +HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.902 $ $NHDT-Date: 1651297020 2022/04/30 05:37:00 $ General Fixes and Modified Features ----------------------------------- @@ -901,10 +901,15 @@ for force-fight against edge of level, report "you harmlessly attack unknown using wizard mode ^V in endgame to return to previously visited Plane of Water now gets the same air bubbles back instead of a replacement set; likewise for clouds on Plane of Air +on tty at least, "version incompatibility for save/123xyzzy" was invisible: + a blank message of appropriate length followed by --More-- Fixes to 3.7.0-x Problems that Were Exposed Via git Repository ------------------------------------------------------------------ +incrementing EDITLEVEL to invalidate incompatible save files was not working + as intended because VERSION_COMPABILITY was defined as 3.7.0-0 and up + rather than as 3.7.0-N for the current EDITLEVEL 'N'; undefine it fix compile when DLB isn't defined urealtime.realtime was being incorrectly calculated revised "mysterious force" when climbing out of gehennom could generate diff --git a/include/patchlevel.h b/include/patchlevel.h index e3e623000..b2d7b54fb 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 patchlevel.h $NHDT-Date: 1646870832 2022/03/10 00:07:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.202 $ */ +/* NetHack 3.7 patchlevel.h $NHDT-Date: 1651297020 2022/04/30 05:37:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.207 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -17,7 +17,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 56 +#define EDITLEVEL 57 /* * Development status possibilities. @@ -51,8 +51,15 @@ * 0x = literal prefix "0x", MM = major version, mm = minor version, * PP = patch level, ee = edit level, L = literal suffix "L", * with all four numbers specified as two hexadecimal digits. + * + * When developing a new version, VERSION_COMPATIBILITY should be + * commented out so that increments of EDITLEVEL can be used to forcibly + * invalidate existing save files whenever incompatible changes are made + * to saved data. [Bones files should be less sensitive (only changes + * to individual level files matter; changes to general game state don't) + * but the extra complexity to support that is not worth the effort.] */ -#define VERSION_COMPATIBILITY 0x03070000L +/*#define VERSION_COMPATIBILITY 0x03070000L*/ /****************************************************************************/ /* Version 3.7.x */ diff --git a/src/version.c b/src/version.c index 5edf0e376..1cbbaf4da 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 version.c $NHDT-Date: 1596498224 2020/08/03 23:43:44 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.74 $ */ +/* NetHack 3.7 version.c $NHDT-Date: 1651297024 2022/04/30 05:37:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.88 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -299,8 +299,10 @@ check_version(struct version_info *version_data, const char *filename, version_data->incarnation != nomakedefs.version_number #endif ) { - if (complain) + if (complain) { pline("Version mismatch for file \"%s\".", filename); + display_nhwindow(WIN_MESSAGE, TRUE); + } return FALSE; } else if ( #ifndef IGNORED_FEATURES @@ -315,8 +317,10 @@ check_version(struct version_info *version_data, const char *filename, && version_data->struct_sizes1 != nomakedefs.version_sanity2) || ((utdflags & UTD_CHECKSIZES) != 0 && version_data->struct_sizes2 != nomakedefs.version_sanity3)) { - if (complain) + if (complain) { pline("Configuration incompatibility for file \"%s\".", filename); + display_nhwindow(WIN_MESSAGE, TRUE); + } return FALSE; } return TRUE;