Merge branch 'NetHack-3.6'
This commit is contained in:
+13
-3
@@ -8,7 +8,17 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define BETA /* development or beta testing [MRS] */
|
/*
|
||||||
|
* Development status possibilities.
|
||||||
|
*/
|
||||||
|
#define NH_STATUS_RELEASED 0 /* Released */
|
||||||
|
#define NH_STATUS_WIP 1 /* Work in progress */
|
||||||
|
#define NH_STATUS_BETA 2 /* BETA testing */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Development status of this NetHack version.
|
||||||
|
*/
|
||||||
|
#define NH_DEVEL_STATUS NH_STATUS_WIP
|
||||||
|
|
||||||
#ifndef DEBUG /* allow tool chains to define without causing warnings */
|
#ifndef DEBUG /* allow tool chains to define without causing warnings */
|
||||||
#define DEBUG
|
#define DEBUG
|
||||||
@@ -339,9 +349,9 @@ struct savefile_info {
|
|||||||
#define MAXMONNO 120 /* extinct monst after this number created */
|
#define MAXMONNO 120 /* extinct monst after this number created */
|
||||||
#define MHPMAX 500 /* maximum monster hp */
|
#define MHPMAX 500 /* maximum monster hp */
|
||||||
|
|
||||||
/* PANICTRACE: Always defined for BETA but only for supported platforms. */
|
/* PANICTRACE: Always defined for NH_DEVEL_STATUS == NH_STATUS_BETA but only for supported platforms. */
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
/* see end.c */
|
/* see end.c */
|
||||||
#ifndef PANICTRACE
|
#ifndef PANICTRACE
|
||||||
#define PANICTRACE
|
#define PANICTRACE
|
||||||
|
|||||||
@@ -569,11 +569,11 @@ extcmd_via_menu()
|
|||||||
if ((len = (int) strlen(efp->ef_desc)) > biggest)
|
if ((len = (int) strlen(efp->ef_desc)) > biggest)
|
||||||
biggest = len;
|
biggest = len;
|
||||||
if (++i > MAX_EXT_CMD) {
|
if (++i > MAX_EXT_CMD) {
|
||||||
#if defined(BETA)
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
impossible(
|
impossible(
|
||||||
"Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.",
|
"Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.",
|
||||||
MAX_EXT_CMD);
|
MAX_EXT_CMD);
|
||||||
#endif /* BETA */
|
#endif /* NH_DEVEL_STATUS != NH_STATUS_RELEASED */
|
||||||
iflags.extmenu = 0;
|
iflags.extmenu = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -647,7 +647,7 @@ extcmd_via_menu()
|
|||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
if (matchlevel > (QBUFSZ - 2)) {
|
if (matchlevel > (QBUFSZ - 2)) {
|
||||||
free((genericptr_t) pick_list);
|
free((genericptr_t) pick_list);
|
||||||
#if defined(BETA)
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
impossible("Too many chars (%d) entered in extcmd_via_menu()",
|
impossible("Too many chars (%d) entered in extcmd_via_menu()",
|
||||||
matchlevel);
|
matchlevel);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -467,7 +467,8 @@ long nmv; /* number of moves */
|
|||||||
{
|
{
|
||||||
int imv = 0; /* avoid zillions of casts and lint warnings */
|
int imv = 0; /* avoid zillions of casts and lint warnings */
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(BETA)
|
#if defined(DEBUG) || (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
|
|
||||||
if (nmv < 0L) { /* crash likely... */
|
if (nmv < 0L) { /* crash likely... */
|
||||||
panic("catchup from future time?");
|
panic("catchup from future time?");
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
|
|||||||
+2
-2
@@ -2476,7 +2476,7 @@ STATIC_OVL void
|
|||||||
sanity_check_worn(obj)
|
sanity_check_worn(obj)
|
||||||
struct obj *obj;
|
struct obj *obj;
|
||||||
{
|
{
|
||||||
#if defined(BETA) || defined(DEBUG)
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || defined(DEBUG)
|
||||||
static unsigned long wearbits[] = {
|
static unsigned long wearbits[] = {
|
||||||
W_ARM, W_ARMC, W_ARMH, W_ARMS, W_ARMG, W_ARMF, W_ARMU,
|
W_ARM, W_ARMC, W_ARMH, W_ARMS, W_ARMG, W_ARMF, W_ARMU,
|
||||||
W_WEP, W_QUIVER, W_SWAPWEP, W_AMUL, W_RINGL, W_RINGR, W_TOOL,
|
W_WEP, W_QUIVER, W_SWAPWEP, W_AMUL, W_RINGL, W_RINGR, W_TOOL,
|
||||||
@@ -2659,7 +2659,7 @@ struct obj *obj;
|
|||||||
insane_object(obj, ofmt0, maskbuf, mon);
|
insane_object(obj, ofmt0, maskbuf, mon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /* not (BETA || DEBUG) */
|
#else /* not (NH_DEVEL_STATUS != NH_STATUS_RELEASED) || DEBUG) */
|
||||||
/* dummy use of obj to avoid "arg not used" complaint */
|
/* dummy use of obj to avoid "arg not used" complaint */
|
||||||
if (!obj)
|
if (!obj)
|
||||||
insane_object(obj, ofmt0, "<null>", (struct monst *) 0);
|
insane_object(obj, ofmt0, "<null>", (struct monst *) 0);
|
||||||
|
|||||||
+1
-1
@@ -556,7 +556,7 @@ int how;
|
|||||||
if (qt_msg->summary_size) {
|
if (qt_msg->summary_size) {
|
||||||
(void) dlb_fgets(in_line, sizeof in_line, g.msg_file);
|
(void) dlb_fgets(in_line, sizeof in_line, g.msg_file);
|
||||||
convert_line(in_line, out_line);
|
convert_line(in_line, out_line);
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
} else if (qt_msg->delivery == 'c') { /* skip for 'qtdump' of 'p' */
|
} else if (qt_msg->delivery == 'c') { /* skip for 'qtdump' of 'p' */
|
||||||
/* delivery 'c' and !summary_size, summary expected but not present;
|
/* delivery 'c' and !summary_size, summary expected but not present;
|
||||||
this doesn't prefix the number with role code vs 'general'
|
this doesn't prefix the number with role code vs 'general'
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ int
|
|||||||
rn2(x)
|
rn2(x)
|
||||||
register int x;
|
register int x;
|
||||||
{
|
{
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
impossible("rn2(%d) attempted", x);
|
impossible("rn2(%d) attempted", x);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -121,7 +121,7 @@ register int x;
|
|||||||
{
|
{
|
||||||
register int i, adjustment;
|
register int i, adjustment;
|
||||||
|
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
impossible("rnl(%d) attempted", x);
|
impossible("rnl(%d) attempted", x);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -163,7 +163,7 @@ int
|
|||||||
rnd(x)
|
rnd(x)
|
||||||
register int x;
|
register int x;
|
||||||
{
|
{
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
impossible("rnd(%d) attempted", x);
|
impossible("rnd(%d) attempted", x);
|
||||||
return 1;
|
return 1;
|
||||||
@@ -180,7 +180,7 @@ register int n, x;
|
|||||||
{
|
{
|
||||||
register int tmp = n;
|
register int tmp = n;
|
||||||
|
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
if (x < 0 || n < 0 || (x == 0 && n != 0)) {
|
if (x < 0 || n < 0 || (x == 0 && n != 0)) {
|
||||||
impossible("d(%d,%d) attempted", n, x);
|
impossible("d(%d,%d) attempted", n, x);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ sys_early_init()
|
|||||||
/* panic options */
|
/* panic options */
|
||||||
sysopt.gdbpath = dupstr(GDBPATH);
|
sysopt.gdbpath = dupstr(GDBPATH);
|
||||||
sysopt.greppath = dupstr(GREPPATH);
|
sysopt.greppath = dupstr(GREPPATH);
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
sysopt.panictrace_gdb = 1;
|
sysopt.panictrace_gdb = 1;
|
||||||
#ifdef PANICTRACE_LIBC
|
#ifdef PANICTRACE_LIBC
|
||||||
sysopt.panictrace_libc = 2;
|
sysopt.panictrace_libc = 2;
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@ char *buf;
|
|||||||
Sprintf(eos(buf), "%s%s", c++ ? "," : "", NetHack_git_sha);
|
Sprintf(eos(buf), "%s%s", c++ ? "," : "", NetHack_git_sha);
|
||||||
#endif
|
#endif
|
||||||
#if defined(NETHACK_GIT_BRANCH)
|
#if defined(NETHACK_GIT_BRANCH)
|
||||||
#if defined(BETA)
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
if (NetHack_git_branch)
|
if (NetHack_git_branch)
|
||||||
Sprintf(eos(buf), "%sbranch:%s",
|
Sprintf(eos(buf), "%sbranch:%s",
|
||||||
c++ ? "," : "", NetHack_git_branch);
|
c++ ? "," : "", NetHack_git_branch);
|
||||||
|
|||||||
+1
-1
@@ -210,7 +210,7 @@ const char *path, *files;
|
|||||||
BPTR dirLock, dirLock2;
|
BPTR dirLock, dirLock2;
|
||||||
struct FileInfoBlock *fibp;
|
struct FileInfoBlock *fibp;
|
||||||
int chklen;
|
int chklen;
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
if(files != g.alllevels)panic("eraseall");
|
if(files != g.alllevels)panic("eraseall");
|
||||||
#endif
|
#endif
|
||||||
chklen=(int)index(files,'*')-(int)files;
|
chklen=(int)index(files,'*')-(int)files;
|
||||||
|
|||||||
+2
-1
@@ -110,7 +110,8 @@ MAXPLAYERS=10
|
|||||||
|
|
||||||
# Try to get more info in case of a program bug or crash. Only used
|
# Try to get more info in case of a program bug or crash. Only used
|
||||||
# if the program is built with the PANICTRACE compile-time option enabled.
|
# if the program is built with the PANICTRACE compile-time option enabled.
|
||||||
# By default PANICTRACE is enabled if BETA is defined, otherwise disabled.
|
# By default PANICTRACE is enabled if (NH_DEVEL_STATUS != NH_STATUS_RELEASED),
|
||||||
|
# otherwise disabled.
|
||||||
# Using GDB can get more information and works on more systems but requires
|
# Using GDB can get more information and works on more systems but requires
|
||||||
# 'gdb' be available; using LIBC only works if NetHack is linked with a
|
# 'gdb' be available; using LIBC only works if NetHack is linked with a
|
||||||
# libc that supports the backtrace(3) API. Both require certain compilation
|
# libc that supports the backtrace(3) API. Both require certain compilation
|
||||||
|
|||||||
+2
-1
@@ -71,7 +71,8 @@
|
|||||||
|
|
||||||
# Try to get more info in case of a program bug or crash. Only used
|
# Try to get more info in case of a program bug or crash. Only used
|
||||||
# if the program is built with the PANICTRACE compile-time option enabled.
|
# if the program is built with the PANICTRACE compile-time option enabled.
|
||||||
# By default PANICTRACE is enabled if BETA is defined, otherwise disabled.
|
# By default PANICTRACE is enabled if (NH_DEVEL_STATUS != NH_STATUS_RELEASED),
|
||||||
|
# otherwise disabled.
|
||||||
# (GDBPATH, GREPPATH, and PANICTRACE_LIBC aren't used on VMS.
|
# (GDBPATH, GREPPATH, and PANICTRACE_LIBC aren't used on VMS.
|
||||||
# PANICTRACE_GDB is repurposed, with nothing to do with 'gdb'.
|
# PANICTRACE_GDB is repurposed, with nothing to do with 'gdb'.
|
||||||
# Values are 1: show traceback and exit, 2: show traceback and
|
# Values are 1: show traceback and exit, 2: show traceback and
|
||||||
|
|||||||
+1
-1
@@ -415,7 +415,7 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */
|
|||||||
|| (condition >= SS$_ASTFLT && condition <= SS$_TBIT)
|
|| (condition >= SS$_ASTFLT && condition <= SS$_TBIT)
|
||||||
|| (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) {
|
|| (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) {
|
||||||
g.program_state.done_hup = TRUE; /* pretend hangup has been attempted */
|
g.program_state.done_hup = TRUE; /* pretend hangup has been attempted */
|
||||||
#ifndef BETA
|
#if (NH_DEVEL_STATUS == NH_STATUS_RELEASED)
|
||||||
if (wizard)
|
if (wizard)
|
||||||
#endif
|
#endif
|
||||||
abort(); /* enter the debugger */
|
abort(); /* enter the debugger */
|
||||||
|
|||||||
+16
-4
@@ -1169,7 +1169,7 @@ const char *delim;
|
|||||||
{
|
{
|
||||||
Sprintf(outbuf, "%d%s%d%s%d", VERSION_MAJOR, delim, VERSION_MINOR, delim,
|
Sprintf(outbuf, "%d%s%d%s%d", VERSION_MAJOR, delim, VERSION_MINOR, delim,
|
||||||
PATCHLEVEL);
|
PATCHLEVEL);
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
Sprintf(eos(outbuf), "-%d", EDITLEVEL);
|
Sprintf(eos(outbuf), "-%d", EDITLEVEL);
|
||||||
#endif
|
#endif
|
||||||
return outbuf;
|
return outbuf;
|
||||||
@@ -1183,8 +1183,12 @@ const char *build_date;
|
|||||||
char subbuf[64], versbuf[64];
|
char subbuf[64], versbuf[64];
|
||||||
char betabuf[64];
|
char betabuf[64];
|
||||||
|
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
|
#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
|
||||||
Strcpy(betabuf, " Beta");
|
Strcpy(betabuf, " Beta");
|
||||||
|
#else
|
||||||
|
Strcpy(betabuf, " Work-in-progress");
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
betabuf[0] = '\0';
|
betabuf[0] = '\0';
|
||||||
#endif
|
#endif
|
||||||
@@ -1213,8 +1217,12 @@ const char *build_date;
|
|||||||
subbuf[0] = ' ';
|
subbuf[0] = ' ';
|
||||||
Strcpy(&subbuf[1], PORT_SUB_ID);
|
Strcpy(&subbuf[1], PORT_SUB_ID);
|
||||||
#endif
|
#endif
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
|
#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
|
||||||
Strcat(subbuf, " Beta");
|
Strcat(subbuf, " Beta");
|
||||||
|
#else
|
||||||
|
Strcat(subbuf, " Work-in-progress");
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Sprintf(outbuf, " Version %s %s%s, %s %s.",
|
Sprintf(outbuf, " Version %s %s%s, %s %s.",
|
||||||
@@ -1800,8 +1808,12 @@ do_options()
|
|||||||
Fprintf(ofp, "\n%sNetHack version %d.%d.%d%s\n",
|
Fprintf(ofp, "\n%sNetHack version %d.%d.%d%s\n",
|
||||||
opt_indent,
|
opt_indent,
|
||||||
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL,
|
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL,
|
||||||
#ifdef BETA
|
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
|
||||||
|
#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
|
||||||
" [beta]"
|
" [beta]"
|
||||||
|
#else
|
||||||
|
" [work-in-progress]"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
""
|
""
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user