Merge branch 'NetHack-3.6.0'

Conflicts:
	doc/fixes36.1

	- resolved
This commit is contained in:
nhmall
2015-12-10 13:13:23 -05:00
11 changed files with 85 additions and 29 deletions

View File

@@ -145,9 +145,9 @@ contributed a Windows CE port for 3.4.1.
Ron Van Iwaarden maintained 3.4 for OS/2.
Janne Salmijarvi and Teemu Suikki maintained and enhanced the
Amiga port of 3.5 after Janne Salmijarvi resurrected it for 3.3.1.
Amiga port of 3.4 after Janne Salmijarvi resurrected it for 3.3.1.
Christian `Marvin' Bressler maintained 3.5 for the Atari after he
Christian `Marvin' Bressler maintained 3.4 for the Atari after he
resurrected it for 3.3.1.
The release of NetHack 3.4.3 in December 2003 marked the beginning of a

View File

@@ -3781,7 +3781,7 @@ A list of users who are allowed to use the explore mode.
The syntax is the same as WIZARDS.
%.lp
\item[\ib{MAXPLAYERS}]
Limit the maximum number of games taht can be running at the same time.
Limit the maximum number of games that can be running at the same time.
%.lp
\item[\ib{SUPPORT}]
A string explainign how to get local support (no default value).

View File

@@ -1185,6 +1185,7 @@ win32gui: added menu options "Copy ASCII Screenshot To Clipboard" and "Save
win32gui, win32tty: add support for looking for sysconf in %COMMONPROGRAMFILES%
first and for user config file in %USERPROFILE% (improves support for
multi-login Windows environments)
win32gui: missing sys_early_init() call could result in "rnd(0) attempted"
win32tty: support for 'selectsaved' option for menu of existing save files
to choose from at game startup
tty: add window port routines for saving/restoring message history

View File

@@ -2,10 +2,25 @@ $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$
General Fixes and Modified Features
-----------------------------------
doc/*.6 man pages and corresponding doc/*.txt text copies were out of date
data.base entry for "lava" had wrong first name for Don Woods' attribution
cursed genocide of "none" sent in monsters, but "that's enough tries" didn't
update MAXPLAYERS documentation in sysconf file and allow 0 for it
wizard mode: don't include feedback about named fruit for ^X and enlightenment
looking at distant objects while wearing the Eyes of the Overworld made their
up-close descriptions known when not intended
Platform- and/or Interface-Specific Fixes
-----------------------------------------
unix/X11: in top level Makefile, some commented out definitions of VARDATND
misspelled pilemark.xbm (as pilemark.xpm)
win32gui: getversionstring() was overflowing the provided Help About buffer
win32gui: guard against buffer overflow in in mswin_getlin()
MacOSX: initial binary release was built from out of date source code that
had 'BETA' and 'DEBUG' inappropriately enabled
X11: core bug for '`' (backtick) command was only noticed by X11 interface,
which issued impossible message "add_menu: called before start_menu"
General New Features

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1446975462 2015/11/08 09:37:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.206 $ */
/* NetHack 3.6 cmd.c $NHDT-Date: 1449736557 2015/12/10 08:35:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.208 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2245,8 +2245,10 @@ int final;
}
}
/* named fruit debugging (doesn't really belong here...) */
if (wizard) {
#ifdef DEBUG
/* named fruit debugging (doesn't really belong here...); to enable,
include 'fruit' in DEBUGFILES list (even though it isn't a file...) */
if (wizard && explicitdebug("fruit")) {
int fcount = 0;
struct fruit *f;
char buf2[BUFSZ];
@@ -2260,6 +2262,7 @@ int final;
Sprintf(buf, "%d", flags.made_fruit);
enl_msg("The made fruit flag ", "is ", "was ", buf, "");
}
#endif
{
const char *p;

View File

@@ -2279,7 +2279,7 @@ int src;
} else if (src == SET_IN_SYS && match_varname(buf, "MAXPLAYERS", 10)) {
n = atoi(bufp);
/* XXX to get more than 25, need to rewrite all lock code */
if (n < 1 || n > 25) {
if (n < 0 || n > 25) {
raw_printf("Illegal value in MAXPLAYERS (maximum is 25).");
return 0;
}

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objnam.c $NHDT-Date: 1447490776 2015/11/14 08:46:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.154 $ */
/* NetHack 3.6 objnam.c $NHDT-Date: 1449740045 2015/12/10 09:34:05 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.155 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -197,12 +197,13 @@ struct obj *obj;
return TRUE;
}
/* used by distant_name() to pass extra information to xname_flags();
it would be much cleaner if this were a parameter, but that would
require all of the xname() and doname() calls to be modified */
static int distantname = 0;
/* Give the name of an object seen at a distance. Unlike xname/doname,
* we don't want to set dknown if it's not set already. The kludge used is
* to temporarily set Blind so that xname() skips the dknown setting. This
* assumes that we don't want to do this too often; if this function becomes
* frequently used, it'd probably be better to pass a parameter to xname()
* or doname() instead.
* we don't want to set dknown if it's not set already.
*/
char *
distant_name(obj, func)
@@ -211,10 +212,17 @@ char *FDECL((*func), (OBJ_P));
{
char *str;
long save_Blinded = Blinded;
Blinded = 1;
/* 3.6.1: this used to save Blind, set it, make the call, then restore
* the saved value; but the Eyes of the Overworld override blindness
* and let characters wearing them get dknown set for distant items.
*
* TODO? if the hero is wearing those Eyes, figure out whether the
* object is within X-ray radius and only treat it as distant when
* beyond that radius. Logic is iffy but result might be interesting.
*/
++distantname;
str = (*func)(obj);
Blinded = save_Blinded;
--distantname;
return str;
}
@@ -271,7 +279,7 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
*/
if (!nn && ocl->oc_uses_known && ocl->oc_unique)
obj->known = 0;
if (!Blind)
if (!Blind && !distantname)
obj->dknown = TRUE;
if (Role_if(PM_PRIEST))
obj->bknown = TRUE;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 zap.c $NHDT-Date: 1447987787 2015/11/20 02:49:47 $ $NHDT-Branch: master $:$NHDT-Revision: 1.236 $ */
/* NetHack 3.6 zap.c $NHDT-Date: 1449669396 2015/12/09 13:56:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.238 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -758,15 +758,22 @@ boolean by_hero;
if (costly_spot(x, y))
shkp = shop_keeper(*in_rooms(x, y, SHOPBASE));
if (cansee(x, y))
pline(
"%s glows iridescently.",
upstart(corpse_xname(corpse, (const char *) 0, CXN_PFX_THE)));
else if (shkp)
if (cansee(x, y)) {
char buf[BUFSZ];
unsigned pfx = CXN_PFX_THE;
Strcpy(buf, (corpse->quan > 1L) ? "one of " : "");
if (carried(corpse) && !corpse->unpaid) {
Strcat(buf, "your ");
pfx = CXN_NO_PFX;
}
Strcat(buf, corpse_xname(corpse, (const char *) 0, pfx));
pline("%s glows iridescently.", upstart(buf));
} else if (shkp) {
/* need some prior description of the corpse since
stolen_value() will refer to the object as "it" */
pline("A corpse is resuscitated.");
}
/* don't charge for shopkeeper's own corpse if we just revived him */
if (shkp && mtmp != shkp)
(void) stolen_value(corpse, x, y, (boolean) shkp->mpeaceful,

View File

@@ -31,6 +31,12 @@ EXPLORERS=*
#SHELLERS=
# Limit the number of simultaneous games (see also nethack.sh).
# Valid values are 0-25.
# Commenting this out or setting the value to 0 constructs lock files
# with UID and playername, so each user may have one game at a time,
# but number of different players is not limited.
# Setting this to any other value constructs the lock files with
# letter and "lock" (eg. alock, block, ...)
MAXPLAYERS=10
# If not null, added to string "To get local support, " in the support

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mhsplash.c $NHDT-Date: 1432512813 2015/05/25 00:13:33 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ */
/* NetHack 3.6 mhsplash.c $NHDT-Date: 1449751714 2015/12/10 12:48:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
@@ -94,11 +94,24 @@ mswin_display_splash_window(BOOL show_ver)
if (show_ver) {
/* Show complete version information */
dlb *f;
char verbuf[BUFSZ];
int verstrsize = 0;
getversionstring(verbuf);
verstrsize = strlen(verbuf);
if (verstrsize + strlen("\r\n\r\n") + 1 < BUFSZ - 1)
strcat(verbuf, "\r\n\r\n");
verstrsize = strlen(verbuf);
getversionstring(buf + strsize);
strcat(buf, "\r\n\r\n");
if (strsize + verstrsize + 1 > bufsize) {
bufsize += BUFSZ;
buf = realloc(buf, bufsize);
if (buf == NULL)
panic("out of memory");
}
strcat(buf, verbuf);
strsize = strlen(buf);
/* Add compile options */
f = dlb_fopen(OPTIONS_USED, RDTMODE);
if (f) {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mswproc.c $NHDT-Date: 1449116670 2015/12/03 04:24:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.94 $ */
/* NetHack 3.6 mswproc.c $NHDT-Date: 1449751720 2015/12/10 12:48:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.95 $ */
/* Copyright (C) 2001 by Alex Kompel */
/* NetHack may be freely redistributed. See license for details. */
@@ -12,6 +12,7 @@
#include "func_tab.h" /* for extended commands */
#include "winMS.h"
#include <assert.h>
#include <mmsystem.h>
#include "mhmap.h"
#include "mhstatus.h"
#include "mhtext.h"
@@ -1640,6 +1641,8 @@ mswin_getlin(const char *question, char *input)
if (len > 0)
len--;
input[len] = '\0';
} else if (len>=(BUFSZ-1)) {
PlaySound((LPCSTR)SND_ALIAS_SYSTEMEXCLAMATION, NULL, SND_ALIAS_ID|SND_ASYNC);
} else {
input[len++] = c;
input[len] = '\0';