Merge branch 'NetHack-3.7' into fix322

This commit is contained in:
Michael Meyer
2020-12-30 14:05:16 -05:00
712 changed files with 36133 additions and 17024 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 align.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 align.h $NHDT-Date: 1604269810 2020/11/01 22:30:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) Mike Stephenson, Izchak Miller 1991. */
/* NetHack may be freely redistributed. See license for details. */
@@ -30,15 +30,30 @@ typedef struct align { /* alignment & record */
#define AM_LAWFUL 4
#define AM_MASK 7
/* Some altars are considered as shrines, so we need a flag for that
for the altarmask field of struct rm. */
#define AM_SHRINE 8
#define AM_SPLEV_CO 3
#define AM_SPLEV_NONCO 7
/* special level flags, gone by the time the level has been loaded */
#define AM_SPLEV_CO 3 /* co-aligned: force alignment to match hero's */
#define AM_SPLEV_NONCO 7 /* non-co-aligned: force alignment to not match */
#define AM_SPLEV_RANDOM 8
#define Amask2align(x) \
((aligntyp)((!(x)) ? A_NONE : ((x) == AM_LAWFUL) ? A_LAWFUL \
: ((int) x) - 2))
#define Amask2align(x) \
((aligntyp) ((((x) & AM_MASK) == 0) ? A_NONE \
: (((x) & AM_MASK) == AM_LAWFUL) ? A_LAWFUL \
: ((int) ((x) & AM_MASK)) - 2)) /* 2 => 0, 1 => -1 */
#define Align2amask(x) \
(((x) == A_NONE) ? AM_NONE : ((x) == A_LAWFUL) ? AM_LAWFUL : (x) + 2)
((unsigned) (((x) == A_NONE) ? AM_NONE \
: ((x) == A_LAWFUL) ? AM_LAWFUL \
: ((x) + 2))) /* -1 => 1, 0 => 2 */
/* Because clearly Nethack needs more ways to specify alignment...
Amask2msa(): 1, 2, 4 converted to 1, 2, 3 to fit within a width 2 bitfield;
Msa2amask(): 1, 2, 3 converted back to 1, 2, 4;
For Amask2msa(), 'x' might have the shrine bit set so strip that off. */
#define Amask2msa(x) ((((x) & AM_MASK) == 4) ? 3 : (x) & AM_MASK)
#define Msa2amask(x) (((x) == 3) ? 4 : (x))
#define MSA_NONE 0 /* unaligned or multiple alignments */
#endif /* ALIGN_H */

View File

@@ -1,43 +1,40 @@
/* NetHack 3.6 artifact.h $NHDT-Date: 1433050871 2015/05/31 05:41:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
/* NetHack 3.7 artifact.h $NHDT-Date: 1602692711 2020/10/14 16:25:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef ARTIFACT_H
#define ARTIFACT_H
/* clang-format off */
#define SPFX_NONE 0x00000000L /* no special effects, just a bonus */
#define SPFX_NOGEN 0x00000001L /* item is special, bequeathed by gods */
#define SPFX_RESTR 0x00000002L /* item is restricted - can't be named */
#define SPFX_INTEL 0x00000004L /* item is self-willed - intelligent */
#define SPFX_SPEAK 0x00000008L /* item can speak (not implemented) */
#define SPFX_SEEK 0x00000010L /* item helps you search for things */
#define SPFX_WARN 0x00000020L /* item warns you of danger */
#define SPFX_ATTK 0x00000040L /* item has a special attack (attk) */
#define SPFX_DEFN 0x00000080L /* item has a special defence (defn) */
#define SPFX_DRLI 0x00000100L /* drains a level from monsters */
#define SPFX_NONE 0x00000000L /* no special effects, just a bonus */
#define SPFX_NOGEN 0x00000001L /* item is special, bequeathed by gods */
#define SPFX_RESTR 0x00000002L /* item is restricted - can't be named */
#define SPFX_INTEL 0x00000004L /* item is self-willed - intelligent */
#define SPFX_SPEAK 0x00000008L /* item can speak (not implemented) */
#define SPFX_SEEK 0x00000010L /* item helps you search for things */
#define SPFX_WARN 0x00000020L /* item warns you of danger */
#define SPFX_ATTK 0x00000040L /* item has a special attack (attk) */
#define SPFX_DEFN 0x00000080L /* item has a special defence (defn) */
#define SPFX_DRLI 0x00000100L /* drains a level from monsters */
#define SPFX_SEARCH 0x00000200L /* helps searching */
#define SPFX_BEHEAD 0x00000400L /* beheads monsters */
#define SPFX_HALRES 0x00000800L /* blocks hallucinations */
#define SPFX_ESP 0x00001000L /* ESP (like amulet of ESP) */
#define SPFX_STLTH 0x00002000L /* Stealth */
#define SPFX_REGEN 0x00004000L /* Regeneration */
#define SPFX_ESP 0x00001000L /* ESP (like amulet of ESP) */
#define SPFX_STLTH 0x00002000L /* Stealth */
#define SPFX_REGEN 0x00004000L /* Regeneration */
#define SPFX_EREGEN 0x00008000L /* Energy Regeneration */
#define SPFX_HSPDAM 0x00010000L /* 1/2 spell damage (on player) in combat */
#define SPFX_HPHDAM \
0x00020000L /* 1/2 physical damage (on player) in combat */
#define SPFX_TCTRL 0x00040000L /* Teleportation Control */
#define SPFX_LUCK 0x00080000L /* Increase Luck (like Luckstone) */
#define SPFX_DMONS 0x00100000L /* attack bonus on one monster type */
#define SPFX_DCLAS 0x00200000L /* attack bonus on monsters w/ symbol mtype \
*/
#define SPFX_DFLAG1 0x00400000L /* attack bonus on monsters w/ mflags1 flag \
*/
#define SPFX_DFLAG2 0x00800000L /* attack bonus on monsters w/ mflags2 flag \
*/
#define SPFX_DALIGN 0x01000000L /* attack bonus on non-aligned monsters */
#define SPFX_DBONUS 0x01F00000L /* attack bonus mask */
#define SPFX_XRAY 0x02000000L /* gives X-RAY vision to player */
#define SPFX_HPHDAM 0x00020000L /* 1/2 physical damage (on player) in combat */
#define SPFX_TCTRL 0x00040000L /* Teleportation Control */
#define SPFX_LUCK 0x00080000L /* Increase Luck (like Luckstone) */
#define SPFX_DMONS 0x00100000L /* attack bonus on one monster type */
#define SPFX_DCLAS 0x00200000L /* attack bonus on monsters w/ symbol mtype */
#define SPFX_DFLAG1 0x00400000L /* attack bonus on monsters w/ mflags1 flag */
#define SPFX_DFLAG2 0x00800000L /* attack bonus on monsters w/ mflags2 flag */
#define SPFX_DALIGN 0x01000000L /* attack bonus on non-aligned monsters */
#define SPFX_DBONUS 0x01F00000L /* attack bonus mask */
#define SPFX_XRAY 0x02000000L /* gives X-RAY vision to player */
#define SPFX_REFLECT 0x04000000L /* Reflection */
#define SPFX_PROTECT 0x08000000L /* Protection */
@@ -52,7 +49,7 @@ struct artifact {
aligntyp alignment; /* alignment of bequeathing gods */
short role; /* character role associated with */
short race; /* character race associated with */
long cost; /* price when sold to hero (default 100 x base cost) */
long cost; /* price when sold to hero (default 100 x base cost) */
char acolor; /* color to use if artifact 'glows' */
};
@@ -69,4 +66,5 @@ enum invoke_prop_types {
CREATE_AMMO
};
/* clang-format on */
#endif /* ARTIFACT_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 artilist.h $NHDT-Date: 1564351548 2019/07/28 22:05:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.20 $ */
/* NetHack 3.7 artilist.h $NHDT-Date: 1596498526 2020/08/03 23:48:46 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.23 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -180,7 +180,7 @@ static NEARDATA struct artifact artilist[] = {
A("The Sceptre of Might", MACE,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DALIGN), 0, 0, PHYS(5, 0),
DFNS(AD_MAGM), NO_CARY, CONFLICT, A_LAWFUL, PM_CAVEMAN, NON_PM, 2500L,
DFNS(AD_MAGM), NO_CARY, CONFLICT, A_LAWFUL, PM_CAVE_DWELLER, NON_PM, 2500L,
NO_COLOR),
#if 0 /* OBSOLETE */
@@ -210,7 +210,7 @@ A("The Palantir of Westernesse", CRYSTAL_BALL,
A("The Mitre of Holiness", HELM_OF_BRILLIANCE,
(SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAG2 | SPFX_INTEL | SPFX_PROTECT), 0,
M2_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE), ENERGY_BOOST, A_LAWFUL,
PM_PRIEST, NON_PM, 2000L, NO_COLOR),
PM_CLERIC, NON_PM, 2000L, NO_COLOR),
A("The Longbow of Diana", BOW,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_REFLECT), SPFX_ESP, 0,

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 attrib.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 attrib.h $NHDT-Date: 1596498527 2020/08/03 23:48:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright 1988, Mike Stephenson */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 botl.h $NHDT-Date: 1562187996 2019/07/03 21:06:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.27 $ */
/* NetHack 3.7 botl.h $NHDT-Date: 1596498528 2020/08/03 23:48:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.34 $ */
/* Copyright (c) Michael Allison, 2003 */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 color.h $NHDT-Date: 1432512776 2015/05/25 00:12:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */
/* NetHack 3.7 color.h $NHDT-Date: 1596498528 2020/08/03 23:48:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) Steve Linhart, Eric Raymond, 1989. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 config.h $NHDT-Date: 1594169990 2020/07/08 00:59:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.139 $ */
/* NetHack 3.7 config.h $NHDT-Date: 1608933417 2020/12/25 21:56:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.146 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2016. */
/* NetHack may be freely redistributed. See license for details. */
@@ -58,14 +58,13 @@
/* #define CURSES_GRAPHICS *//* Curses interface - Karl Garrison*/
/* #define X11_GRAPHICS */ /* X11 interface */
/* #define QT_GRAPHICS */ /* Qt interface */
/* #define GNOME_GRAPHICS */ /* Gnome interface */
/* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */
/*
* Define the default window system. This should be one that is compiled
* into your system (see defines above). Known window systems are:
*
* tty, X11, mac, amii, BeOS, Qt, Gem, Gnome
* tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, shim
*/
/* MAC also means MAC windows */
@@ -103,16 +102,24 @@
#ifndef NOUSER_SOUNDS
#define USER_SOUNDS /* Use sounds */
#endif
#ifndef USE_XPM
#define USE_XPM /* Use XPM format for images (required) */
#endif
#ifndef GRAPHIC_TOMBSTONE
#define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */
#endif
#ifndef DEFAULT_WINDOW_SYS
#define DEFAULT_WINDOW_SYS "Qt"
#endif
#endif
#ifdef GNOME_GRAPHICS
#ifndef USE_XPM
#define USE_XPM /* Use XPM format for images (required) */
#endif
#ifndef GRAPHIC_TOMBSTONE
#define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */
#endif
#ifndef DEFAULT_WINDOW_SYS
#define DEFAULT_WINDOW_SYS "Gnome"
#endif
@@ -125,9 +132,11 @@
#define HACKDIR "\\nethack"
#endif
#ifdef TTY_GRAPHICS
#ifndef DEFAULT_WINDOW_SYS
#define DEFAULT_WINDOW_SYS "tty"
#endif
#endif
#ifdef CURSES_GRAPHICS
#ifndef DEFAULT_WINDOW_SYS
@@ -135,6 +144,12 @@
#endif
#endif
#ifdef SHIM_GRAPHICS
#ifndef DEFAULT_WINDOW_SYS
#define DEFAULT_WINDOW_SYS "shim"
#endif
#endif
#ifdef X11_GRAPHICS
/*
* There are two ways that X11 tiles may be defined. (1) using a custom
@@ -146,8 +161,10 @@
*/
/* # define USE_XPM */ /* Disable if you do not have the XPM library */
#ifdef USE_XPM
#ifndef GRAPHIC_TOMBSTONE
#define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
#endif
#endif
#ifndef DEFAULT_WC_TILED_MAP
#define DEFAULT_WC_TILED_MAP /* Default to tiles */
#endif
@@ -440,24 +457,15 @@ typedef unsigned char uchar;
/* #define STRNCMPI */ /* compiler/library has the strncmpi function */
/*
* There are various choices for the NetHack vision system. There is a
* choice of two algorithms with the same behavior. Defining VISION_TABLES
* creates huge (60K) tables at compile time, drastically increasing data
* size, but runs slightly faster than the alternate algorithm. (MSDOS in
* particular cannot tolerate the increase in data size; other systems can
* flip a coin weighted to local conditions.)
* Vision choices.
*
* If VISION_TABLES is not defined, things will be faster if you can use
* MACRO_CPATH. Some cpps, however, cannot deal with the size of the
* functions that have been macroized.
* Things will be faster if you can use MACRO_CPATH. Some cpps, however,
* cannot deal with the size of the functions that have been macroized.
*/
/* #define VISION_TABLES */ /* use vision tables generated at compile time */
#ifndef VISION_TABLES
#ifndef NO_MACRO_CPATH
#define MACRO_CPATH /* use clear_path macros instead of functions */
#endif
#endif
#if !defined(MAC)
#if !defined(NOCLIPPING)
@@ -465,7 +473,12 @@ typedef unsigned char uchar;
#endif
#endif
#define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
/* The "repeat" key used in cmd.c as NHKF_DOAGAIN; if commented out or the
* value is changed from C('A') to 0, it won't be bound to any keystroke
* unless you use the run-time configuration file's BIND directive for it.
* [Note: C() macro isn't defined yet but it will be before DOAGAIN is used.]
*/
#define DOAGAIN C('A') /* repeat previous command; default is ^A, '\001' */
/* CONFIG_ERROR_SECURE: If user makes NETHACKOPTIONS point to a file ...
* TRUE: Show the first error, nothing else.

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 config1.h $NHDT-Date: 1594169991 2020/07/08 00:59:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* NetHack 3.7 config1.h $NHDT-Date: 1596498530 2020/08/03 23:48:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.23 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -28,8 +28,10 @@
#ifdef MSDOS
#undef UNIX
#ifndef CROSSCOMPILE
#define SHORT_FILENAMES
#endif
#endif
/*
* Mac Stuff.

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 context.h $NHDT-Date: 1580434522 2020/01/31 01:35:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.39 $ */
/* NetHack 3.7 context.h $NHDT-Date: 1596498530 2020/08/03 23:48:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.41 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 coord.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
/* NetHack 3.7 coord.h $NHDT-Date: 1596498531 2020/08/03 23:48:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 decl.h $NHDT-Date: 1593953331 2020/07/05 12:48:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.238 $ */
/* NetHack 3.7 decl.h $NHDT-Date: 1607641577 2020/12/10 23:06:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.248 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2007. */
/* NetHack may be freely redistributed. See license for details. */
@@ -75,16 +75,6 @@ struct dgn_topology { /* special dungeon levels for speed */
#define sokoend_level (g.dungeon_topology.d_sokoend_level)
/* clang-format on */
#define xdnstair (g.dnstair.sx)
#define ydnstair (g.dnstair.sy)
#define xupstair (g.upstair.sx)
#define yupstair (g.upstair.sy)
#define xdnladder (g.dnladder.sx)
#define ydnladder (g.dnladder.sy)
#define xupladder (g.upladder.sx)
#define yupladder (g.upladder.sy)
#define dunlev_reached(x) (g.dungeons[(x)->dnum].dunlev_ureached)
#include "quest.h"
@@ -104,6 +94,8 @@ struct sinfo {
int something_worth_saving; /* in case of panic */
int panicking; /* `panic' is in progress */
int exiting; /* an exit handler is executing */
int saving;
int restoring;
int in_moveloop;
int in_impossible;
int in_self_recover;
@@ -424,15 +416,16 @@ enum nh_keyfunc {
NHKF_REQMENU,
/* run ... clicklook need to be in a continuous block */
NHKF_RUN,
NHKF_RUN2,
NHKF_RUSH,
NHKF_FIGHT,
NHKF_FIGHT2,
NHKF_NOPICKUP,
NHKF_RUN_NOPICKUP,
NHKF_DOINV,
NHKF_TRAVEL,
NHKF_RUN, /* 'G' */
NHKF_RUN2, /* '5' or M-5 */
NHKF_RUSH, /* 'g' */
NHKF_RUSH2, /* M-5 or '5' */
NHKF_FIGHT, /* 'F' */
NHKF_FIGHT2, /* '-' */
NHKF_NOPICKUP, /* 'm' */
NHKF_RUN_NOPICKUP, /* 'M' */
NHKF_DOINV, /* '0' */
NHKF_TRAVEL, /* via mouse */
NHKF_CLICKLOOK,
NHKF_REDRAW,
@@ -531,6 +524,9 @@ struct trapinfo {
typedef struct {
xchar gnew; /* perhaps move this bit into the rm structure. */
int glyph;
#ifndef UNBUFFERED_GLYPHMOD
unsigned glyphmod[NUM_GLYPHMOD];
#endif
} gbuf_entry;
enum vanq_order_modes {
@@ -632,19 +628,15 @@ struct role_filter {
struct _create_particular_data {
int quan;
int which;
int fem;
int fem; /* -1, MALE, FEMALE, NEUTRAL */
int genderconf; /* conflicting gender */
char monclass;
boolean randmonst;
boolean maketame, makepeaceful, makehostile;
boolean sleeping, saddled, invisible, hidden;
};
/* instance_globals holds engine state that does not need to be
* persisted upon game exit. The initialization state is well defined
* an set in decl.c during early early engine initialization.
*
* unlike instance_flags, values in the structure can be of any type. */
/* some array sizes for 'g' */
#define BSIZE 20
#define WIZKIT_MAX 128
#define CVT_BUF_SIZE 64
@@ -652,6 +644,16 @@ struct _create_particular_data {
#define LUA_VER_BUFSIZ 20
#define LUA_COPYRIGHT_BUFSIZ 120
/*
* 'g' -- instance_globals holds engine state that does not need to be
* persisted upon game exit. The initialization state is well defined
* and set in decl.c during early early engine initialization.
*
* Unlike instance_flags, values in the structure can be of any type.
*
* Pulled from other files to be grouped in one place. Some comments
* which came with them don't make much sense out of their original context.
*/
struct instance_globals {
/* apply.c */
@@ -684,12 +686,12 @@ struct instance_globals {
/* cmd.c */
struct cmd Cmd; /* flag.h */
/* Provide a means to redo the last command. The flag `in_doagain' is set
* to true while redoing the command. This flag is tested in commands that
* require additional input (like `throw' which requires a thing and a
* direction), and the input prompt is not shown. Also, while in_doagain is
* TRUE, no keystrokes can be saved into the saveq.
*/
/* Provide a means to redo the last command. The flag `in_doagain'
(decl.c below) is set to true while redoing the command. This flag
is tested in commands that require additional input (like `throw'
which requires a thing and a direction), and the input prompt is
not shown. Also, while in_doagain is TRUE, no keystrokes can be
saved into the saveq. */
char pushq[BSIZE];
char saveq[BSIZE];
int phead;
@@ -721,10 +723,7 @@ struct instance_globals {
int y_maze_max;
int otg_temp; /* used by object_to_glyph() [otg] */
int in_doagain;
stairway dnstair; /* stairs down */
stairway upstair; /* stairs up */
stairway dnladder; /* ladder down */
stairway upladder; /* ladder up */
stairway *stairs;
int smeq[MAXNROFROOMS + 1];
int doorindex;
char *save_cm;
@@ -749,7 +748,6 @@ struct instance_globals {
number of shots, index of current one, validity check, shoot vs throw */
struct multishot m_shot;
dungeon dungeons[MAXDUNGEON]; /* ini'ed by init_dungeon() */
stairway sstairs;
dest_area updest;
dest_area dndest;
coord inv_pos;
@@ -760,9 +758,6 @@ struct instance_globals {
boolean mrg_to_wielded; /* weapon picked is merged with wielded one */
struct plinemsg_type *plinemsg_types;
char toplines[TBUFSZ];
struct mkroom *upstairs_room;
struct mkroom *dnstairs_room;
struct mkroom *sstairs_room;
coord bhitpos; /* place where throw or zap hits or stops */
boolean in_steed_dismounting;
coord doors[DOORMAX];
@@ -815,8 +810,8 @@ struct instance_globals {
/* display.c */
gbuf_entry gbuf[ROWNO][COLNO];
char gbuf_start[ROWNO];
char gbuf_stop[ROWNO];
xchar gbuf_start[ROWNO];
xchar gbuf_stop[ROWNO];
/* do.c */
@@ -840,7 +835,7 @@ struct instance_globals {
int petname_used; /* user preferred pet name has been used */
xchar gtyp; /* type of dog's current goal */
xchar gx; /* x position of dog's current goal */
char gy; /* y position of dog's current goal */
xchar gy; /* y position of dog's current goal */
char dogname[PL_PSIZ];
char catname[PL_PSIZ];
char horsename[PL_PSIZ];
@@ -932,9 +927,10 @@ struct instance_globals {
/* makemon.c */
/* mhitm.c */
boolean vis;
boolean far_noise;
long noisetime;
boolean far_noise;
boolean vis;
boolean skipdrin; /* mind flayer against headless target */
/* mhitu.c */
int mhitu_dieroll;
@@ -966,6 +962,7 @@ struct instance_globals {
/* mon.c */
boolean vamp_rise_msg;
boolean disintegested;
boolean zombify;
short *animal_list; /* list of PM values for animal monsters */
int animal_list_count;
@@ -998,34 +995,35 @@ struct instance_globals {
/* objname.c */
/* distantname 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 */
but that would require all xname() and doname() calls to be modified */
int distantname;
/* options.c */
struct symsetentry *symset_list; /* files.c will populate this with
list of available sets */
/*
* Allow the user to map incoming characters to various menu commands.
* The accelerator list must be a valid C string.
*/
* list of available sets */
/* Allow the user to map incoming characters to various menu commands. */
char mapped_menu_cmds[MAX_MENU_MAPPED_CMDS + 1]; /* exported */
char mapped_menu_op[MAX_MENU_MAPPED_CMDS + 1];
short n_menu_mapped;
/* options processing */
boolean opt_initial;
boolean opt_from_file;
boolean opt_need_redraw; /* for doset() */
/* use menucolors to show colors in the pick-a-color menu */
boolean save_menucolors; /* copy of iflags.use_menu_colors */
struct menucoloring *save_colorings; /* copy of g.menu_colorings */
struct menucoloring *color_colorings; /* alternate set of menu colors */
/* pickup.c */
int oldcap; /* last encumberance */
/* current_container is set in use_container(), to be used by the
callback routines in_container() and out_container() from askchain()
and use_container(). Also used by menu_loot() and container_gone(). */
and use_container(). Also used by menu_loot() and container_gone(). */
struct obj *current_container;
boolean abort_looting;
/* Value set by query_objlist() for n_or_more(). */
long val_for_n_or_more;
/* list of valid menu classes for query_objlist() and allow_category callback
/* list of menu classes for query_objlist() and allow_category callback
(with room for all object classes, 'u'npaid, BUCX, and terminator) */
char valid_menu_classes[MAXOCLASSES + 1 + 4 + 1];
boolean class_filter;
@@ -1110,6 +1108,8 @@ struct instance_globals {
boolean havestate;
unsigned ustuck_id; /* need to preserve during save */
unsigned usteed_id; /* need to preserve during save */
struct obj *looseball; /* track uball during save and... */
struct obj *loosechain; /* track uchain since saving might free it */
/* shk.c */
/* auto-response flag for/from "sell foo?" 'a' => 'y', 'q' => 'n' */
@@ -1140,7 +1140,6 @@ struct instance_globals {
unsigned int stealmid; /* monster doing the stealing */
/* teleport.c */
struct obj *telescroll; /* non-null when teleporting via this scroll */
/* timeout.c */
/* ordered timer list */
@@ -1179,9 +1178,9 @@ struct instance_globals {
Stormbringer's maliciousness. */
/* vision.c */
char **viz_array; /* used in cansee() and couldsee() macros */
char *viz_rmin; /* min could see indices */
char *viz_rmax; /* max could see indices */
xchar **viz_array; /* used in cansee() and couldsee() macros */
xchar *viz_rmin; /* min could see indices */
xchar *viz_rmax; /* max could see indices */
boolean vision_full_recalc;
/* weapon.c */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dgn_file.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 dgn_file.h $NHDT-Date: 1596498533 2020/08/03 23:48:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) 1989 by M. Stephenson */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 display.h $NHDT-Date: 1559994621 2019/06/08 11:50:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.32 $ */
/* NetHack 3.7 display.h $NHDT-Date: 1605927391 2020/11/21 02:56:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.48 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
@@ -69,6 +69,15 @@ enum explosion_types {
* hero can physically see the location of the monster. The function
* vobj_at() returns a pointer to an object that the hero can see there.
* Infravision is not taken into account.
*
* Note: not reliable for concealed mimics. They don't have
* 'mon->mundetected' set even when mimicking objects or furniture.
* [Fixing this with a pair of mon->m_ap_type checks here (via either
* 'typ!=object && typ!=furniture' or 'typ==nothing || typ==monster')
* will require reviewing every instance of mon_visible(), canseemon(),
* canspotmon(), is_safemon() and perhaps others. Fixing it by setting
* mon->mundetected when concealed would be better but also require
* reviewing all those instances and also existing mundetected instances.]
*/
#if 0
#define mon_visible(mon) \
@@ -328,18 +337,18 @@ enum explosion_types {
/* This has the unfortunate side effect of needing a global variable */
/* to store a result. 'otg_temp' is defined and declared in decl.{ch}. */
#define random_obj_to_glyph(rng) \
((g.otg_temp = random_object(rng)) == CORPSE \
? random_monster(rng) + GLYPH_BODY_OFF \
#define random_obj_to_glyph(rng) \
((g.otg_temp = random_object(rng)) == CORPSE \
? random_monster(rng) + GLYPH_BODY_OFF \
: g.otg_temp + GLYPH_OBJ_OFF)
#define obj_to_glyph(obj, rng) \
(((obj)->otyp == STATUE) \
? statue_to_glyph(obj, rng) \
: Hallucination \
? random_obj_to_glyph(rng) \
: ((obj)->otyp == CORPSE) \
? (int) (obj)->corpsenm + GLYPH_BODY_OFF \
#define obj_to_glyph(obj, rng) \
(((obj)->otyp == STATUE) \
? statue_to_glyph(obj, rng) \
: Hallucination \
? random_obj_to_glyph(rng) \
: ((obj)->otyp == CORPSE) \
? (int) (obj)->corpsenm + GLYPH_BODY_OFF \
: (int) (obj)->otyp + GLYPH_OBJ_OFF)
/* MRKR: Statues now have glyphs corresponding to the monster they */
@@ -349,6 +358,16 @@ enum explosion_types {
(Hallucination ? random_monster(rng) + GLYPH_MON_OFF \
: (int) (obj)->corpsenm + GLYPH_STATUE_OFF)
/* briefly used for Qt's "paper doll" inventory which shows map tiles for
equipped objects; those vary like floor items during hallucination now
so this isn't used anywhere */
#define obj_to_true_glyph(obj) \
(((obj)->otyp == STATUE) \
? ((int) (obj)->corpsenm + GLYPH_STATUE_OFF) \
: ((obj)->otyp == CORPSE) \
? ((int) (obj)->corpsenm + GLYPH_BODY_OFF) \
: ((int) (obj)->otyp + GLYPH_OBJ_OFF))
#define cmap_to_glyph(cmap_idx) ((int) (cmap_idx) + GLYPH_CMAP_OFF)
#define explosion_to_glyph(expltype, idx) \
((((expltype) * MAXEXPCHARS) + ((idx) - S_explode1)) + GLYPH_EXPLODE_OFF)
@@ -456,4 +475,27 @@ enum explosion_types {
#define glyph_is_unexplored(glyph) ((glyph) == GLYPH_UNEXPLORED)
#define glyph_is_nothing(glyph) ((glyph) == GLYPH_NOTHING)
/* flags for map_glyphmod */
/* mgflags for altering map_glyphmod() internal behaviour */
#define MG_FLAG_NORMAL 0x00
#define MG_FLAG_NOOVERRIDE 0x01
#define MG_FLAG_RETURNIDX 0x02
/* Special mapped glyph flags encoded in glyphmod[GM_FLAGS] by map_glyphmod() */
#define MG_CORPSE 0x0001
#define MG_INVIS 0x0002
#define MG_DETECT 0x0004
#define MG_PET 0x0008
#define MG_RIDDEN 0x0010
#define MG_STATUE 0x0020
#define MG_OBJPILE 0x0040 /* more than one stack of objects */
#define MG_BW_LAVA 0x0080 /* 'black & white lava': highlight lava if it
can't be distringuished from water by color */
#define MG_BW_ICE 0x0100 /* similar for ice vs floor */
#define MG_NOTHING 0x0200 /* char represents GLYPH_NOTHING */
#define MG_UNEXPL 0x0400 /* char represents GLYPH_UNEXPLORED */
#define MG_FEMALE 0x0800 /* represents a female mon,detected mon,pet,ridden */
#define MG_BADXY 0x1000 /* bad coordinates were passed */
#endif /* DISPLAY_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dlb.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.7 dlb.h $NHDT-Date: 1596498534 2020/08/03 23:48:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */
/* NetHack may be freely redistributed. See license for details. */
@@ -9,7 +9,7 @@
#ifdef DLB
/* implementations */
#ifdef MAC
#if defined(MAC) && !defined(MAC_CROSS)
#define DLBRSRC /* use Mac resources */
#else
#define DLBLIB /* use a set of external files */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dungeon.h $NHDT-Date: 1593953333 2020/07/05 12:48:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.38 $ */
/* NetHack 3.7 dungeon.h $NHDT-Date: 1596498535 2020/08/03 23:48:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.39 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -34,7 +34,9 @@ typedef struct s_level { /* special dungeon level element */
typedef struct stairway { /* basic stairway identifier */
xchar sx, sy; /* x / y location of the stair */
d_level tolev; /* where does it go */
char up; /* what type of stairway (up/down) */
boolean up; /* up or down? */
boolean isladder; /* ladder or stairway? */
struct stairway *next;
} stairway;
/* level region types */
@@ -182,14 +184,6 @@ struct linfo {
* fountains"). This makes it also subject to player conditions (amnesia).
*/
/* Because clearly Nethack needs more ways to specify alignment */
#define Amask2msa(x) ((x) == 4 ? 3 : (x) &AM_MASK)
#define Msa2amask(x) ((x) == 3 ? 4 : (x))
#define MSA_NONE 0 /* unaligned or multiple alignments */
#define MSA_LAWFUL 1
#define MSA_NEUTRAL 2
#define MSA_CHAOTIC 3
/* what the player knows about a single dungeon level */
/* initialized in mklev() */
typedef struct mapseen {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 engrave.h $NHDT-Date: 1432512777 2015/05/25 00:12:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 engrave.h $NHDT-Date: 1596498535 2020/08/03 23:48:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1594168620 2020/07/08 00:37:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.851 $ */
/* NetHack 3.7 extern.h $NHDT-Date: 1608749030 2020/12/23 18:43:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.934 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -47,6 +47,7 @@ E void FDECL(check_leash, (XCHAR_P, XCHAR_P));
E boolean FDECL(um_dist, (XCHAR_P, XCHAR_P, XCHAR_P));
E boolean FDECL(snuff_candle, (struct obj *));
E boolean FDECL(snuff_lit, (struct obj *));
E boolean FDECL(splash_lit, (struct obj *));
E boolean FDECL(catch_lit, (struct obj *));
E void FDECL(use_unicorn_horn, (struct obj **));
E boolean FDECL(tinnable, (struct obj *));
@@ -205,22 +206,9 @@ E void FDECL(random_response, (char *, int));
E int NDECL(rnd_extcmd_idx);
E int NDECL(domonability);
E char FDECL(cmd_from_func, (int NDECL((*))));
E const char *FDECL(cmdname_from_func, (int NDECL((*)), char *, BOOLEAN_P));
E boolean FDECL(redraw_cmd, (CHAR_P));
E const char *FDECL(levltyp_to_name, (int));
#ifdef USE_TRAMPOLI
E int NDECL(doextcmd);
E int NDECL(domonability);
E int NDECL(doprev_message);
E int NDECL(timed_occupation);
E int NDECL(doattributes);
E int NDECL(wiz_detect);
E int NDECL(wiz_genesis);
E int NDECL(wiz_identify);
E int NDECL(wiz_level_tele);
E int NDECL(wiz_map);
E int NDECL(wiz_where);
E int NDECL(wiz_wish);
#endif /* USE_TRAMPOLI */
E void NDECL(reset_occupations);
E void FDECL(set_occupation, (int (*)(void), const char *, int));
E char NDECL(pgetchar);
@@ -228,7 +216,7 @@ E void FDECL(pushch, (CHAR_P));
E void FDECL(savech, (CHAR_P));
E const char *FDECL(key2extcmddesc, (UCHAR_P));
E boolean FDECL(bind_specialkey, (UCHAR_P, const char *));
E char FDECL(txt2key, (char *));
E uchar FDECL(txt2key, (char *));
E void FDECL(parseautocomplete, (char *, BOOLEAN_P));
E void FDECL(reset_commands, (BOOLEAN_P));
E void FDECL(rhack, (char *));
@@ -296,10 +284,6 @@ E void FDECL(use_crystal_ball, (struct obj **));
E void NDECL(do_mapping);
E void FDECL(do_vicinity_map, (struct obj *));
E void FDECL(cvt_sdoor_to_door, (struct rm *));
#ifdef USE_TRAMPOLI
E void FDECL(findone, (int, int, genericptr_t));
E void FDECL(openone, (int, int, genericptr_t));
#endif
E int NDECL(findit);
E int NDECL(openit);
E boolean FDECL(detecting, (void (*)(int, int, genericptr)));
@@ -312,14 +296,12 @@ E void NDECL(sokoban_detect);
E void NDECL(dump_map);
#endif
E void FDECL(reveal_terrain, (int, int));
E int NDECL(wiz_mgender);
/* ### dig.c ### */
E int FDECL(dig_typ, (struct obj *, XCHAR_P, XCHAR_P));
E boolean NDECL(is_digging);
#ifdef USE_TRAMPOLI
E int NDECL(dig);
#endif
E int NDECL(holetime);
E boolean FDECL(dig_check, (struct monst *, BOOLEAN_P, int, int));
E void FDECL(digactualhole, (int, int, struct monst *, int));
@@ -394,13 +376,10 @@ E void NDECL(reglyph_darkroom);
E void NDECL(set_wall_state);
E void FDECL(unset_seenv, (struct rm *, int, int, int, int));
E int FDECL(warning_of, (struct monst *));
E void FDECL(map_glyphmod, (XCHAR_P, XCHAR_P, int, unsigned, unsigned *));
/* ### do.c ### */
#ifdef USE_TRAMPOLI
E int FDECL(drop, (struct obj *));
E int NDECL(wipeoff);
#endif
E int NDECL(dodrop);
E boolean FDECL(boulder_hits_pool, (struct obj *, int, int, BOOLEAN_P));
E boolean FDECL(flooreffects, (struct obj *, int, int, const char *));
@@ -419,11 +398,13 @@ E void NDECL(save_currentstate);
E void FDECL(u_collide_m, (struct monst *));
E void FDECL(goto_level, (d_level *, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
E void NDECL(maybe_lvltport_feedback);
E void FDECL(schedule_goto, (d_level *, BOOLEAN_P, BOOLEAN_P, int,
E void FDECL(schedule_goto, (d_level *, int,
const char *, const char *));
E void NDECL(deferred_goto);
E boolean FDECL(revive_corpse, (struct obj *));
E void FDECL(revive_mon, (ANY_P *, long));
E void FDECL(zombify_mon, (ANY_P *, long));
E boolean FDECL(cmd_safety_prevention, (const char *, const char *, int *));
E int NDECL(donull);
E int NDECL(dowipe);
E void FDECL(legs_in_no_shape, (const char *, BOOLEAN_P));
@@ -437,8 +418,8 @@ E char *FDECL(coord_desc, (int, int, char *, CHAR_P));
E boolean FDECL(getpos_menu, (coord *, int));
E int FDECL(getpos, (coord *, BOOLEAN_P, const char *));
E void FDECL(getpos_sethilite, (void (*f)(int), boolean (*d)(int,int)));
E void FDECL(new_mname, (struct monst *, int));
E void FDECL(free_mname, (struct monst *));
E void FDECL(new_mgivenname, (struct monst *, int));
E void FDECL(free_mgivenname, (struct monst *));
E void FDECL(new_oname, (struct obj *, int));
E void FDECL(free_oname, (struct obj *));
E const char *FDECL(safe_oname, (struct obj *));
@@ -479,17 +460,13 @@ E struct monst *FDECL(christen_orc, (struct monst *, const char *,
const char *));
E const char *FDECL(noveltitle, (int *));
E const char *FDECL(lookup_novel, (const char *, int *));
#ifndef PMNAME_MACROS
E int FDECL(Mgender, (struct monst *));
E const char *FDECL(pmname, (struct permonst *, int));
#endif /* PMNAME_MACROS */
/* ### do_wear.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(Armor_on);
E int NDECL(Boots_on);
E int NDECL(Gloves_on);
E int NDECL(Helmet_on);
E int FDECL(select_off, (struct obj *));
E int NDECL(take_off);
#endif
E const char *FDECL(fingers_or_gloves, (BOOLEAN_P));
E void FDECL(off_msg, (struct obj *));
E void FDECL(toggle_displacement, (struct obj *, long, BOOLEAN_P));
@@ -559,9 +536,6 @@ E struct obj *FDECL(droppables, (struct monst *));
E int FDECL(dog_nutrition, (struct monst *, struct obj *));
E int FDECL(dog_eat, (struct monst *, struct obj *, int, int, BOOLEAN_P));
E int FDECL(dog_move, (struct monst *, int));
#ifdef USE_TRAMPOLI
E void FDECL(wantdoor, (int, int, genericptr_t));
#endif
E void FDECL(finish_meating, (struct monst *));
/* ### dokick.c ### */
@@ -627,6 +601,15 @@ E void FDECL(next_level, (BOOLEAN_P));
E void FDECL(prev_level, (BOOLEAN_P));
E void FDECL(u_on_newpos, (int, int));
E void FDECL(u_on_rndspot, (int));
E void FDECL(stairway_add, (int,int, BOOLEAN_P, BOOLEAN_P, d_level *));
E void NDECL(stairway_print);
E void NDECL(stairway_free_all);
E stairway *FDECL(stairway_at, (int, int));
E stairway *FDECL(stairway_find, (d_level *));
E stairway *FDECL(stairway_find_from, (d_level *, BOOLEAN_P));
E stairway *FDECL(stairway_find_dir, (BOOLEAN_P));
E stairway *FDECL(stairway_find_type_dir, (BOOLEAN_P, BOOLEAN_P));
E stairway *FDECL(stairway_find_special_dir, (BOOLEAN_P));
E void FDECL(u_on_sstairs, (int));
E void NDECL(u_on_upstairs);
E void NDECL(u_on_dnstairs);
@@ -673,12 +656,6 @@ E const char *FDECL(endgamelevelname, (char *, int));
/* ### eat.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(eatmdone);
E int NDECL(eatfood);
E int NDECL(opentin);
E int NDECL(unfaint);
#endif
E void NDECL(eatmupdate);
E boolean FDECL(is_edible, (struct obj *));
E void NDECL(init_uhunger);
@@ -712,9 +689,6 @@ E boolean FDECL(Popeye, (int));
E void FDECL(done1, (int));
E int NDECL(done2);
#ifdef USE_TRAMPOLI
E void FDECL(done_intr, (int));
#endif
E void FDECL(done_in_by, (struct monst *, int));
#endif /* !MAKEDEFS_C && MDLIB_C */
E void VDECL(panic, (const char *, ...)) PRINTF_F(1, 2) NORETURN;
@@ -854,9 +828,6 @@ E boolean FDECL(Death_quote, (char *, int));
E void FDECL(floating_above, (const char *));
E void FDECL(dogushforth, (int));
#ifdef USE_TRAMPOLI
E void FDECL(gush, (int, int, genericptr_t));
#endif
E void FDECL(dryup, (XCHAR_P, XCHAR_P, BOOLEAN_P));
E void NDECL(drinkfountain);
E void FDECL(dipfountain, (struct obj *));
@@ -871,6 +842,7 @@ E anything *FDECL(long_to_any, (long));
E anything *FDECL(monst_to_any, (struct monst *));
E anything *FDECL(obj_to_any, (struct obj *));
E boolean FDECL(revive_nasty, (int, int, const char *));
E int FDECL(still_chewing, (XCHAR_P, XCHAR_P));
E void FDECL(movobj, (struct obj *, XCHAR_P, XCHAR_P));
E boolean FDECL(may_dig, (XCHAR_P, XCHAR_P));
E boolean FDECL(may_passwall, (XCHAR_P, XCHAR_P));
@@ -883,6 +855,7 @@ E int NDECL(wiz_debug_cmd_traveldisplay);
#endif
E boolean NDECL(u_rooted);
E void NDECL(domove);
E void NDECL(overexert_hp);
E boolean NDECL(overexertion);
E void NDECL(invocation_message);
E void NDECL(switch_terrain);
@@ -1006,15 +979,13 @@ E void NDECL(ustatusline);
/* ### invent.c ### */
E void FDECL(loot_classify, (Loot *, struct obj *));
E Loot *FDECL(sortloot, (struct obj **, unsigned, BOOLEAN_P,
boolean (*)(OBJ_P)));
E void FDECL(unsortloot, (Loot **));
E void FDECL(assigninvlet, (struct obj *));
E struct obj *FDECL(merge_choice, (struct obj *, struct obj *));
E int FDECL(merged, (struct obj **, struct obj **));
#ifdef USE_TRAMPOLI
E int FDECL(ckunpaid, (struct obj *));
#endif
E void FDECL(addinv_core1, (struct obj *));
E void FDECL(addinv_core2, (struct obj *));
E struct obj *FDECL(addinv, (struct obj *));
@@ -1045,6 +1016,7 @@ E int FDECL(ggetobj, (const char *, int (*)(OBJ_P), int,
BOOLEAN_P, unsigned *));
E int FDECL(askchain, (struct obj **, const char *, int, int (*)(OBJ_P),
int (*)(OBJ_P), int, const char *));
E void FDECL(set_cknown_lknown, (struct obj *));
E void FDECL(fully_identify_obj, (struct obj *));
E int FDECL(identify, (struct obj *));
E int FDECL(count_unidentified, (struct obj *));
@@ -1105,7 +1077,7 @@ E int NDECL(dosuspend);
E void FDECL(new_light_source, (XCHAR_P, XCHAR_P, int, int, ANY_P *));
E void FDECL(del_light_source, (int, ANY_P *));
E void FDECL(do_light_sources, (char **));
E void FDECL(do_light_sources, (xchar **));
E void FDECL(show_transient_light, (struct obj *, int, int));
E void NDECL(transient_light_cleanup);
E struct monst *FDECL(find_mid, (unsigned, unsigned));
@@ -1129,10 +1101,6 @@ E int NDECL(wiz_light_sources);
/* ### lock.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(forcelock);
E int NDECL(picklock);
#endif
E boolean FDECL(picking_lock, (int *, int *));
E boolean FDECL(picking_at, (int, int));
E void FDECL(breakchestlock, (struct obj *, BOOLEAN_P));
@@ -1267,6 +1235,7 @@ E void FDECL(rustm, (struct monst *, struct obj *));
/* ### mhitu.c ### */
E void FDECL(hitmsg, (struct monst *, struct attack *));
E const char *FDECL(mpoisons_subj, (struct monst *, struct attack *));
E void NDECL(u_slow_down);
E struct monst *NDECL(cloneu);
@@ -1274,6 +1243,8 @@ E void FDECL(expels, (struct monst *, struct permonst *, BOOLEAN_P));
E struct attack *FDECL(getmattk, (struct monst *, struct monst *,
int, int *, struct attack *));
E int FDECL(mattacku, (struct monst *));
boolean FDECL(diseasemu, (struct permonst *));
boolean FDECL(u_slip_free, (struct monst *, struct attack *));
E int FDECL(magic_negation, (struct monst *));
E boolean NDECL(gulp_blnd_check);
E int FDECL(gazemu, (struct monst *, struct attack *));
@@ -1300,9 +1271,6 @@ E void NDECL(gain_guardian_angel);
/* ### mklev.c ### */
#ifdef USE_TRAMPOLI
E int FDECL(do_comp, (genericptr_t, genericptr_t));
#endif
E void NDECL(sort_rooms);
E void FDECL(add_room, (int, int, int, int, BOOLEAN_P, SCHAR_P, BOOLEAN_P));
E void FDECL(add_subroom, (struct mkroom *, int, int, int, int, BOOLEAN_P,
@@ -1397,6 +1365,7 @@ E struct obj *FDECL(mk_named_object,
(int, struct permonst *, int, int, const char *));
E struct obj *FDECL(rnd_treefruit_at, (int, int));
E void FDECL(set_corpsenm, (struct obj *, int));
E long FDECL(rider_revival_time, (struct obj *, BOOLEAN_P));
E void FDECL(start_corpse_timeout, (struct obj *));
E void FDECL(bless, (struct obj *));
E void FDECL(unbless, (struct obj *));
@@ -1451,6 +1420,8 @@ E int FDECL(cmap_to_type, (int));
/* ### mon.c ### */
E void NDECL(mon_sanity_check);
E boolean FDECL(zombie_maker, (struct permonst *));
E int FDECL(zombie_form, (struct permonst *));
E int FDECL(m_poisongas_ok, (struct monst *));
E int FDECL(undead_to_corpse, (int));
E int FDECL(genus, (int, int));
@@ -1465,6 +1436,7 @@ E boolean FDECL(mpickstuff, (struct monst *, const char *));
E int FDECL(curr_mon_load, (struct monst *));
E int FDECL(max_mon_load, (struct monst *));
E int FDECL(can_carry, (struct monst *, struct obj *));
E long FDECL(mon_allowflags, (struct monst *));
E int FDECL(mfndpos, (struct monst *, coord *, long *, long));
E boolean FDECL(monnear, (struct monst *, int, int));
E void NDECL(dmonsfree);
@@ -1498,6 +1470,7 @@ E void FDECL(seemimic, (struct monst *));
E void NDECL(rescham);
E void NDECL(restartcham);
E void FDECL(restore_cham, (struct monst *));
E void FDECL(maybe_unhide_at, (XCHAR_P, XCHAR_P));
E boolean FDECL(hideunder, (struct monst *));
E void FDECL(hide_monst, (struct monst *));
E void FDECL(mon_animal_list, (BOOLEAN_P));
@@ -1549,8 +1522,8 @@ E boolean FDECL(dmgtype, (struct permonst *, int));
E int FDECL(max_passive_dmg, (struct monst *, struct monst *));
E boolean FDECL(same_race, (struct permonst *, struct permonst *));
E int FDECL(monsndx, (struct permonst *));
E int FDECL(name_to_mon, (const char *));
E int FDECL(name_to_monplus, (const char *, const char **));
E int FDECL(name_to_mon, (const char *, int *));
E int FDECL(name_to_monplus, (const char *, const char **, int *));
E int FDECL(name_to_monclass, (const char *, int *));
E int FDECL(gender, (struct monst *));
E int FDECL(pronoun_gender, (struct monst *, unsigned));
@@ -1579,6 +1552,7 @@ E void FDECL(mon_yells, (struct monst *, const char *));
E int FDECL(dochug, (struct monst *));
E boolean FDECL(m_digweapon_check, (struct monst *, XCHAR_P, XCHAR_P));
E int FDECL(m_move, (struct monst *, int));
E int FDECL(m_move_aggress, (struct monst *, XCHAR_P, XCHAR_P));
E void FDECL(dissolve_bars, (int, int));
E boolean FDECL(closed_door, (int, int));
E boolean FDECL(accessible, (int, int));
@@ -1659,6 +1633,7 @@ E int FDECL(ohitmon, (struct monst *, struct obj *, int, BOOLEAN_P));
E void FDECL(thrwmu, (struct monst *));
E int FDECL(spitmu, (struct monst *, struct attack *));
E int FDECL(breamu, (struct monst *, struct attack *));
E boolean FDECL(linedup_callback, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, boolean FDECL((*), (int,int))));
E boolean FDECL(linedup, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, int));
E boolean FDECL(lined_up, (struct monst *));
E struct obj *FDECL(m_carrying, (struct monst *, int));
@@ -1678,9 +1653,6 @@ E boolean FDECL(find_defensive, (struct monst *));
E int FDECL(use_defensive, (struct monst *));
E int FDECL(rnd_defensive_item, (struct monst *));
E boolean FDECL(find_offensive, (struct monst *));
#ifdef USE_TRAMPOLI
E int FDECL(mbhitm, (struct monst *, struct obj *));
#endif
E int FDECL(use_offensive, (struct monst *));
E int FDECL(rnd_offensive_item, (struct monst *));
E boolean FDECL(find_misc, (struct monst *));
@@ -1772,11 +1744,13 @@ E void NDECL(nttty_exit);
E void NDECL(init_objects);
E void FDECL(obj_shuffle_range, (int, int *, int *));
E int NDECL(find_skates);
E boolean FDECL(objdescr_is, (struct obj *, const char *));
E void NDECL(oinit);
E void FDECL(savenames, (NHFILE *));
E void FDECL(restnames, (NHFILE *));
E void FDECL(discover_object, (int, BOOLEAN_P, BOOLEAN_P));
E void FDECL(undiscover_object, (int));
E int FDECL(choose_disco_sort, (int));
E int NDECL(dodiscovered);
E int NDECL(doclassdisco);
E void NDECL(rename_disco);
@@ -1898,6 +1872,7 @@ E void NDECL(msgtype_free);
/* ### pager.c ### */
E char *FDECL(self_lookat, (char *));
E char *FDECL(monhealthdescr, (struct monst *mon, BOOLEAN_P, char *));
E void FDECL(mhidden_description, (struct monst *, BOOLEAN_P, char *));
E boolean FDECL(object_from_map, (int,int,int,struct obj **));
E int FDECL(do_screen_description, (coord, BOOLEAN_P, int, char *,
@@ -1971,10 +1946,6 @@ E boolean FDECL(allow_category, (struct obj *));
E boolean FDECL(is_worn_by_type, (struct obj *));
E int FDECL(ck_bag, (struct obj *));
E void FDECL(removed_from_icebox, (struct obj *));
#ifdef USE_TRAMPOLI
E int FDECL(in_container, (struct obj *));
E int FDECL(out_container, (struct obj *));
#endif
E int FDECL(pickup, (int));
E int FDECL(pickup_object, (struct obj *, long, BOOLEAN_P));
E int FDECL(query_category, (const char *, struct obj *, int,
@@ -2016,6 +1987,7 @@ E void VDECL(verbalize, (const char *, ...)) PRINTF_F(1, 2);
E void VDECL(raw_printf, (const char *, ...)) PRINTF_F(1, 2);
E void VDECL(impossible, (const char *, ...)) PRINTF_F(1, 2);
E void VDECL(config_error_add, (const char *, ...)) PRINTF_F(1, 2);
E void FDECL(nhassert_failed, (const char *, const char *, int));
/* ### polyself.c ### */
@@ -2076,9 +2048,6 @@ E const char *NDECL(bottlename);
E boolean FDECL(critically_low_hp, (BOOLEAN_P));
E boolean NDECL(stuck_in_wall);
#ifdef USE_TRAMPOLI
E int NDECL(prayer_done);
#endif
E int NDECL(dosacrifice);
E boolean FDECL(can_pray, (BOOLEAN_P));
E int NDECL(dopray);
@@ -2147,16 +2116,21 @@ E void NDECL(deliver_splev_message);
/* ### random.c ### */
#if defined(RANDOM) && !defined(__GO32__) /* djgpp has its own random */
#ifndef CROSS_TO_AMIGA
E void FDECL(srandom, (unsigned));
E char *FDECL(initstate, (unsigned, char *, int));
E char *FDECL(setstate, (char *));
E long NDECL(random);
#endif
#endif /* RANDOM */
/* ### read.c ### */
E void FDECL(learnscroll, (struct obj *));
E char *FDECL(tshirt_text, (struct obj *, char *));
E char *FDECL(apron_text, (struct obj *, char *));
E const char *FDECL(candy_wrapper_text, (struct obj *));
E void FDECL(assign_candy_wrapper, (struct obj *));
E int NDECL(doread);
E boolean FDECL(is_chargeable, (struct obj *));
E void FDECL(recharge, (struct obj *, int));
@@ -2165,9 +2139,6 @@ E void FDECL(drop_boulder_on_player,
(BOOLEAN_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
E boolean FDECL(drop_boulder_on_monster, (int, int, BOOLEAN_P, BOOLEAN_P));
E void FDECL(wand_explode, (struct obj *, int));
#ifdef USE_TRAMPOLI
E void FDECL(set_lit, (int, int, genericptr_t));
#endif
E void FDECL(litroom, (BOOLEAN_P, struct obj *));
E void FDECL(do_genocide, (int));
E void FDECL(punish, (struct obj *));
@@ -2372,7 +2343,7 @@ E void NDECL(finish_paybill);
E struct obj *FDECL(find_oid, (unsigned));
E long FDECL(contained_cost,
(struct obj *, struct monst *, long, BOOLEAN_P, BOOLEAN_P));
E long FDECL(contained_gold, (struct obj *));
E long FDECL(contained_gold, (struct obj *, BOOLEAN_P));
E void FDECL(picked_container, (struct obj *));
E void FDECL(gem_learned, (int));
E void FDECL(alter_cost, (struct obj *, long));
@@ -2381,8 +2352,9 @@ E boolean FDECL(billable, (struct monst **, struct obj *, CHAR_P, BOOLEAN_P));
E void FDECL(addtobill, (struct obj *, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P));
E void FDECL(splitbill, (struct obj *, struct obj *));
E void FDECL(subfrombill, (struct obj *, struct monst *));
E long FDECL(stolen_value,
(struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P, BOOLEAN_P));
E long FDECL(stolen_value, (struct obj *, XCHAR_P, XCHAR_P,
BOOLEAN_P, BOOLEAN_P));
E void FDECL(donate_gold, (long, struct monst *, BOOLEAN_P));
E void FDECL(sellobj_state, (int));
E void FDECL(sellobj, (struct obj *, XCHAR_P, XCHAR_P));
E int FDECL(doinvbill, (int));
@@ -2438,6 +2410,7 @@ E void FDECL(growl, (struct monst *));
E void FDECL(yelp, (struct monst *));
E void FDECL(whimper, (struct monst *));
E void FDECL(beg, (struct monst *));
E const char *FDECL(maybe_gasp, (struct monst *));
E int NDECL(dotalk);
E int NDECL(tiphat);
#ifdef USER_SOUNDS
@@ -2462,7 +2435,8 @@ E boolean FDECL(create_room, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
XCHAR_P, XCHAR_P, XCHAR_P));
E void FDECL(create_secret_door, (struct mkroom *, XCHAR_P));
E boolean FDECL(dig_corridor, (coord *, coord *, BOOLEAN_P, SCHAR_P, SCHAR_P));
E void FDECL(fill_room, (struct mkroom *, BOOLEAN_P));
E void FDECL(fill_special_room, (struct mkroom *));
E void FDECL(wallify_map, (int, int, int, int));
E boolean FDECL(load_special, (const char *));
E xchar FDECL(selection_getpoint, (int, int, struct selectionvar *));
E struct selectionvar *NDECL(selection_new);
@@ -2472,17 +2446,17 @@ E void FDECL(set_selection_floodfillchk, (int FDECL((*), (int,int))));
E void FDECL(selection_floodfill, (struct selectionvar *, int, int,
BOOLEAN_P));
E boolean FDECL(pm_good_location, (int, int, struct permonst *));
E void FDECL(get_location_coord, (schar *, schar *, int, struct mkroom *,
E void FDECL(get_location_coord, (xchar *, xchar *, int, struct mkroom *,
long));
E void FDECL(selection_setpoint, (int, int, struct selectionvar *, XCHAR_P));
E struct selectionvar * FDECL(selection_not, (struct selectionvar *));
E void FDECL(selection_filter_percent, (struct selectionvar *, int));
E int FDECL(selection_rndcoord, (struct selectionvar *, schar *, schar *,
E int FDECL(selection_rndcoord, (struct selectionvar *, xchar *, xchar *,
BOOLEAN_P));
E void FDECL(selection_do_grow, (struct selectionvar *, int));
E void FDECL(selection_do_line, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P,
E void FDECL(selection_do_line, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
struct selectionvar *));
E void FDECL(selection_do_randline, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P,
E void FDECL(selection_do_randline, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
SCHAR_P, SCHAR_P, struct selectionvar *));
E struct selectionvar *FDECL(selection_filter_mapchar, (struct selectionvar *,
XCHAR_P, int));
@@ -2499,9 +2473,6 @@ E void FDECL(l_register_des, (lua_State *));
/* ### spell.c ### */
E void FDECL(book_cursed, (struct obj *));
#ifdef USE_TRAMPOLI
E int NDECL(learn);
#endif
E int FDECL(study_book, (struct obj *));
E void FDECL(book_disappears, (struct obj *));
E void FDECL(book_substitution, (struct obj *, struct obj *));
@@ -2516,10 +2487,6 @@ E void FDECL(initialspell, (struct obj *));
/* ### steal.c ### */
#ifdef USE_TRAMPOLI
E int NDECL(stealarm);
E void NDECL(unstolenarm);
#endif
E long FDECL(somegold, (long));
E void FDECL(stealgold, (struct monst *));
E void NDECL(thiefdead);
@@ -2582,7 +2549,7 @@ E void FDECL(teleds, (int, int, int));
E boolean FDECL(safe_teleds, (int));
E boolean FDECL(teleport_pet, (struct monst *, BOOLEAN_P));
E void NDECL(tele);
E boolean FDECL(scrolltele, (struct obj *));
E void FDECL(scrolltele, (struct obj *));
E int NDECL(dotelecmd);
E int FDECL(dotele, (BOOLEAN_P));
E void NDECL(level_tele);
@@ -2708,6 +2675,7 @@ E boolean NDECL(lava_effects);
E void NDECL(sink_into_lava);
E void NDECL(sokoban_guilt);
E const char * FDECL(trapname, (int, BOOLEAN_P));
E void FDECL(ignite_items, (struct obj *));
/* ### u_init.c ### */
@@ -2724,9 +2692,51 @@ E boolean FDECL(attack, (struct monst *));
E boolean FDECL(hmon, (struct monst *, struct obj *, int, int));
E boolean FDECL(shade_miss, (struct monst *, struct monst *, struct obj *,
BOOLEAN_P, BOOLEAN_P));
E void FDECL(mhitm_ad_rust, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_corr, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_dcay, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_dren, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_drli, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_fire, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_cold, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_elec, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_acid, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_sgld, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_tlpt, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_blnd, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_curs, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_drst, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_drin, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_stck, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_wrap, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_plys, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_slee, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_slim, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_ench, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_slow, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_conf, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_poly, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_famn, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_pest, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_deth, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_halu, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_phys, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_ston, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_were, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_heal, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_stun, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_legs, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_dgst, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_samu, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_dise, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_sedu, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_ssex, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_adtyping, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E boolean FDECL(do_stone_u, (struct monst *));
E void FDECL(do_stone_mon, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E int FDECL(damageum, (struct monst *, struct attack *, int));
E void FDECL(missum, (struct monst *, struct attack *, BOOLEAN_P));
E int FDECL(passive, (struct monst *, struct obj *, BOOLEAN_P, int,
E int FDECL(passive, (struct monst *, struct obj *, BOOLEAN_P, BOOLEAN_P,
UCHAR_P, BOOLEAN_P));
E void FDECL(passive_obj, (struct monst *, struct obj *, struct attack *));
E void FDECL(stumble_onto_mimic, (struct monst *));
@@ -2742,7 +2752,7 @@ E void NDECL(port_help);
E void FDECL(sethanguphandler, (void (*)(int)));
E boolean NDECL(authorize_wizard_mode);
E void FDECL(append_slash, (char *));
E boolean FDECL(check_user_string, (char *));
E boolean FDECL(check_user_string, (const char *));
E char *NDECL(get_login_name);
E unsigned long NDECL(sys_random_seed);
#endif /* UNIX */
@@ -2797,7 +2807,7 @@ E void FDECL(uleftvault, (struct monst *));
E void NDECL(invault);
E int FDECL(gd_move, (struct monst *));
E void FDECL(paygd, (BOOLEAN_P));
E long NDECL(hidden_gold);
E long FDECL(hidden_gold, (BOOLEAN_P));
E boolean NDECL(gd_sound);
E void FDECL(vault_gd_watching, (unsigned int));
@@ -2842,12 +2852,6 @@ E int FDECL(assign_videoshades, (char *));
E int FDECL(assign_videocolors, (char *));
#endif
/* ### vis_tab.c ### */
#ifdef VISION_TABLES
E void NDECL(vis_tab_init);
#endif
/* ### vision.c ### */
E void NDECL(vision_init);
@@ -2926,6 +2930,9 @@ E char *NDECL(verify_termcap);
E void NDECL(privoff);
E void NDECL(privon);
#endif
#ifdef SYSCF
E boolean FDECL(check_user_string, (const char *));
#endif
#ifdef SHELL
E int NDECL(dosh);
#endif
@@ -3074,6 +3081,7 @@ E void FDECL(save_worm, (NHFILE *));
E void FDECL(rest_worm, (NHFILE *));
E void FDECL(place_wsegs, (struct monst *, struct monst *));
E void FDECL(sanity_check_worm, (struct monst *));
E void NDECL(wormno_sanity_check);
E void FDECL(remove_worm, (struct monst *));
E void FDECL(place_worm_tail_randomly, (struct monst *, XCHAR_P, XCHAR_P));
E int FDECL(size_wseg, (struct monst *));
@@ -3088,6 +3096,7 @@ E void FDECL(flip_worm_segs_horizontal, (struct monst *, int, int));
E void FDECL(setworn, (struct obj *, long));
E void FDECL(setnotworn, (struct obj *));
E void NDECL(allunworn);
E struct obj *FDECL(wearmask_to_obj, (long));
E long FDECL(wearslot, (struct obj *));
E void FDECL(mon_set_minvis, (struct monst *));
@@ -3124,6 +3133,7 @@ E int FDECL(unturn_dead, (struct monst *));
E void NDECL(unturn_you);
E void FDECL(cancel_item, (struct obj *));
E boolean FDECL(drain_item, (struct obj *, BOOLEAN_P));
E boolean FDECL(obj_unpolyable, (struct obj *));
E struct obj *FDECL(poly_obj, (struct obj *, int));
E boolean FDECL(obj_resists, (struct obj *, int, int));
E boolean FDECL(obj_shudders, (struct obj *));
@@ -3132,6 +3142,7 @@ E int FDECL(bhito, (struct obj *, struct obj *));
E int FDECL(bhitpile,
(struct obj *, int (*)(OBJ_P, OBJ_P), int, int, SCHAR_P));
E int FDECL(zappable, (struct obj *));
E void NDECL(do_enlightenment_effect);
E void FDECL(zapnodir, (struct obj *));
E int NDECL(dozap);
E int FDECL(zapyourself, (struct obj *, BOOLEAN_P));

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 flag.h $NHDT-Date: 1593953335 2020/07/05 12:48:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.183 $ */
/* NetHack 3.7 flag.h $NHDT-Date: 1600933440 2020/09/24 07:44:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.185 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -52,6 +52,7 @@ struct flag {
* clairvoyance */
boolean rest_on_space; /* space means rest */
boolean safe_dog; /* give complete protection to the dog */
boolean safe_wait; /* prevent wait or search next to hostile */
boolean showexp; /* show experience points */
boolean showscore; /* show score */
boolean silent; /* whether the bell rings or not */
@@ -79,6 +80,7 @@ struct flag {
#define PARANOID_EATING 0x0200
int pickup_burden; /* maximum burden before prompt */
int pile_limit; /* controls feedback when walking over objects */
char discosort; /* order of dodiscovery/doclassdisco output: o,s,c,a */
char sortloot; /* 'n'=none, 'l'=loot (pickup), 'f'=full ('l'+invent) */
char inv_order[MAXOCLASSES];
char pickup_types[MAXOCLASSES];
@@ -92,8 +94,7 @@ struct flag {
char end_disclose[NUM_DISCLOSURE_OPTIONS + 1]; /* disclose various
info upon exit */
char menu_style; /* User interface style setting */
boolean made_fruit; /* don't easily let the user overflow the number of
fruits */
boolean made_fruit; /* don't easily let user overflow fruit limit */
/* KMH, role patch -- Variables used during startup.
*
@@ -238,6 +239,7 @@ struct instance_flags {
* disable to avoid excessive noise when using
* a screen reader (use ^X to review status) */
boolean toptenwin; /* ending list in window instead of stdout */
boolean tux_penalty; /* True iff hero is a monk and wearing a suit */
boolean use_background_glyph; /* use background glyph when appropriate */
boolean use_menu_color; /* use color in menus; only if wc_color */
#ifdef STATUS_HILITES
@@ -292,6 +294,7 @@ struct instance_flags {
boolean cmdassist; /* provide detailed assistance for some comnds */
boolean time_botl; /* context.botl for 'time' (moves) only */
boolean wizweight; /* display weight of everything in wizard mode */
boolean wizmgender; /* test gender info from core in window port */
/*
* Window capability support.
*/
@@ -407,6 +410,7 @@ enum plnmsg_types {
PLNMSG_OBJNAM_ONLY, /* xname/doname only, for #tip */
PLNMSG_OK_DONT_DIE, /* overriding death in explore/wizard mode */
PLNMSG_BACK_ON_GROUND, /* leaving water */
PLNMSG_GROWL, /* growl() gave some message */
PLNMSG_enum /* allows inserting new entries with unconditional trailing comma */
};

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 func_tab.h $NHDT-Date: 1543797823 2018/12/03 00:43:43 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.11 $ */
/* NetHack 3.7 func_tab.h $NHDT-Date: 1596498537 2020/08/03 23:48:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2016. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -49,9 +49,8 @@
#endif /* DUMB */
/*
* type xchar: small integers in the range 0 - 127, usually coordinates
* although they are nonnegative they must not be declared unsigned
* since otherwise comparisons with signed quantities are done incorrectly
* type xchar: small integers (typedef'd as signed char,
* so in the range -127 - 127), usually coordinates.
*/
typedef schar xchar;
@@ -166,6 +165,10 @@ extern struct cross_target_s cross_target;
#include "ntconf.h"
#endif
#ifdef AMIGA
#include "amiconf.h"
#endif
/* Displayable name of this port; don't redefine if defined in *conf.h */
#ifndef PORT_ID
#ifdef AMIGA
@@ -213,11 +216,13 @@ extern struct cross_target_s cross_target;
#endif
#endif
#if !defined(CROSSCOMPILE)
#if defined(MICRO)
#if !defined(AMIGA) && !defined(TOS) && !defined(OS2_HPFS)
#define SHORT_FILENAMES /* filenames are 8.3 */
#endif
#endif
#endif
#ifdef VMS
/* vms_exit() (sys/vms/vmsmisc.c) expects the non-VMS EXIT_xxx values below.
@@ -365,6 +370,13 @@ struct savefile_info {
#define TBUFSZ 300 /* g.toplines[] buffer max msg: 3 81char names */
/* plus longest prefix plus a few extra words */
/* COLBUFSZ is the larger of BUFSZ and COLNO */
#if BUFSZ > COLNO
#define COLBUFSZ BUFSZ
#else
#define COLBUFSZ COLNO
#endif
#define PL_NSIZ 32 /* name of player, ghost, shopkeeper */
#define PL_CSIZ 32 /* sizeof pl_character */
#define PL_FSIZ 32 /* fruit name */
@@ -393,11 +405,14 @@ struct savefile_info {
#ifdef UNIX
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
/* see end.c */
#if !defined(CROSS_TO_WASM)
#ifndef PANICTRACE
#define PANICTRACE
#endif
#endif
#endif
#endif /* PANICTRACE */
#endif /* CROSS_TO_WASM */
#endif /* NH_DEVEL_STATUS != NH_STATUS_RELEASED */
#endif /* UNIX */
/* The following are meaningless if PANICTRACE is not defined: */
#if defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ >= 2)
#define PANICTRACE_LIBC
@@ -406,8 +421,10 @@ struct savefile_info {
#define PANICTRACE_LIBC
#endif
#ifdef UNIX
#if !defined(CROSS_TO_WASM) /* no popen in WASM */
#define PANICTRACE_GDB
#endif
#endif
/* Supply nethack_enter macro if not supplied by port */
#ifndef nethack_enter
@@ -416,8 +433,8 @@ struct savefile_info {
/* Supply nhassert macro if not supplied by port */
#ifndef nhassert
#define nhassert(e) ((void)0)
#define nhassert(expression) (void)((!!(expression)) || \
(nhassert_failed(#expression, __FILE__, __LINE__), 0))
#endif
#endif /* GLOBAL_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 hack.h $NHDT-Date: 1591178395 2020/06/03 09:59:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.138 $ */
/* NetHack 3.7 hack.h $NHDT-Date: 1601595709 2020/10/01 23:41:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.141 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -79,24 +79,6 @@ enum dismount_types {
DISMOUNT_BYCHOICE = 6
};
/* mgflags for mapglyph() */
#define MG_FLAG_NORMAL 0x00
#define MG_FLAG_NOOVERRIDE 0x01
/* Special returns from mapglyph() */
#define MG_CORPSE 0x0001
#define MG_INVIS 0x0002
#define MG_DETECT 0x0004
#define MG_PET 0x0008
#define MG_RIDDEN 0x0010
#define MG_STATUE 0x0020
#define MG_OBJPILE 0x0040 /* more than one stack of objects */
#define MG_BW_LAVA 0x0080 /* 'black & white lava': highlight lava if it
can't be distringuished from water by color */
#define MG_BW_ICE 0x0100 /* similar for ice vs floor */
#define MG_NOTHING 0x0200 /* char represents GLYPH_NOTHING */
#define MG_UNEXPL 0x0400 /* char represents GLYPH_UNEXPLORED */
/* sellobj_state() states */
#define SELL_NORMAL (0)
#define SELL_DELIBERATE (1)
@@ -216,6 +198,9 @@ typedef struct {
#define SYM_OFF_X (SYM_OFF_W + WARNCOUNT)
#define SYM_MAX (SYM_OFF_X + MAXOTHER)
/* glyphmod entries */
enum { GM_FLAGS, GM_TTYCHAR, GM_COLOR, NUM_GLYPHMOD };
#include "rect.h"
#include "region.h"
#include "decl.h"
@@ -272,23 +257,10 @@ typedef struct sortloot_item Loot;
#include "display.h"
#include "engrave.h"
#ifdef USE_TRAMPOLI /* this doesn't belong here, but we have little choice */
#undef NDECL
#define NDECL(f) f()
#endif
#include "extern.h"
#include "winprocs.h"
#include "sys.h"
#ifdef USE_TRAMPOLI
#include "wintty.h"
#undef WINTTY_H
#include "trampoli.h"
#undef EXTERN_H
#include "extern.h"
#endif /* USE_TRAMPOLI */
/* flags to control makemon(); goodpos() uses some plus has some of its own*/
#define NO_MM_FLAGS 0x000000L /* use this rather than plain 0 */
#define NO_MINVENT 0x000001L /* suppress minvent when creating mon */
@@ -306,10 +278,12 @@ typedef struct sortloot_item Loot;
#define MM_ASLEEP 0x002000L /* monsters should be generated asleep */
#define MM_NOGRP 0x004000L /* suppress creation of monster groups */
#define MM_NOTAIL 0x008000L /* if a long worm, don't give it a tail */
#define MM_MALE 0x010000L /* male variation */
#define MM_FEMALE 0x020000L /* female variation */
/* if more MM_ flag masks are added, skip or renumber the GP_ one(s) */
#define GP_ALLOW_XY 0x010000L /* [actually used by enexto() to decide whether
#define GP_ALLOW_XY 0x040000L /* [actually used by enexto() to decide whether
* to make an extra call to goodpos()] */
#define GP_ALLOW_U 0x020000L /* don't reject hero's location */
#define GP_ALLOW_U 0x080000L /* don't reject hero's location */
/* flags for make_corpse() and mkcorpstat() */
#define CORPSTAT_NONE 0x00
@@ -346,27 +320,29 @@ typedef struct sortloot_item Loot;
#define ALL_FINISHED 0x01 /* called routine already finished the job */
/* flags to control query_objlist() */
#define BY_NEXTHERE 0x01 /* follow objlist by nexthere field */
#define AUTOSELECT_SINGLE 0x02 /* if only 1 object, don't ask */
#define USE_INVLET 0x04 /* use object's invlet */
#define INVORDER_SORT 0x08 /* sort objects by packorder */
#define SIGNAL_NOMENU 0x10 /* return -1 rather than 0 if none allowed */
#define SIGNAL_ESCAPE 0x20 /* return -2 rather than 0 for ESC */
#define FEEL_COCKATRICE 0x40 /* engage cockatrice checks and react */
#define INCLUDE_HERO 0x80 /* show hero among engulfer's inventory */
#define BY_NEXTHERE 0x0001 /* follow objlist by nexthere field */
#define INCLUDE_VENOM 0x0002 /* include venom objects if present */
#define AUTOSELECT_SINGLE 0x0004 /* if only 1 object, don't ask */
#define USE_INVLET 0x0008 /* use object's invlet */
#define INVORDER_SORT 0x0010 /* sort objects by packorder */
#define SIGNAL_NOMENU 0x0020 /* return -1 rather than 0 if none allowed */
#define SIGNAL_ESCAPE 0x0040 /* return -2 rather than 0 for ESC */
#define FEEL_COCKATRICE 0x0080 /* engage cockatrice checks and react */
#define INCLUDE_HERO 0x0100 /* show hero among engulfer's inventory */
/* Flags to control query_category() */
/* BY_NEXTHERE used by query_category() too, so skip 0x01 */
#define UNPAID_TYPES 0x002
#define GOLD_TYPES 0x004
#define WORN_TYPES 0x008
#define ALL_TYPES 0x010
#define BILLED_TYPES 0x020
#define CHOOSE_ALL 0x040
#define BUC_BLESSED 0x080
#define BUC_CURSED 0x100
#define BUC_UNCURSED 0x200
#define BUC_UNKNOWN 0x400
/* BY_NEXTHERE and INCLUDE_VENOM are used by query_category() too, so
skip 0x0001 and 0x0002 */
#define UNPAID_TYPES 0x0004
#define GOLD_TYPES 0x0008
#define WORN_TYPES 0x0010
#define ALL_TYPES 0x0020
#define BILLED_TYPES 0x0040
#define CHOOSE_ALL 0x0080
#define BUC_BLESSED 0x0100
#define BUC_CURSED 0x0200
#define BUC_UNCURSED 0x0400
#define BUC_UNKNOWN 0x0800
#define BUC_ALLBKNOWN (BUC_BLESSED | BUC_CURSED | BUC_UNCURSED)
#define BUCX_TYPES (BUC_ALLBKNOWN | BUC_UNKNOWN)
#define ALL_TYPES_SELECTED -2
@@ -561,6 +537,6 @@ enum optset_restrictions {
#endif
#define DEVTEAM_EMAIL "devteam@nethack.org"
#define DEVTEAM_URL "http://www.nethack.org"
#define DEVTEAM_URL "https://www.nethack.org/"
#endif /* HACK_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 integer.h $NHDT-Date: 1551901047 2019/03/06 19:37:27 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.7 $ */
/* NetHack 3.7 integer.h $NHDT-Date: 1596498539 2020/08/03 23:48:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $ */
/* Copyright (c) 2016 by Michael Allison */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 lint.h $NHDT-Date: 1524689514 2018/04/25 20:51:54 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.5 $ */
/* NetHack 3.7 lint.h $NHDT-Date: 1596498539 2020/08/03 23:48:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.6 $ */
/* Copyright (c) 2016 by Robert Patrick Rankin */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,33 +0,0 @@
/* NetHack 3.6 mac-carbon.h $NHDT-Date: 1432512777 2015/05/25 00:12:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */
/*-Copyright (c) Kevin Hugo, 2003. */
/* NetHack may be freely redistributed. See license for details. */
/* Compiler prefix file for the Macintosh Carbon port.
*
* IMPORTANT: This file is intended only as a compiler prefix
* file and must NEVER be included by other source (.c or .h)
* files.
*
* Usage for MacOS X Project Builder:
* Project menu -> Edit Active Target '_target_' ->
* target settings dialog -> Settings -> Simple View ->
* GCC Compiler Settings ->
* set "Prefix Header" to include/mac-carbon.h
*
* Usage for Metrowerks CodeWarrior:
* Edit menu -> _target_ Settings -> Language Settings ->
* C/C++ Language ->
* set "Prefix File" to include/mac-carbon.h
*/
#define MAC
#undef UNIX
/* May already be defined by CodeWarrior as 0 or 1 */
#ifdef TARGET_API_MAC_CARBON
#undef TARGET_API_MAC_CARBON
#endif
#define TARGET_API_MAC_CARBON 1
#define GCC_WARN

View File

@@ -1,34 +0,0 @@
/* NetHack 3.6 mac-qt.h $NHDT-Date: 1432512776 2015/05/25 00:12:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */
/*-Copyright (c) Kevin Hugo, 2003. */
/* NetHack may be freely redistributed. See license for details. */
/* Compiler prefix file for the Macintosh Qt port.
*
* IMPORTANT: This file is intended only as a compiler prefix
* file and must NEVER be included by other source (.c or .h)
* files.
*
* Usage for MacOS X Project Builder:
* Project menu -> Edit Active Target '_target_' ->
* target settings dialog -> Settings -> Simple View ->
* GCC Compiler Settings ->
* set "Prefix Header" to include/mac-qt.h
*
* Usage for Metrowerks CodeWarrior:
* Edit menu -> _target_ Settings -> Language Settings ->
* C/C++ Language ->
* set "Prefix File" to include/mac-qt.h
*/
#undef MAC
#define UNIX
#define BSD
/* May already be defined by CodeWarrior as 0 or 1 */
#ifdef TARGET_API_MAC_CARBON
#undef TARGET_API_MAC_CARBON
#endif
#define TARGET_API_MAC_CARBON 0
#define GCC_WARN

View File

@@ -1,35 +0,0 @@
/* NetHack 3.6 mac-term.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */
/*-Copyright (c) Kevin Hugo, 2003. */
/* NetHack may be freely redistributed. See license for details. */
/* Compiler prefix file for the MacOS X Terminal.app port.
*
* IMPORTANT: This file is intended only as a compiler prefix
* file and must NEVER be included by other source (.c or .h)
* files.
*
* Usage for MacOS X Project Builder:
* Project menu -> Edit Active Target '_target_' ->
* target settings dialog -> Settings -> Simple View ->
* GCC Compiler Settings ->
* set "Prefix Header" to include/mac-term.h
*
* Usage for Metrowerks CodeWarrior:
* Edit menu -> _target_ Settings -> Language Settings ->
* C/C++ Language ->
* set "Prefix File" to include/mac-term.h
*/
/* Stuff needed for the core of NetHack */
#undef MAC
#define UNIX
#define BSD
#define __FreeBSD__ /* Darwin is based on FreeBSD */
#define GCC_WARN
/* May already be defined by CodeWarrior as 0 or 1 */
#ifdef TARGET_API_MAC_CARBON
#undef TARGET_API_MAC_CARBON
#endif
#define TARGET_API_MAC_CARBON 0 /* Not Carbon */

View File

@@ -1,15 +0,0 @@
/* NetHack 3.6 macpopup.h $NHDT-Date: 1432512781 2015/05/25 00:13:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) Nethack Development Team, 1999. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef MACPOPUP_H
#define MACPOPUP_H
/* ### mmodal.c ### */
extern void FlashButton(DialogRef, short);
extern char queued_resp(char *resp);
extern char topl_yn_function(const char *query, const char *resp, char def);
extern int get_line_from_key_queue(char *bufp);
#endif /* MACPOPUP_H */

View File

@@ -1,345 +0,0 @@
/* NetHack 3.6 mactty.h $NHDT-Date: 1447755970 2015/11/17 10:26:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Jon W{tte 1993. */
/* NetHack may be freely redistributed. See license for details. */
/*
* This header is the supported external interface for the "tty" window
* package. This package sports care-free handling of "dumb" tty windows
* (preferably using monospaced fonts) - it does NOT remember the strings
* sent to it; rather, it uses an offscreen bitmap.
*
* For best performance, make sure it is aligned on a 32-pixel boundary
* (or at least a 16-pixel one) in black & white. For 24bit color,
* alignment doesn't matter, and for 8-bit color, alignment to every
* fourth pixel is most efficient.
*
* (c) Copyright 1993 Jon W{tte
*/
/*
* You should really not poke in the structures used by the tty window.
* However, since it uses the wRefCon of windows (by calling GetWRefCon
* and SetWRefCon) you lose that possibility. If you still want to store
* information about a window, the FIRST location _pointed to_ by the
* wRefCon will be a void * that you can use for whatever reasons. Don't
* take the address of this variable and expect it to stay the same
* across calls to the tty window.
*
* void * my_config_ptr = * ( void * * ) GetWRefCon ( tty_window ) ;
*/
/*
* The library uses the window's port temporarily through SetPortBits;
* that means you shouldn't do any funky things to the clipping region
* etc. Actually, you shouldn't even resize the window, as that will clip
* new drawing.
*
* Also, if you use this library under Pascal, remember that the string
* passed to add_tty_string() is a "C" style string with NO length byte,
* and a terminating zero byte at the end instead.
*/
#ifndef _H_tty_public
#define _H_tty_public
#undef red /* undef internal color const strings from decl */
#undef green
#undef blue
#if 1 /*!TARGET_API_MAC_CARBON*/
#include <windows.h>
#endif
/*
* Error code returned when it's probably our fault, or
* bad parameters.
*/
#define general_failure 1
/*
* Base resource id's for window types
*/
#define WIN_BASE_RES 128
#define WIN_BASE_KIND 128
/*
* Commonly used characters
*/
#define CHAR_ENTER ((char) 3)
#define CHAR_BELL ((char) 7)
#define CHAR_BS ((char) 8)
#define CHAR_LF ((char) 10)
#define CHAR_CR ((char) 13)
#define CHAR_ESC ((char) 27)
#define CHAR_BLANK ((char) 32)
#define CHAR_DELETE ((char) 127)
extern char game_active; /* flag to window rendering routines
not to use ppat */
/*
* If you want some fancy operations that not a normal TTY device normally
* supports, use EXTENDED_SUPPORT. For frames, area erases and area scrolls,
* plus bitmap graphics - RESOLUTION DEPENDENT, be sure to call
* get_tty_metrics and use those limits.
*/
#define EXTENDED_SUPPORT 0
/*
* if you print a lot of single characters, accumulating each one in a
* clipping region will take too much time. Instead, define this, which
* will clip in rects.
*/
#define CLIP_RECT_ONLY 1
typedef enum tty_attrib {
/*
* Flags relating to the general functioning of the window.
* These flags are passed at create_tty time, and changing them
* later will clear the screen.
*/
TTY_ATTRIB_FLAGS,
/*
* When using proportional fonts, this will place each character
* separately, ensuring aligned columns (but looking ugly and taking
* time)
*/
#define TA_MOVE_EACH_CHAR 1L
/*
* This means draw each change as it occurs instead of collecting the area
* and draw it all at once at update_tty() - slower, but more reliable.
*/
#define TA_ALWAYS_REFRESH 2L
/*
* When reaching the right end, we either just stop drawing, or wrap to the
* next line.
*/
#define TA_WRAP_AROUND 4L
/*
* Overstrike means that characters are added on top of each other; i e don't
* clear the letter beneath. This is faster, using srcOr under QuickDraw
*/
#define TA_OVERSTRIKE 8L
/*
* We may want the window not to scroll when we reach the end line,
* but stop drawing instead.
*/
#define TA_INHIBIT_VERT_SCROLL 16L
/*
* Foreground and background colors. These only affect characters
* drawn by subsequent calls; not what's already there (but it does
* affect clears)
* On b/w screens these do nothing.
*/
TTY_ATTRIB_FOREGROUND,
TTY_ATTRIB_BACKGROUND,
#define TA_RGB_TO_TTY(r) \
((((long) ((r).red >> 8) & 0xff) << 16) \
+ (((long) ((r).green >> 8) & 0xff) << 8) \
+ ((long) ((r).blue >> 8) & 0xff))
/*
* Attributes relating to the cursor, and character set mappings
*/
TTY_ATTRIB_CURSOR,
/*
* Blinking cursor is more noticeable when it's idle
*/
#define TA_BLINKING_CURSOR 1L
/*
* When handling input, do we echo characters as they are typed?
*/
#define TA_ECHO_INPUT 2L
/*
* Do we return each character code separately, or map delete etc? Note
* that non-raw input means getchar won't return anything until the user
* has typed a return.
*/
#define TA_RAW_INPUT 4L
/*
* Do we print every character as it is (including BS, NL and CR!) or do
* do we interpret characters such as NL, BS and CR?
*/
#define TA_RAW_OUTPUT 8L
/*
* When getting a NL, do we also move to the left?
*/
#define TA_NL_ADD_CR 16L
/*
* When getting a CR, do we also move down?
*/
#define TA_CR_ADD_NL 32L
/*
* Wait for input or return what we've got?
*/
#define TA_NONBLOCKING_IO 64L
/*
* Use this macro to cast a function pointer to a tty attribute; this will
* help portability to systems where a function pointer doesn't fit in a long
*/
#define TA_ATTRIB_FUNC(x) ((long) (x))
/*
* This symbolic constant is used to check the number of attributes
*/
TTY_NUMBER_ATTRIBUTES
} tty_attrib;
/*
* Character returned by end-of-file condition
*/
#define TTY_EOF -1
/*
* Create the window according to a resource WIND template.
* The window pointer pointed to by window should be NULL to
* allocate the window record dynamically, or point to a
* WindowRecord structure already allocated.
*
* Passing in_color means you have to be sure there's color support;
* on the Mac, this means 32bit QuickDraw present, else it will
* crash. Not passing in_color means everything's rendered in
* black & white.
*/
extern short create_tty(WindowPtr *window, short resource_id,
Boolean in_color);
/*
* Use init_tty_name or init_tty_number to initialize a window
* once allocated by create_tty. Size parameters are in characters.
*/
extern short init_tty_number(WindowPtr window, short font_number,
short font_size, short x_size, short y_size);
/*
* Close and deallocate a window and its data
*/
extern short destroy_tty(WindowPtr window);
/*
* Change the font and font size used in the window for drawing after
* the calls are made. To change the coordinate system, be sure to call
* force_tty_coordinate_system_recalc() - else it may look strange if
* the new font doesn't match the old one.
*/
extern short set_tty_font_name(winid window_type, char *name);
extern short force_tty_coordinate_system_recalc(WindowPtr window);
/*
* Getting some metrics about the tty and its drawing.
*/
extern short get_tty_metrics(WindowPtr window, short *x_size, short *y_size,
short *x_size_pixels, short *y_size_pixels,
short *font_number, short *font_size,
short *char_width, short *row_height);
/*
* The basic move cursor function. 0,0 is topleft.
*/
extern short move_tty_cursor(WindowPtr window, short x_pos, short y_pos);
/*
* Flush all changes done to a tty to the screen (see TA_ALWAYS_UPDATE above)
*/
extern short update_tty(WindowPtr window);
/*
* Add a character to the tty and update the cursor position
*/
extern short add_tty_char(WindowPtr window, short character);
/*
* Add a string of characters to the tty and update the cursor
* position. The string is 0-terminated!
*/
extern short add_tty_string(WindowPtr window, const char *string);
/*
* Change or read an attribute of the tty. Note that some attribute changes
* may clear the screen. See the above enum and defines for values.
* Attributes can be both function pointers and special flag values.
*/
extern short get_tty_attrib(WindowPtr window, tty_attrib attrib, long *value);
extern short set_tty_attrib(WindowPtr window, tty_attrib attrib, long value);
/*
* Scroll the actual TTY image, in characters, positive means up/left
* scroll_tty ( my_tty , 0 , 1 ) means a linefeed. Is always carried out
* directly, regardless of the wait-update setting. Does updates before
* scrolling.
*/
extern short scroll_tty(WindowPtr window, short delta_x, short delta_y);
/*
* Erase the offscreen bitmap and move the cursor to 0,0. Re-init some window
* values (font etc) Is always carried out directly on-screen, regardless of
* the wait-for-update setting. Clears update area.
*/
extern short clear_tty(WindowPtr window);
/*
* Call this routine with a window (always _mt_window) and a time (usually
* from most recent event) to determine if cursor in window should be blinked
*/
extern short blink_cursor(WindowPtr window, long when);
/*
* For screen dumps, open the printer port and call this function. Can be used
* for clipboard as well (only for a PICT, though; this library doesn't
* concern
* itself with characters, just bitmaps)
*/
extern short image_tty(EventRecord *theEvent, WindowPtr window);
/*
* For erasing just an area of characters
*/
extern short clear_tty_window(WindowPtr window, short from_row,
short from_col, short to_row, short to_col);
/*
* get and set the invalid region of the main window
*/
extern short get_invalid_region(WindowPtr window, Rect *inval_rect);
extern short set_invalid_region(WindowPtr window, Rect *inval_rect);
#if EXTENDED_SUPPORT
/*
* Various versions of delete character/s, insert line/s etc can be handled by
* this general-purpose function. Negative num_ means delete, positive means
* insert, and you can never be sure which of row and col operations come
* first
* if you specify both...
*/
extern short mangle_tty_rows_columns(WindowPtr window, short from_row,
short num_rows, short from_col,
short num_cols);
/*
* For framing an area without using grahpics characters.
* Note that the given limits are those used for framing, you should not
* draw in them. frame_fatness should typically be 1-5, and may be clipped
* if it is too large.
*/
extern short frame_tty_window(WindowPtr window, short from_row,
short from_col, short to_row, short to_col,
short frame_fatness);
/*
* For inverting specific characters after the fact. May look funny in color.
*/
extern short invert_tty_window(WindowPtr window, short from_row,
short from_col, short to_row, short to_col);
/*
* For drawing lines on the tty - VERY DEVICE DEPENDENT. Use get_tty_metrics.
*/
extern short draw_tty_line(WindowPtr window, short from_x, short from_y,
short to_x, short to_y);
#endif /* EXTENDED_SUPPORT */
#endif /* _H_tty_public */

View File

@@ -1,247 +0,0 @@
/* NetHack 3.6 macwin.h $NHDT-Date: 1447755970 2015/11/17 10:26:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kevin Hugo, 2003. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef MACWIN_H
#define MACWIN_H
#undef red /* undef internal color const strings from decl */
#undef green
#undef blue
#ifndef __MACH__
#include <windows.h>
#include <dialogs.h>
#endif
/* more headers */
#ifdef THINK_C
#include <pascal.h> /* for CtoPStr and PtoCStr */
#endif
/* resources */
#define PLAYER_NAME_RES_ID 1001
/* fake some things if we don't have universal headers.. */
#if 0 /*ndef NewUserItemProc*/
typedef pascal void (*UserItemProcPtr)(WindowPtr theWindow, short itemNo);
typedef UserItemProcPtr UserItemUPP;
#define NewUserItemProc(p) (UserItemUPP)(p)
typedef pascal void (*ControlActionProcPtr)(ControlHandle theControl,
short partCode);
typedef ControlActionProcPtr ControlActionUPP;
#define NewControlActionProc(p) (ControlActionUPP)(p)
typedef ModalFilterProcPtr ModalFilterUPP;
#define DisposeRoutineDescriptor(p)
#endif
/* misc */
#ifdef __MWERKS__
#define ResumeProcPtr long /* for call to InitDialogs */
#endif
/* working dirs structure */
typedef struct macdirs {
Str32 dataName;
short dataRefNum;
long dataDirID;
Str32 saveName;
short saveRefNum;
long saveDirID;
Str32 levelName;
short levelRefNum;
long levelDirID;
} MacDirs;
typedef struct macflags {
Bitfield(processes, 1);
Bitfield(color, 1);
Bitfield(folders, 1);
Bitfield(tempMem, 1);
Bitfield(help, 1);
Bitfield(fsSpec, 1);
Bitfield(trueType, 1);
Bitfield(aux, 1);
Bitfield(alias, 1);
Bitfield(standardFile, 1);
Bitfield(hasDebugger, 1);
Bitfield(hasAE, 1);
Bitfield(gotOpen, 1);
} MacFlags;
extern MacDirs theDirs; /* used in macfile.c */
extern MacFlags macFlags;
/*
* Mac windows
*/
#define NUM_MACWINDOWS 15
#define TEXT_BLOCK 512L
/* Window constants */
#define kMapWindow 0
#define kStatusWindow 1
#define kMessageWindow 2
#define kTextWindow 3
#define kMenuWindow 4
#define kLastWindowKind kMenuWindow
/*
* This determines the minimum logical line length in text windows
* That is; even if physical width is less, this is where line breaks
* go at the minimum. 350 is about right for score lines with a
* geneva 10 pt font.
*/
#define MIN_RIGHT 350
typedef struct {
anything id;
char accelerator;
char groupAcc;
short line;
} MacMHMenuItem;
typedef struct NhWindow {
WindowPtr its_window;
short font_number;
short font_size;
short char_width;
short row_height;
short ascent_height;
short x_size;
short y_size;
short x_curs;
short y_curs;
short last_more_lin; /* Used by message window */
short save_lin; /* Used by message window */
short miSize; /* size of menu items arrays */
short miLen; /* number of menu items in array */
MacMHMenuItem **menuInfo; /* Used by menus (array handle) */
char menuChar; /* next menu accelerator to use */
short **menuSelected; /* list of selected elements from list */
short miSelLen; /* number of items selected */
short how; /* menu mode */
char drawn;
Handle windowText;
long windowTextLen;
short scrollPos;
ControlHandle scrollBar;
} NhWindow;
extern Boolean CheckNhWin(WindowPtr mac_win);
#define NUM_STAT_ROWS 2
#define NUM_ROWS 22
#define NUM_COLS 80 /* We shouldn't use column 0 */
#define QUEUE_LEN 24
extern NhWindow *theWindows;
extern struct window_procs mac_procs;
#define NHW_BASE 0
extern winid BASE_WINDOW, WIN_MAP, WIN_MESSAGE, WIN_INVEN, WIN_STATUS;
/*
* External declarations for the window routines.
*/
#define E extern
/* ### dprintf.c ### */
extern void dprintf(char *, ...);
/* ### maccurs.c ### */
extern Boolean RetrievePosition(short, short *, short *);
extern Boolean RetrieveSize(short, short, short, short *, short *);
extern void SaveWindowPos(WindowPtr);
extern void SaveWindowSize(WindowPtr);
extern Boolean FDECL(RetrieveWinPos, (WindowPtr, short *, short *));
/* ### macerrs.c ### */
extern void showerror(char *, const char *);
extern Boolean itworked(short);
extern void mustwork(short);
extern void attemptingto(char *);
/* appear to be unused
extern void comment(char *,long);
extern void pushattemptingto(char *);
extern void popattempt(void);
*/
/* ### macfile.c ### */
/* extern char *macgets(int fd, char *ptr, unsigned len); unused */
extern void FDECL(C2P, (const char *c, unsigned char *p));
extern void FDECL(P2C, (const unsigned char *p, char *c));
/* ### macmenu.c ### */
extern void DoMenuEvt(long);
extern void InitMenuRes(void);
extern void AdjustMenus(short);
#define DimMenuBar() AdjustMenus(1)
#define UndimMenuBar() AdjustMenus(0)
/* ### macmain.c ### */
extern void FDECL(process_openfile,
(short s_vol, long s_dir, Str255 fNm, OSType ft));
/* ### macwin.c ### */
extern void AddToKeyQueue(unsigned char, Boolean);
extern unsigned char GetFromKeyQueue(void);
void trans_num_keys(EventRecord *);
extern void NDECL(InitMac);
int FDECL(try_key_queue, (char *));
void FDECL(enter_topl_mode, (char *));
void FDECL(leave_topl_mode, (char *));
void FDECL(topl_set_resp, (char *, char));
Boolean FDECL(topl_key, (unsigned char, Boolean));
E void FDECL(HandleEvent, (EventRecord *)); /* used in mmodal.c */
extern void NDECL(port_help);
extern Boolean small_screen;
E void FDECL(mac_init_nhwindows, (int *, char **));
E void NDECL(mac_askname);
E void NDECL(mac_get_nh_event);
E void FDECL(mac_exit_nhwindows, (const char *));
E winid FDECL(mac_create_nhwindow, (int));
E void FDECL(mac_clear_nhwindow, (winid));
E void FDECL(mac_display_nhwindow, (winid, BOOLEAN_P));
E void FDECL(mac_destroy_nhwindow, (winid));
E void FDECL(mac_curs, (winid, int, int));
E void FDECL(mac_putstr, (winid, int, const char *));
E void FDECL(mac_start_menu, (winid, unsigned long mbehavior));
E void FDECL(mac_add_menu, (winid, int, const anything *, CHAR_P, CHAR_P, int,
const char *, unsigned int));
E void FDECL(mac_end_menu, (winid, const char *));
E int FDECL(mac_select_menu, (winid, int, menu_item **));
#ifdef CLIPPING
E void FDECL(mac_cliparound, (int, int));
#endif
E int NDECL(mac_nhgetch);
E int FDECL(mac_nh_poskey, (int *, int *, int *));
E int NDECL(mac_doprev_message);
E char FDECL(mac_yn_function, (const char *, const char *, CHAR_P));
E void FDECL(mac_getlin, (const char *, char *));
E int NDECL(mac_get_ext_cmd);
E void FDECL(mac_number_pad, (int));
E void NDECL(mac_delay_output);
#undef E
#endif /* ! MACWIN_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mail.h $NHDT-Date: 1524689515 2018/04/25 20:51:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.9 $ */
/* NetHack 3.7 mail.h $NHDT-Date: 1596498544 2020/08/03 23:49:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) 2015 by Kenneth Lorber */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mextra.h $NHDT-Date: 1574722861 2019/11/25 23:01:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.24 $ */
/* NetHack 3.7 mextra.h $NHDT-Date: 1596498545 2020/08/03 23:49:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.30 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -19,7 +19,9 @@
* file.
* 3. Add a referencing macro at bottom of this file after the mextra
* struct (see MNAME, EGD, EPRI, ESHK, EMIN, or EDOG for examples).
* 4. Create a newXX(mtmp) function and possibly a free_XX(mtmp)
* 4. If your new field isn't a pointer and requires a non-zero value
* on initialization, add code to init_mextra() in src/makemon.c
* 5. Create a newXX(mtmp) function and possibly a free_XX(mtmp)
* function in an appropriate new or existing source file and add
* a prototype for it to include/extern.h.
*
@@ -39,7 +41,7 @@
* }
* }
*
* 5. Consider adding a new makemon flag MM_XX flag to include/hack.h
* 6. Consider adding a new makemon flag MM_XX flag to include/hack.h
* and a corresponding change to makemon() if you require your
* structure to be added at monster creation time. Initialize your
* struct after a successful return from makemon().
@@ -47,14 +49,14 @@
* src/makemon.c: if (mmflags & MM_XX) newXX(mtmp);
* your new code: mon = makemon(&mons[mnum], x, y, MM_XX);
*
* 6. Adjust size_monst() in src/cmd.c appropriately.
* 7. Adjust dealloc_mextra() in src/mon.c to clean up
* 7. Adjust size_monst() in src/cmd.c appropriately.
* 8. Adjust dealloc_mextra() in src/mon.c to clean up
* properly during monst deallocation.
* 8. Adjust copy_mextra() in src/mon.c to make duplicate
* 9. Adjust copy_mextra() in src/mon.c to make duplicate
* copies of your struct or data on another monst struct.
* 9. Adjust restmon() in src/restore.c to deal with your
* 10. Adjust restmon() in src/restore.c to deal with your
* struct or data during a restore.
* 10. Adjust savemon() in src/save.c to deal with your
* 11. Adjust savemon() in src/save.c to deal with your
* struct or data during a save.
*/
@@ -173,7 +175,7 @@ struct edog {
** mextra.h -- collection of all monster extensions
*/
struct mextra {
char *mname;
char *mgivenname;
struct egd *egd;
struct epri *epri;
struct eshk *eshk;
@@ -184,7 +186,7 @@ struct mextra {
* or an alignment mask for one posing as an altar */
};
#define MNAME(mon) ((mon)->mextra->mname)
#define MGIVENNAME(mon) ((mon)->mextra->mgivenname)
#define EGD(mon) ((mon)->mextra->egd)
#define EPRI(mon) ((mon)->mextra->epri)
#define ESHK(mon) ((mon)->mextra->eshk)
@@ -192,7 +194,7 @@ struct mextra {
#define EDOG(mon) ((mon)->mextra->edog)
#define MCORPSENM(mon) ((mon)->mextra->mcorpsenm)
#define has_mname(mon) ((mon)->mextra && MNAME(mon))
#define has_mgivenname(mon) ((mon)->mextra && MGIVENNAME(mon))
#define has_egd(mon) ((mon)->mextra && EGD(mon))
#define has_epri(mon) ((mon)->mextra && EPRI(mon))
#define has_eshk(mon) ((mon)->mextra && ESHK(mon))

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mfndpos.h $NHDT-Date: 1432512776 2015/05/25 00:12:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.7 mfndpos.h $NHDT-Date: 1596498546 2020/08/03 23:49:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2005. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 micro.h $NHDT-Date: 1524689515 2018/04/25 20:51:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.7 micro.h $NHDT-Date: 1596498546 2020/08/03 23:49:06 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) 2015 by Kenneth Lorber */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mkroom.h $NHDT-Date: 1560851014 2019/06/18 09:43:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.16 $ */
/* NetHack 3.7 mkroom.h $NHDT-Date: 1596498547 2020/08/03 23:49:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2016. */
/* NetHack may be freely redistributed. See license for details. */
@@ -9,7 +9,7 @@
/* mkroom.h - types and structures for room and shop initialization */
struct mkroom {
schar lx, hx, ly, hy; /* usually xchar, but hx may be -1 */
xchar lx, hx, ly, hy; /* usually xchar, but hx may be -1 */
schar rtype; /* type of room (zoo, throne, etc...) */
schar orig_rtype; /* same as rtype, but not zeroed later */
schar rlit; /* is the room lit ? */
@@ -90,6 +90,14 @@ enum roomtype_types {
#define ROOMOFFSET 3 /* (levl[x][y].roomno - ROOMOFFSET) gives g.rooms[] index,
* for inside-squares and non-shared boundaries */
/* Values for needfill */
#define FILL_NONE 0 /* do not fill this room with anything */
#define FILL_NORMAL 1 /* fill the room normally (OROOM or THEMEROOM gets
fill_ordinary_room; any other room type gets stocked
with its usual monsters/objects/terrain) */
#define FILL_LVFLAGS 2 /* special rooms only; set the room's rtype and level
flags as appropriate, but do not put anything in it */
#define IS_ROOM_PTR(x) ((x) >= g.rooms && (x) < g.rooms + MAXNROFROOMS)
#define IS_ROOM_INDEX(x) ((x) >= 0 && (x) < MAXNROFROOMS)
#define IS_SUBROOM_PTR(x) ((x) >= g.subrooms && (x) < g.subrooms + MAXNROFROOMS)

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 monattk.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
/* NetHack 3.7 monattk.h $NHDT-Date: 1596498548 2020/08/03 23:49:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* NetHack may be freely redistributed. See license for details. */
/* Copyright 1988, M. Stephenson */
@@ -86,6 +86,15 @@
#define AD_SAMU 252 /* hits, may steal Amulet (Wizard) */
#define AD_CURS 253 /* random curse (ex. gremlin) */
struct mhitm_data {
int damage;
int hitflags; /* MM_DEF_DIED | MM_AGR_DIED | ... */
boolean done;
boolean permdmg;
int specialdmg;
int dieroll;
};
/*
* Monster to monster attacks. When a monster attacks another (mattackm),
* any or all of the following can be returned. See mattackm() for more
@@ -95,5 +104,6 @@
#define MM_HIT 0x1 /* aggressor hit defender */
#define MM_DEF_DIED 0x2 /* defender died */
#define MM_AGR_DIED 0x4 /* aggressor died */
#define MM_AGR_DONE 0x8 /* aggressor is done with their turn */
#endif /* MONATTK_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mondata.h $NHDT-Date: 1586178708 2020/04/06 13:11:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.43 $ */
/* NetHack 3.7 mondata.h $NHDT-Date: 1606473485 2020/11/27 10:38:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.45 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
@@ -224,9 +224,12 @@
#define nonliving(ptr) \
(is_undead(ptr) || (ptr) == &mons[PM_MANES] || weirdnonliving(ptr))
/* no corpse (ie, blank scrolls) if killed by fire */
/* no corpse (ie, blank scrolls) if killed by fire; special case instakill */
#define completelyburns(ptr) \
((ptr) == &mons[PM_PAPER_GOLEM] || (ptr) == &mons[PM_STRAW_GOLEM])
#define completelyrots(ptr) \
((ptr) == &mons[PM_WOOD_GOLEM] || (ptr) == &mons[PM_LEATHER_GOLEM])
#define completelyrusts(ptr) ((ptr) == &mons[PM_IRON_GOLEM])
/* Used for conduct with corpses, tins, and digestion attacks */
/* G_NOCORPSE monsters might still be swallowed as a purple worm */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 monflag.h $NHDT-Date: 1590879610 2020/05/30 23:00:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.20 $ */
/* NetHack 3.7 monflag.h $NHDT-Date: 1596498549 2020/08/03 23:49:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.21 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
@@ -205,6 +205,9 @@ enum ms_sounds {
#define G_GONE (G_GENOD | G_EXTINCT)
#define MV_KNOWS_EGG 0x08 /* player recognizes egg of this monster type */
enum mgender { MALE, FEMALE, NEUTRAL,
NUM_MGENDERS };
/* *INDENT-ON* */
/* clang-format on */
#endif /* MONFLAG_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 monst.h $NHDT-Date: 1559994623 2019/06/08 11:50:23 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.32 $ */
/* NetHack 3.7 monst.h $NHDT-Date: 1596498550 2020/08/03 23:49:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.42 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2016. */
/* NetHack may be freely redistributed. See license for details. */
@@ -82,6 +82,7 @@ struct monst {
xchar mx, my;
xchar mux, muy; /* where the monster thinks you are */
#define MTSZ 4
/* mtrack[0..2] is used to keep extra data when migrating the monster */
coord mtrack[MTSZ]; /* monster track */
int mhp, mhpmax;
unsigned mappearance; /* for undetected mimics and the wiz */
@@ -183,7 +184,7 @@ struct monst {
#define DEADMONSTER(mon) ((mon)->mhp < 1)
#define is_starting_pet(mon) ((mon)->m_id == g.context.startingpet_mid)
#define is_vampshifter(mon) \
((mon)->cham == PM_VAMPIRE || (mon)->cham == PM_VAMPIRE_LORD \
((mon)->cham == PM_VAMPIRE || (mon)->cham == PM_VAMPIRE_LEADER \
|| (mon)->cham == PM_VLAD_THE_IMPALER)
#define vampshifted(mon) (is_vampshifter((mon)) && !is_vampire((mon)->data))
@@ -219,4 +220,8 @@ struct monst {
#define montoostrong(monindx, lev) (mons[monindx].difficulty > lev)
#define montooweak(monindx, lev) (mons[monindx].difficulty < lev)
#ifdef PMNAME_MACROS
#define Mgender(mon) ((mon)->female ? FEMALE : MALE)
#endif
#endif /* MONST_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 monsym.h $NHDT-Date: 1547428769 2019/01/14 01:19:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.7 monsym.h $NHDT-Date: 1596498550 2020/08/03 23:49:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* Copyright (c) 2016 by Pasi Kallinen */
/* NetHack may be freely redistributed. See license for details. */
/* Monster symbols and creation information rev 1.0 */

View File

@@ -1,62 +0,0 @@
/* NetHack 3.6 mttypriv.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
/* Copyright (c) Jon W{tte 1993. */
/* NetHack may be freely redistributed. See license for details. */
/*
* This file contains private structures used to implement the
* tty windows - note that these structures may change between
* minor releases!
*/
#ifndef _H_tty_private
#define _H_tty_private
#ifndef _H_tty_public
#include "mactty.h"
#endif
#if !TARGET_API_MAC_CARBON
#include <QDOffscreen.h>
#include <Gestalt.h>
#include <Errors.h>
#endif
#define TA_TO_RGB(ta, rgb) \
(((rgb).red = (((ta) >> 16) & 0xff) * 257), \
((rgb).green = (((ta) >> 8) & 0xff) * 257), \
((rgb).blue = ((ta) &0xff) * 257)), \
rgb
typedef struct tty_record {
WindowPtr its_window;
short font_number;
short font_size;
short char_width;
short row_height;
short ascent_height;
short x_size;
short y_size;
short x_curs;
short y_curs;
GWorldPtr its_window_world;
BitMap its_bits;
GrafPtr offscreen_port;
GWorldPtr offscreen_world;
#if CLIP_RECT_ONLY
Rect invalid_rect;
#else
RgnHandle invalid_part;
#endif
long attribute[TTY_NUMBER_ATTRIBUTES];
long last_cursor;
Boolean was_allocated;
Boolean curs_state;
Boolean uses_gworld;
} tty_record;
#endif /* _H_tty_private */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 ntconf.h $NHDT-Date: 1447424077 2015/11/13 14:14:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.48 $ */
/* NetHack 3.7 ntconf.h $NHDT-Date: 1596498552 2020/08/03 23:49:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.89 $ */
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
/* NetHack may be freely redistributed. See license for details. */
@@ -144,6 +144,8 @@ extern void FDECL(interject, (int));
#ifndef HAS_STDINT_H
#define HAS_STDINT_H /* force include of stdint.h in integer.h */
#endif
/* Turn on some additional warnings */
#pragma warning(3:4389)
#endif /* _MSC_VER */
/* The following is needed for prototypes of certain functions */
@@ -156,14 +158,6 @@ extern void FDECL(interject, (int));
#define strncmpi(a, b, c) strnicmp(a, b, c)
#endif
#ifdef _MSC_VER
/* Visual Studio defines this in their own headers, which we don't use */
#ifndef snprintf
#define snprintf _snprintf
#pragma warning( \
disable : 4996) /* deprecation warning suggesting snprintf_s */
#endif
#endif
#include <sys/types.h>
#include <stdlib.h>
@@ -281,16 +275,6 @@ extern int FDECL(set_win32_option, (const char *, const char *));
extern int FDECL(alternative_palette, (char *));
#endif
#ifdef NDEBUG
#define nhassert(expression) ((void)0)
#else
extern void FDECL(nhassert_failed, (const char * exp, const char * file,
int line));
#define nhassert(expression) (void)((!!(expression)) || \
(nhassert_failed(#expression, __FILE__, __LINE__), 0))
#endif
#define nethack_enter(argc, argv) nethack_enter_winnt()
extern void FDECL(nethack_exit, (int)) NORETURN;
extern boolean FDECL(file_exists, (const char *));
@@ -299,4 +283,13 @@ extern boolean FDECL(file_newer, (const char *, const char *));
#include "system.h"
#endif
/* Override the default version of nhassert. The default version is unable
* to generate a string form of the expression due to the need to be
* compatible with compilers which do not support macro stringization (i.e.
* #x to turn x into its string form).
*/
extern void FDECL(nt_assert_failed, (const char *, const char *, int));
#define nhassert(expression) (void)((!!(expression)) || \
(nt_assert_failed(#expression, __FILE__, __LINE__), 0))
#endif /* NTCONF_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 obj.h $NHDT-Date: 1590870784 2020/05/30 20:33:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.69 $ */
/* NetHack 3.7 obj.h $NHDT-Date: 1604620981 2020/11/06 00:03:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.79 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -40,15 +40,19 @@ struct obj {
unsigned owt;
long quan; /* number of items */
#define SPE_LIM 99 /* abs(obj->spe) <= 99, cap for enchanted and charged
* objects (and others; named fruit index excepted) */
schar spe; /* quality of weapon, weptool, armor or ring (+ or -);
number of charges for wand or charged tool ( >= -1 );
number of candles attached to candelabrum;
marks your eggs, tin variety and spinach tins;
Schroedinger's Box (1) or royal coffers for a court (2);
tells which fruit a fruit is;
special for uball and amulet;
scroll of mail (normal==0, bones or wishing==1, written==2);
historic and gender for statues */
* number of charges for wand or charged tool ( >= -1 );
* number of candles attached to candelabrum;
* marks your eggs, tin variety and spinach tins;
* candy bar wrapper index;
* Schroedinger's Box (1) or royal coffers for a court (2);
* tells which fruit a fruit is;
* special for uball and amulet;
* scroll of mail (normal==0, bones or wishing==1, written==2);
* splash of venom (normal==0, wishing==1);
* historic and gender for statues */
#define STATUE_HISTORIC 0x01
#define STATUE_MALE 0x02
#define STATUE_FEMALE 0x04
@@ -105,7 +109,8 @@ struct obj {
Bitfield(in_use, 1); /* for magic items before useup items */
Bitfield(bypass, 1); /* mark this as an object to be skipped by bhito() */
Bitfield(cknown, 1); /* contents of container assumed to be known */
Bitfield(cknown, 1); /* for containers (including statues): the contents
* are known; also applicable to tins */
Bitfield(lknown, 1); /* locked/unlocked status is known */
/* 4 free bits */
@@ -113,12 +118,15 @@ struct obj {
#define leashmon corpsenm /* gets m_id of attached pet */
#define fromsink corpsenm /* a potion from a sink */
#define novelidx corpsenm /* 3.6 tribute - the index of the novel title */
#define migr_species corpsenm /* species to endow for MIGR_TO_SPECIES */
int usecount; /* overloaded for various things that tally */
#define spestudied usecount /* # of times a spellbook has been studied */
unsigned oeaten; /* nutrition left in food, if partly eaten */
long age; /* creation date */
long owornmask;
unsigned lua_ref_cnt; /* # of lua script references for this object */
xchar omigr_from_dnum; /* where obj is migrating from */
xchar omigr_from_dlevel; /* where obj is migrating from */
struct oextra *oextra; /* pointer to oextra struct */
};
@@ -244,13 +252,16 @@ struct obj {
#define stale_egg(egg) \
((g.monstermoves - (egg)->age) > (2 * MAX_EGG_HATCH_TIME))
#define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN)
/* note: sometimes eggs and tins have special corpsenm values that
shouldn't be used as an index into mons[] */
#define polyfodder(obj) \
(ofood(obj) && (pm_to_cham((obj)->corpsenm) != NON_PM \
(ofood(obj) && (obj)->corpsenm >= LOW_PM \
&& (pm_to_cham((obj)->corpsenm) != NON_PM \
|| dmgtype(&mons[(obj)->corpsenm], AD_POLY)))
#define mlevelgain(obj) (ofood(obj) && (obj)->corpsenm == PM_WRAITH)
#define mhealup(obj) (ofood(obj) && (obj)->corpsenm == PM_NURSE)
#define Is_pudding(o) \
(o->otyp == GLOB_OF_GRAY_OOZE || o->otyp == GLOB_OF_BROWN_PUDDING \
#define Is_pudding(o) \
(o->otyp == GLOB_OF_GRAY_OOZE || o->otyp == GLOB_OF_BROWN_PUDDING \
|| o->otyp == GLOB_OF_GREEN_SLIME || o->otyp == GLOB_OF_BLACK_PUDDING)
/* Containers */
@@ -305,22 +316,26 @@ struct obj {
(otmp->otyp == TALLOW_CANDLE || otmp->otyp == WAX_CANDLE)
#define MAX_OIL_IN_FLASK 400 /* maximum amount of oil in a potion of oil */
/* MAGIC_LAMP intentionally excluded below */
/* age field of this is relative age rather than absolute */
#define age_is_relative(otmp) \
/* age field of this is relative age rather than absolute; does not include
magic lamp */
#define age_is_relative(otmp) \
((otmp)->otyp == BRASS_LANTERN || (otmp)->otyp == OIL_LAMP \
|| (otmp)->otyp == CANDELABRUM_OF_INVOCATION \
|| (otmp)->otyp == TALLOW_CANDLE || (otmp)->otyp == WAX_CANDLE \
|| (otmp)->otyp == POT_OIL)
/* object can be ignited */
#define ignitable(otmp) \
/* object can be ignited; magic lamp used to excluded here too but all
usage of this macro ended up testing
(ignitable(obj) || obj->otyp == MAGIC_LAMP)
so include it; brass lantern can be lit but not by fire */
#define ignitable(otmp) \
((otmp)->otyp == BRASS_LANTERN || (otmp)->otyp == OIL_LAMP \
|| ((otmp)->otyp == MAGIC_LAMP && (otmp)->spe > 0) \
|| (otmp)->otyp == CANDELABRUM_OF_INVOCATION \
|| (otmp)->otyp == TALLOW_CANDLE || (otmp)->otyp == WAX_CANDLE \
|| (otmp)->otyp == POT_OIL)
/* things that can be read */
#define is_readable(otmp) \
#define is_readable(otmp) \
((otmp)->otyp == FORTUNE_COOKIE || (otmp)->otyp == T_SHIRT \
|| (otmp)->otyp == ALCHEMY_SMOCK || (otmp)->otyp == CREDIT_CARD \
|| (otmp)->otyp == CAN_OF_GREASE || (otmp)->otyp == MAGIC_MARKER \
@@ -344,6 +359,10 @@ struct obj {
&& !undiscovered_artifact(ART_EYES_OF_THE_OVERWORLD)))
#define pair_of(o) ((o)->otyp == LENSES || is_gloves(o) || is_boots(o))
#define unpolyable(o) ((o)->otyp == WAN_POLYMORPH \
|| (o)->otyp == SPE_POLYMORPH \
|| (o)->otyp == POT_POLYMORPH)
/* achievement tracking; 3.6.x did this differently */
#define is_mines_prize(o) ((o)->o_id == g.context.achieveo.mines_prize_oid)
#define is_soko_prize(o) ((o)->o_id == g.context.achieveo.soko_prize_oid)
@@ -388,7 +407,9 @@ struct obj {
* 4. Add a testing macro after the set of referencing macros
* (see has_oname(), has_omonst(), has_omailcmd(), and has_omin(),
* for examples).
* 5. Create newXX(otmp) function and possibly free_XX(otmp) function
* 5. If your new field isn't a pointer and requires a non-zero value
* on initialization, add code to init_oextra() in src/mkobj.c.
* 6. Create newXX(otmp) function and possibly free_XX(otmp) function
* in an appropriate new or existing source file and add a prototype
* for it to include/extern.h. The majority of these are currently
* located in mkobj.c for convenience.
@@ -409,14 +430,14 @@ struct obj {
* }
* }
*
* 6. Adjust size_obj() in src/cmd.c appropriately.
* 7. Adjust dealloc_oextra() in src/mkobj.c to clean up
* 7. Adjust size_obj() in src/cmd.c appropriately.
* 8. Adjust dealloc_oextra() in src/mkobj.c to clean up
* properly during obj deallocation.
* 8. Adjust copy_oextra() in src/mkobj.c to make duplicate
* 9. Adjust copy_oextra() in src/mkobj.c to make duplicate
* copies of your struct or data onto another obj struct.
* 9. Adjust restobj() in src/restore.c to deal with your
* 10. Adjust restobj() in src/restore.c to deal with your
* struct or data during a restore.
* 10. Adjust saveobj() in src/save.c to deal with your
* 11. Adjust saveobj() in src/save.c to deal with your
* struct or data during a save.
*/

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objclass.h $NHDT-Date: 1578895344 2020/01/13 06:02:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.21 $ */
/* NetHack 3.7 objclass.h $NHDT-Date: 1596498553 2020/08/03 23:49:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2018. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -120,9 +120,9 @@ pfx_##a,
"deprecated (use S_boulder in sym file instead)")
#endif
NHOPTC(catname, PL_PSIZ, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"the name of your (first) cat (e.g., catname:Tabby)")
"name of your starting pet if it is a kitten")
#ifdef INSURANCE
NHOPTB(checkpoint, 0, opt_out, set_in_game, Off, Yes, No, No, NoAlias,
NHOPTB(checkpoint, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.ins_chkpt)
#else
NHOPTB(checkpoint, 0, opt_out, set_in_game, Off, No, No, No, NoAlias,
@@ -150,11 +150,11 @@ pfx_##a,
opt_in, set_in_game, Yes, Yes, No, Yes, NoAlias,
"the kinds of information to disclose at end of game")
NHOPTC(dogname, PL_PSIZ, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"the name of your (first) dog (e.g., dogname:Fang)")
NHOPTC(dungeon, MAXDCHARS + 1,opt_in, set_in_config, No, Yes, No, No, NoAlias,
"the symbols to use in drawing the dungeon map")
NHOPTC(effects, MAXECHARS + 1, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"the symbols to use in drawing special effects")
"name of your starting pet if it is a little dog")
NHOPTC(dungeon, MAXDCHARS + 1,opt_in, set_in_config, No, Yes, No, No,
NoAlias, "list of symbols to use in drawing the dungeon map")
NHOPTC(effects, MAXECHARS + 1, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "list of symbols to use in drawing special effects")
NHOPTB(eight_bit_tty, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&iflags.wc_eight_bit_input)
NHOPTB(extmenu, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
@@ -164,29 +164,29 @@ pfx_##a,
NHOPTB(fixinv, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.invlet_constant)
NHOPTC(font_map, 40, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the font to use in the map window")
"font to use in the map window")
NHOPTC(font_menu, 40, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the font to use in menus")
"font to use in menus")
NHOPTC(font_message, 40, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the font to use in the message window")
"font to use in the message window")
NHOPTC(font_size_map, 20, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the size of the map font")
NHOPTC(font_size_menu, 20, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the size of the menu font")
NHOPTC(font_size_message, 20, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the size of the message font")
NHOPTC(font_size_status, 20, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the size of the status font")
NHOPTC(font_size_text, 20, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the size of the text font")
"size of the map font")
NHOPTC(font_size_menu, 20, opt_in, set_gameview, Yes, Yes, Yes, No,
NoAlias, "size of the menu font")
NHOPTC(font_size_message, 20, opt_in, set_gameview, Yes, Yes, Yes, No,
NoAlias, "size of the message font")
NHOPTC(font_size_status, 20, opt_in, set_gameview, Yes, Yes, Yes, No,
NoAlias, "size of the status font")
NHOPTC(font_size_text, 20, opt_in, set_gameview, Yes, Yes, Yes, No,
NoAlias, "size of the text font")
NHOPTC(font_status, 40, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the font to use in status window")
"font to use in status window")
NHOPTC(font_text, 40, opt_in, set_gameview, Yes, Yes, Yes, No, NoAlias,
"the font to use in text windows")
"font to use in text windows")
NHOPTB(force_invmenu, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&iflags.force_invmenu)
NHOPTC(fruit, PL_FSIZ, opt_in, set_in_game, No, Yes, No, No, NoAlias,
"the name of a fruit you enjoy eating")
"name of a fruit you enjoy eating")
NHOPTB(fullscreen, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias,
&iflags.wc2_fullscreen)
NHOPTC(gender, 8, opt_in, set_gameview, No, Yes, No, No, NoAlias,
@@ -209,12 +209,12 @@ pfx_##a,
&iflags.hilite_pile)
#ifdef STATUS_HILITES
NHOPTC(hilite_status, 13, opt_out, set_in_game, Yes, Yes, Yes, No, NoAlias,
"hilite_status")
"a status highlighting rule (can occur multiple times)")
#endif
NHOPTB(hitpointbar, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&iflags.wc2_hitpointbar)
NHOPTC(horsename, PL_PSIZ, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"the name of your (first) horse (e.g., horsename:Silver)")
"name of your starting pet if it is a pony")
#ifdef BACKWARD_COMPAT
NHOPTC(IBMgraphics, 70, opt_in, set_in_config, Yes, Yes, No, No, NoAlias,
"load IBMGraphics display symbols")
@@ -226,10 +226,12 @@ pfx_##a,
NHOPTB(ignintr, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias,
(boolean *) 0)
#endif
NHOPTB(implicit_uncursed, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.implicit_uncursed)
NHOPTB(implicit_uncursed, 0, opt_out, set_in_game, On, Yes, No, No,
NoAlias, &flags.implicit_uncursed)
#if 0 /* obsolete - pre-OSX Mac */
NHOPTB(large_font, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias,
&iflags.obsolete)
#endif
NHOPTB(legacy, 0, opt_out, set_in_config, On, Yes, No, No, NoAlias,
&flags.legacy)
NHOPTB(lit_corridor, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
@@ -248,18 +250,18 @@ pfx_##a,
&flags.mention_decor)
NHOPTB(mention_walls, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&flags.mention_walls)
NHOPTC(menu_deselect_all, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"deselect all items in a menu")
NHOPTC(menu_deselect_page, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"deselect all items on this page of a menu")
NHOPTC(menu_deselect_all, 4, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "deselect all items in a menu")
NHOPTC(menu_deselect_page, 4, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "deselect all items on this page of a menu")
NHOPTC(menu_first_page, 4, opt_in, set_in_config, No, No, Yes, No, NoAlias,
"jump to the first page in a menu")
NHOPTC(menu_headings, 4, opt_in, set_in_game, No, Yes, No, Yes, NoAlias,
"display style for menu headings")
NHOPTC(menu_invert_all, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"invert all items in a menu")
NHOPTC(menu_invert_page, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"invert all items on this page of a menu")
NHOPTC(menu_invert_page, 4, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "invert all items on this page of a menu")
NHOPTC(menu_last_page, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"jump to the last page in a menu")
NHOPTC(menu_next_page, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
@@ -273,34 +275,34 @@ pfx_##a,
NHOPTB(menu_overlay, 0, opt_in, set_in_config, Off, No, No, No, NoAlias,
(boolean *) 0)
#endif
NHOPTC(menu_previous_page, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"goto the previous menu page")
NHOPTC(menu_previous_page, 4, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "goto the previous menu page")
NHOPTC(menu_search, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"search for a menu item")
NHOPTC(menu_select_all, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"select all items in a menu")
NHOPTC(menu_select_page, 4, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"select all items on this page of a menu")
NHOPTC(menu_select_page, 4, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "select all items on this page of a menu")
NHOPTB(menu_tab_sep, 0, opt_in, set_wizonly, Off, Yes, No, No, NoAlias,
&iflags.menu_tab_sep)
NHOPTB(menucolors, 0, opt_in, set_in_game, Off, Yes, Yes, No, NoAlias,
&iflags.use_menu_color)
NHOPTC(menuinvertmode, 5, opt_in, set_in_game, No, Yes, No, No, NoAlias,
"behaviour of menu iverts")
NHOPTC(menustyle, MENUTYPELEN, opt_in, set_in_game, Yes, Yes, No, Yes, NoAlias,
"user interface for object selection")
NHOPTC(menustyle, MENUTYPELEN, opt_in, set_in_game, Yes, Yes, No, Yes,
NoAlias, "user interface for object selection")
NHOPTB(monpolycontrol, 0, opt_in, set_wizonly, Off, Yes, No, No, NoAlias,
&iflags.mon_polycontrol)
NHOPTC(monsters, MAXMCLASSES, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"the symbols to use for monsters")
NHOPTC(monsters, MAXMCLASSES, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "list of symbols to use for monsters")
NHOPTC(mouse_support, 0, opt_in, set_in_game, No, Yes, No, No, NoAlias,
"game receives click info from mouse")
#if defined(TTY_GRAPHICS) || defined(CURSES_GRAPHICS)
NHOPTC(msg_window, 1, opt_in, set_in_game, Yes, Yes, No, Yes, NoAlias,
"the type of message window required")
"control of \"view previous message(s)\" (^P) behavior")
#else
NHOPTC(msg_window, 1, opt_in, set_in_config, Yes, Yes, No, Yes, NoAlias,
"the type of message window required")
"control of \"view previous message(s)\" (^P) behavior")
#endif
NHOPTC(msghistory, 5, opt_in, set_gameview, Yes, Yes, No, No, NoAlias,
"number of top line messages to save")
@@ -319,10 +321,10 @@ pfx_##a,
&flags.null)
NHOPTC(number_pad, 1, opt_in, set_in_game, No, Yes, No, Yes, NoAlias,
"use the number pad for movement")
NHOPTC(objects, MAXOCLASSES, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"the symbols to use for objects")
NHOPTC(packorder, MAXOCLASSES, opt_in, set_in_game, No, Yes, No, No, NoAlias,
"the inventory order of the items in your pack")
NHOPTC(objects, MAXOCLASSES, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "list of symbols to use for objects")
NHOPTC(packorder, MAXOCLASSES, opt_in, set_in_game, No, Yes, No, No,
NoAlias, "the inventory order of the items in your pack")
#ifdef CHANGE_COLOR
#ifndef WIN32
NHOPTC(palette, 15, opt_in, set_in_game, No, Yes, No, No, "hicolor",
@@ -344,12 +346,12 @@ pfx_##a,
"maximum burden picked up before prompt")
NHOPTB(pickup_thrown, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.pickup_thrown)
NHOPTC(pickup_types, MAXOCLASSES, opt_in, set_in_game, No, Yes, No, Yes, NoAlias,
"types of objects to pick up automatically")
NHOPTC(pickup_types, MAXOCLASSES, opt_in, set_in_game, No, Yes, No, Yes,
NoAlias, "types of objects to pick up automatically")
NHOPTC(pile_limit, 24, opt_in, set_in_game, Yes, Yes, No, No, NoAlias,
"threshold for \"there are many objects here\"")
NHOPTC(player_selection, 12, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"choose character via dialog or prompts")
NHOPTC(player_selection, 12, opt_in, set_gameview, No, Yes, No, No,
NoAlias, "choose character via dialog or prompts")
NHOPTC(playmode, 8, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"normal play, non-scoring explore mode, or debug mode")
NHOPTB(popup_dialog, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
@@ -372,13 +374,15 @@ pfx_##a,
NHOPTB(rest_on_space, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&flags.rest_on_space)
NHOPTC(roguesymset, 70, opt_in, set_in_game, No, Yes, No, Yes, NoAlias,
"load a set of rogue display symbols from the symbols file")
"load a set of rogue display symbols from symbols file")
NHOPTC(role, PL_CSIZ, opt_in, set_gameview, No, Yes, No, No, "character",
"your starting role (e.g., Barbarian, Valkyrie)")
NHOPTC(runmode, sizeof "teleport", opt_in, set_in_game, Yes, Yes, No, Yes,
NoAlias, "display frequency when `running' or `travelling'")
NHOPTB(safe_pet, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.safe_dog)
NHOPTB(safe_wait, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.safe_wait)
NHOPTB(sanity_check, 0, opt_in, set_wizonly, Off, Yes, No, No, NoAlias,
&iflags.sanity_check)
NHOPTC(scores, 32, opt_in, set_in_game, No, Yes, No, No, NoAlias,
@@ -404,6 +408,8 @@ pfx_##a,
&flags.silent)
NHOPTB(softkeyboard, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias,
&iflags.wc2_softkeyboard)
NHOPTC(sortdiscoveries, 0, opt_in, set_in_game, Yes, Yes, No, Yes,
NoAlias, "preferred order when displaying discovered objects")
NHOPTC(sortloot, 4, opt_in, set_in_game, No, Yes, No, Yes, NoAlias,
"sort object selection lists by description")
NHOPTB(sortpack, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
@@ -420,16 +426,11 @@ pfx_##a,
NHOPTC(statushilites, 20, opt_in, set_in_game, Yes, Yes, Yes, No, NoAlias,
"0=no status highlighting, N=show highlights for N turns")
#else
NHOPTC(statushilites, 20, opt_in, set_in_config, Yes, Yes, Yes, No, NoAlias,
"highlight control")
NHOPTC(statushilites, 20, opt_in, set_in_config, Yes, Yes, Yes, No,
NoAlias, "highlight control")
#endif
#ifdef CURSES_GRAPHICS
NHOPTC(statuslines, 20, opt_in, set_in_game, No, Yes, No, No, NoAlias,
"2 or 3 lines for horizontal (bottom or top) status display")
#else
NHOPTC(statuslines, 20, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"2 or 3 lines for status display")
#endif
#ifdef WIN32
NHOPTC(subkeyvalue, 7, opt_in, set_in_config, No, Yes, Yes, No, NoAlias,
"override keystroke value")
@@ -437,7 +438,7 @@ pfx_##a,
NHOPTC(suppress_alert, 8, opt_in, set_in_game, No, Yes, Yes, No, NoAlias,
"suppress alerts about version-specific features")
NHOPTC(symset, 70, opt_in, set_in_game, No, Yes, No, Yes, NoAlias,
"load a set of display symbols from the symbols file")
"load a set of display symbols from symbols file")
NHOPTC(term_cols, 6, opt_in, set_in_config, No, Yes, No, No, "termcolumns",
"number of columns")
NHOPTC(term_rows, 6, opt_in, set_in_config, No, Yes, No, No, NoAlias,
@@ -463,8 +464,8 @@ pfx_##a,
&flags.tombstone)
NHOPTB(toptenwin, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&iflags.toptenwin)
NHOPTC(traps, MAXTCHARS + 1, opt_in, set_in_config, No, Yes, No, No, NoAlias,
"the symbols to use in drawing traps")
NHOPTC(traps, MAXTCHARS + 1, opt_in, set_in_config, No, Yes, No, No,
NoAlias, "list of symbols to use in drawing traps")
NHOPTB(travel, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&flags.travelcmd)
#ifdef DEBUG
@@ -487,8 +488,8 @@ pfx_##a,
"method of video updating")
#endif
#ifdef VIDEOSHADES
NHOPTC(videocolors, 40, opt_in, set_gameview, No, Yes, No, No, "videocolours",
"color mappings for internal screen routines")
NHOPTC(videocolors, 40, opt_in, set_gameview, No, Yes, No, No,
"videocolours", "color mappings for internal screen routines")
NHOPTC(videoshades, 32, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"gray shades to map to black/gray/white")
#endif
@@ -530,8 +531,8 @@ pfx_##a,
#endif
NHOPTC(windowcolors, 80, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"the foreground/background colors of windows")
NHOPTC(windowtype, WINTYPELEN, opt_in, set_gameview, No, Yes, No, No, NoAlias,
"windowing system to use")
NHOPTC(windowtype, WINTYPELEN, opt_in, set_gameview, No, Yes, No, No,
NoAlias, "windowing system to use (should be specified first)")
NHOPTB(wizweight, 0, opt_in, set_wizonly, Off, Yes, No, No, NoAlias,
&iflags.wizweight)
NHOPTB(wraptext, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,

View File

@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 22
#define EDITLEVEL 30
/*
* Development status possibilities.
@@ -98,7 +98,7 @@
* fix the article used in the message when your steed encounters a polymorph
* trap
* allow teleporting onto the vibrating square
* message "your knapsack can't accomodate any more items" when picking stuff
* message "your knapsack can't accommodate any more items" when picking stuff
* up or removing such from container was inaccurate if there was some
* gold pending; vary the message rather than add more convoluted pickup
* code

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pcconf.h $NHDT-Date: 1593953338 2020/07/05 12:48:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.27 $ */
/* NetHack 3.7 pcconf.h $NHDT-Date: 1596498554 2020/08/03 23:49:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.28 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -35,7 +35,9 @@
/*#define OVERLAY */ /* Manual overlay definition (MSC 6.0ax only) */
#ifndef CROSS_TO_AMIGA
#define SHELL /* via exec of COMMAND.COM */
#endif
/*
* Screen control options
@@ -88,7 +90,9 @@
#define ANSI_DEFAULT
#endif
#ifndef CROSS_TO_AMIGA
#define RANDOM /* have Berkeley random(3) */
#endif
#define MAIL /* Allows for fake mail daemon to deliver mail */
/* in the MSDOS version. (For AMIGA MAIL see */
@@ -101,6 +105,10 @@
#include <process.h> /* Provides prototypes of exit(), spawn() */
#endif
#ifdef CROSS_TO_AMIGA
#include <spawn.h>
#endif
#if defined(_MSC_VER) && (_MSC_VER >= 7)
#include <sys/types.h>
#include <stdlib.h>
@@ -155,7 +163,9 @@
#endif /* MSDOS configuration stuff */
#ifndef PATHLEN
#define PATHLEN 64 /* maximum pathlength */
#endif
#define FILENAME 80 /* maximum filename length (conservative) */
#ifndef MICRO_H
#include "micro.h" /* contains necessary externs for [os_name].c */
@@ -249,22 +259,6 @@
/* Sanity check, do not modify these blocks. */
/* OVERLAY must be defined with MOVERLAY or VROOMM */
#if (defined(MOVERLAY) || defined(VROOMM))
#ifndef OVERLAY
#define OVERLAY
#endif
#endif
#if defined(FUNCTION_LEVEL_LINKING)
#define OVERLAY
#endif
#if defined(OVERLAY) && !defined(MOVERLAY) && !defined(VROOMM) \
&& !defined(FUNCTION_LEVEL_LINKING)
#define USE_TRAMPOLI
#endif
#if defined(MSDOS) && defined(NO_TERMS)
#ifdef TERMLIB
#if defined(_MSC_VER) || defined(__SC__)

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 permonst.h $NHDT-Date: 1539804913 2018/10/17 19:35:13 $ $NHDT-Branch: keni-makedefsm $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.7 permonst.h $NHDT-Date: 1596498555 2020/08/03 23:49:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -40,7 +40,7 @@ struct attack {
#include "monflag.h"
struct permonst {
const char *mname; /* full name */
const char *pmnames[NUM_MGENDERS];
char mlet; /* symbol */
schar mlevel, /* base monster level */
mmove, /* move speed */
@@ -78,4 +78,8 @@ extern NEARDATA struct permonst mons[]; /* the master list of monster types */
/* mons[SPECIAL_PM] through mons[NUMMONS-1], inclusive, are
never generated randomly and cannot be polymorphed into */
#ifdef PMNAME_MACROS
#define pmname(pm,g) ((((g) == MALE || (g) == FEMALE) && (pm)->pmnames[g]) \
? (pm)->pmnames[g] : (pm)->pmnames[NEUTRAL])
#endif
#endif /* PERMONST_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 prop.h $NHDT-Date: 1570566360 2019/10/08 20:26:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.21 $ */
/* NetHack 3.7 prop.h $NHDT-Date: 1596498555 2020/08/03 23:49:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 quest.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.7 quest.h $NHDT-Date: 1596498556 2020/08/03 23:49:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */
/* Copyright (c) Mike Stephenson 1991. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 rect.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 rect.h $NHDT-Date: 1596498557 2020/08/03 23:49:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */
/* Copyright (c) 1990 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 region.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */
/* NetHack 3.7 region.h $NHDT-Date: 1596498557 2020/08/03 23:49:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) 1996 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 rm.h $NHDT-Date: 1589064684 2020/05/09 22:51:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.82 $ */
/* NetHack 3.7 rm.h $NHDT-Date: 1599434249 2020/09/06 23:17:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.84 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -243,6 +243,8 @@ enum screen_symbols {
#define is_cmap_furniture(i) ((i) >= S_upstair && (i) <= S_fountain)
#define is_cmap_water(i) ((i) == S_pool || (i) == S_water)
#define is_cmap_lava(i) ((i) == S_lava)
#define is_cmap_stairs(i) ((i) == S_upstair || (i) == S_dnstair || \
(i) == S_upladder || (i) == S_dnladder)
struct symdef {
@@ -335,11 +337,6 @@ extern const struct symdef def_warnsyms[WARNCOUNT];
#define D_TRAPPED 16
#define D_SECRET 32 /* only used by sp_lev.c, NOT in rm-struct */
/*
* Some altars are considered as shrines, so we need a flag.
*/
#define AM_SHRINE 8
/*
* Thrones should only be looted once.
*/
@@ -436,22 +433,6 @@ struct rm {
Bitfield(candig, 1); /* Exception to Can_dig_down; was a trapdoor */
};
#define SET_TYPLIT(x, y, ttyp, llit) \
{ \
if ((x) >= 0 && (y) >= 0 && (x) < COLNO && (y) < ROWNO) { \
if ((ttyp) < MAX_TYPE) \
levl[(x)][(y)].typ = (ttyp); \
if ((ttyp) == LAVAPOOL) \
levl[(x)][(y)].lit = 1; \
else if ((schar)(llit) != -2) { \
if ((schar)(llit) == -1) \
levl[(x)][(y)].lit = rn2(2); \
else \
levl[(x)][(y)].lit = (llit); \
} \
} \
}
/*
* Add wall angle viewing by defining "modes" for each wall type. Each
* mode describes which parts of a wall are finished (seen as as wall)
@@ -563,7 +544,7 @@ struct cemetery {
/* date+time in string of digits rather than binary */
char when[4 + 2 + 2 + 2 + 2 + 2 + 1]; /* "YYYYMMDDhhmmss\0" */
/* final resting place spot */
schar frpx, frpy;
xchar frpx, frpy;
boolean bonesknown;
};
@@ -631,10 +612,10 @@ typedef struct {
* Macros for encapsulation of level.monsters references.
*/
#if 0
#define MON_AT(x, y) \
#define MON_AT(x, y) \
(g.level.monsters[x][y] != (struct monst *) 0 \
&& !(g.level.monsters[x][y])->mburied)
#define MON_BURIED_AT(x, y) \
#define MON_BURIED_AT(x, y) \
(g.level.monsters[x][y] != (struct monst *) 0 \
&& (g.level.monsters[x][y])->mburied)
#else /* without 'mburied' */
@@ -642,15 +623,15 @@ typedef struct {
#endif
#ifdef EXTRA_SANITY_CHECKS
#define place_worm_seg(m, x, y) \
do { \
do { \
if (g.level.monsters[x][y] && g.level.monsters[x][y] != m) \
impossible("place_worm_seg over mon"); \
g.level.monsters[x][y] = m; \
impossible("place_worm_seg over mon"); \
g.level.monsters[x][y] = m; \
} while(0)
#define remove_monster(x, y) \
do { \
do { \
if (!g.level.monsters[x][y]) \
impossible("no monster to remove"); \
impossible("no monster to remove"); \
g.level.monsters[x][y] = (struct monst *) 0; \
} while(0)
#else

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 skills.h $NHDT-Date: 1547255911 2019/01/12 01:18:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.15 $ */
/* NetHack 3.7 skills.h $NHDT-Date: 1596498559 2020/08/03 23:49:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.16 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 sp_lev.h $NHDT-Date: 1580434523 2020/01/31 01:35:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.33 $ */
/* NetHack 3.7 sp_lev.h $NHDT-Date: 1599434249 2020/09/06 23:17:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.39 $ */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */
@@ -62,6 +62,11 @@ enum lvlinit_types {
#define SEL_GRADIENT_RADIAL 0
#define SEL_GRADIENT_SQUARE 1
/* light states for terrain replacements, specifically for SET_TYPLIT
* (not used for init_level) */
#define SET_LIT_RANDOM -1
#define SET_LIT_NOCHANGE -2
#define SP_COORD_IS_RANDOM 0x01000000L
/* Humidity flags for get_location() and friends, used with
* SP_COORD_PACK_RANDOM() */
@@ -180,7 +185,7 @@ typedef struct _room {
Str_or_Len parent;
xchar x, y, w, h;
xchar xalign, yalign;
xchar rtype, chance, rlit, filled, joined;
xchar rtype, chance, rlit, needfill, joined;
} room;
struct mapfragment {
@@ -188,4 +193,21 @@ struct mapfragment {
char *data;
};
#define SET_TYPLIT(x, y, ttyp, llit) \
{ \
if ((x) >= 1 && (y) >= 0 && (x) < COLNO && (y) < ROWNO) { \
if ((ttyp) < MAX_TYPE && levl[(x)][(y)].typ != STAIRS \
&& levl[(x)][(y)].typ != LADDER) \
levl[(x)][(y)].typ = (ttyp); \
if ((ttyp) == LAVAPOOL) \
levl[(x)][(y)].lit = 1; \
else if ((schar)(llit) != SET_LIT_NOCHANGE) { \
if ((schar)(llit) == SET_LIT_RANDOM) \
levl[(x)][(y)].lit = rn2(2); \
else \
levl[(x)][(y)].lit = (llit); \
} \
} \
}
#endif /* SP_LEV_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 spell.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.9 $ */
/* NetHack 3.7 spell.h $NHDT-Date: 1596498560 2020/08/03 23:49:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.11 $ */
/* Copyright 1986, M. Stephenson */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 sys.h $NHDT-Date: 1449296291 2015/12/05 06:18:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */
/* NetHack 3.7 sys.h $NHDT-Date: 1596498561 2020/08/03 23:49:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 system.h $NHDT-Date: 1574825213 2019/11/27 03:26:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */
/* NetHack 3.7 system.h $NHDT-Date: 1596498562 2020/08/03 23:49:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.24 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -339,7 +339,7 @@ E int FDECL(memcmp, (const void *, const void *, size_t));
E void *FDECL(memcpy, (void *, const void *, size_t));
E void *FDECL(memset, (void *, int, size_t));
#else
#if defined(AZTEC_50) || defined(NHSTDC))
#if defined(AZTEC_50) || defined(NHSTDC)
E int FDECL(memcmp, (const void *, const void *, size_t));
E void *FDECL(memcpy, (void *, const void *, size_t));
E void *FDECL(memset, (void *, int, size_t));

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 tcap.h $NHDT-Date: 1432512774 2015/05/25 00:12:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.7 tcap.h $NHDT-Date: 1596498562 2020/08/03 23:49:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1989. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 tile2x11.h $NHDT-Date: 1524689515 2018/04/25 20:51:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.7 tile2x11.h $NHDT-Date: 1597274123 2020/08/12 23:15:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) 2002 by David Cohrs */
/* NetHack may be freely redistributed. See license for details. */
@@ -6,7 +6,10 @@
#define TILE2X11_H
/*
* Header for the x11 tile map.
* Header for the X11 tile map.
*
* dat/x11tiles is used by Qt for fallback if nhtiles.bmp is inaccessible,
* so this header is used by Qt as well as by X11.
*/
typedef struct {
unsigned long version;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 tileset.h $NHDT-Date: 1457207052 2016/03/05 19:44:12 $ $NHDT-Branch: chasonr $:$NHDT-Revision: 1.0 $ */
/* NetHack 3.7 tileset.h $NHDT-Date: 1596498564 2020/08/03 23:49:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $ */
/* Copyright (c) Ray Chason, 2016. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 timeout.h $NHDT-Date: 1564269131 2019/07/27 23:12:11 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.7 timeout.h $NHDT-Date: 1596498564 2020/08/03 23:49:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* Copyright 1994, Dean Luick */
/* NetHack may be freely redistributed. See license for details. */
@@ -29,6 +29,7 @@ enum timeout_types {
ROT_ORGANIC = 0, /* for buried organics */
ROT_CORPSE,
REVIVE_MON,
ZOMBIFY_MON,
BURN_OBJECT,
HATCH_EGG,
FIG_TRANSFORM,

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1555361295 2019/04/15 20:48:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.36 $ */
/* NetHack 3.7 tradstdc.h $NHDT-Date: 1596498565 2020/08/03 23:49:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.37 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -184,11 +184,10 @@ typedef const char *vA;
* FDECL() is used for functions with a fixed number of arguments;
* VDECL() is used for functions with a variable number of arguments.
* Separate macros are needed because ANSI will mix old-style declarations
* with prototypes, except in the case of varargs, and the OVERLAY-specific
* trampoli.* mechanism conflicts with the ANSI <<f(void)>> syntax.
*/
* with prototypes, except in the case of varargs
*/
#define NDECL(f) f(void) /* overridden later if USE_TRAMPOLI set */
#define NDECL(f) f(void)
#define FDECL(f, p) f p

View File

@@ -1,288 +0,0 @@
/* NetHack 3.6 trampoli.h $NHDT-Date: 1433806581 2015/06/08 23:36:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
/* Copyright (c) 1989, by Norm Meluch and Stephen Spackman */
/* NetHack may be freely redistributed. See license for details. */
#ifndef TRAMPOLI_H
#define TRAMPOLI_H
#ifdef USE_TRAMPOLI
/* ### apply.c ### */
#define dig() dig_()
#define doapply() doapply_()
#define dojump() dojump_()
#define dorub() dorub_()
/* ### artifact.c ### */
#define doinvoke() doinvoke_()
/* ### cmd.c ### */
#define doextcmd() doextcmd_()
#define doextlist() doextlist_()
#define domonability() domonability_()
#define enter_explore_mode() enter_explore_mode_()
#define doprev_message() doprev_message_()
#define timed_occupation() timed_occupation_()
#define wiz_attributes() wiz_attributes_()
#define wiz_detect() wiz_detect_()
#define wiz_genesis() wiz_genesis_()
#define wiz_identify() wiz_identify_()
#define wiz_level_tele() wiz_level_tele_()
#define wiz_map() wiz_map_()
#define wiz_where() wiz_where_()
#define wiz_wish() wiz_wish_()
/* ### display.c ### */
#define doredraw() doredraw_()
/* ### do.c ### */
#define doddrop() doddrop_()
#define dodown() dodown_()
#define dodrop() dodrop_()
#define donull() donull_()
#define doup() doup_()
#define dowipe() dowipe_()
#define drop(x) drop_(x)
#define wipeoff() wipeoff_()
/* ### do_name.c ### */
#define ddocall() ddocall_()
#define do_mname() do_mname_()
/* ### do_wear.c ### */
#define Armor_off() Armor_off_()
#define Boots_off() Boots_off_()
#define Gloves_off() Gloves_off_()
#define Helmet_off() Helmet_off_()
#define Armor_on() Armor_on_()
#define Boots_on() Boots_on_()
#define Gloves_on() Gloves_on_()
#define Helmet_on() Helmet_on_()
#define doddoremarm() doddoremarm_()
#define doputon() doputon_()
#define doremring() doremring_()
#define dotakeoff() dotakeoff_()
#define dowear() dowear_()
#define select_off(x) select_off_(x)
#define take_off() take_off_()
/* ### dogmove.c ### */
#define wantdoor(x, y, dummy) wantdoor_(x, y, dummy)
/* ### dokick.c ### */
#define dokick() dokick_()
/* ### dothrow.c ### */
#define dothrow() dothrow_()
/* ### eat.c ### */
#define Hear_again() Hear_again_()
#define eatmdone() eatmdone_()
#define doeat() doeat_()
#define eatfood() eatfood_()
#define opentin() opentin_()
#define unfaint() unfaint_()
/* ### end.c ### */
#define done1(sig) done1_(sig)
#define done2() done2_()
#define done_intr(sig) done_intr_(sig)
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
#define done_hangup(sig) done_hangup_(sig)
#endif
/* ### engrave.c ### */
#define doengrave() doengrave_()
/* ### fountain.c ### */
#define gush(x, y, poolcnt) gush_(x, y, poolcnt)
/* ### hack.c ### */
#define dopickup() dopickup_()
#define identify(x) identify_(x)
/* ### invent.c ### */
#define ckunpaid(x) ckunpaid_(x)
#define ddoinv() ddoinv_()
#define dolook() dolook_()
#define dopramulet() dopramulet_()
#define doprarm() doprarm_()
#define doprgold() doprgold_()
#define doprring() doprring_()
#define doprtool() doprtool_()
#define doprwep() doprwep_()
#define dotypeinv() dotypeinv_()
#define doorganize() doorganize_()
/* ### ioctl.c ### */
#ifdef UNIX
#ifdef SUSPEND
#define dosuspend() dosuspend_()
#endif /* SUSPEND */
#endif /* UNIX */
/* ### lock.c ### */
#define doclose() doclose_()
#define doforce() doforce_()
#define doopen() doopen_()
#define forcelock() forcelock_()
#define picklock() picklock_()
/* ### mklev.c ### */
#define do_comp(x, y) comp_(x, y)
/* ### mondata.c ### */
/* See comment in trampoli.c before uncommenting canseemon. */
/* #define canseemon(x) canseemon_(x) */
/* ### muse.c ### */
#define mbhitm(x, y) mbhitm_(x, y)
/* ### o_init.c ### */
#define dodiscovered() dodiscovered_()
/* ### objnam.c ### */
#define doname(x) doname_(x)
#define xname(x) xname_(x)
/* ### options.c ### */
#define doset() doset_()
#define dotogglepickup() dotogglepickup_()
/* ### pager.c ### */
#define dohelp() dohelp_()
#define dohistory() dohistory_()
#ifdef UNIX
#define intruph() intruph_()
#endif /* UNIX */
#define dowhatdoes() dowhatdoes_()
#define dowhatis() dowhatis_()
#define doquickwhatis() doquickwhatis_()
/* ### pcsys.c ### */
#ifdef SHELL
#define dosh() dosh_()
#endif /* SHELL */
/* ### pickup.c ### */
#define ck_bag(x) ck_bag_(x)
#define doloot() doloot_()
#define in_container(x) in_container_(x)
#define out_container(x) out_container_(x)
/* ### potion.c ### */
#define dodrink() dodrink_()
#define dodip() dodip_()
/* ### pray.c ### */
#define doturn() doturn_()
#define dopray() dopray_()
#define prayer_done() prayer_done_()
#define dosacrifice() dosacrifice_()
/* ### read.c ### */
#define doread() doread_()
#define set_lit(x, y, val) set_lit_(x, y, val)
/* ### rip.c ### */
#define genl_outrip(tmpwin, how) genl_outrip_(tmpwin, how)
/* ### save.c ### */
#define dosave() dosave_()
#if defined(UNIX) || defined(VMS) || defined(__EMX__)
#define hangup(sig) hangup_(sig)
#endif
/* ### search.c ### */
#define doidtrap() doidtrap_()
#define dosearch() dosearch_()
#define findone(zx, zy, num) findone_(zx, zy, num)
#define openone(zx, zy, num) openone_(zx, zy, num)
/* ### shk.c ### */
#define dopay() dopay_()
/* ### sit.c ### */
#define dosit() dosit_()
/* ### sounds.c ### */
#define dotalk() dotalk_()
/* ### spell.c ### */
#define learn() learn_()
#define docast() docast_()
#define dovspell() dovspell_()
/* ### steal.c ### */
#define stealarm() stealarm_()
/* ### trap.c ### */
#define dotele() dotele_()
#define dountrap() dountrap_()
#define float_down() float_down_()
/* ### version.c ### */
#define doversion() doversion_()
#define doextversion() doextversion_()
/* ### wield.c ### */
#define dowield() dowield_()
/* ### zap.c ### */
#define bhitm(x, y) bhitm_(x, y)
#define bhito(x, y) bhito_(x, y)
#define dozap() dozap_()
/* ### getline.c ### */
#define tty_getlin(x, y) tty_getlin_(x, y)
#define tty_get_ext_cmd() tty_get_ext_cmd_()
/* ### termcap.c ### */
#define tty_nhbell() tty_nhbell_()
#define tty_number_pad(x) tty_number_pad_(x)
#define tty_delay_output() tty_delay_output_()
#define tty_start_screen() tty_start_screen_()
#define tty_end_screen() tty_end_screen_()
/* ### topl.c ### */
#define tty_doprev_message() tty_doprev_message_()
#define tty_yn_function(x, y, z) tty_yn_function_(x, y, z)
/* ### wintty.c ### */
#define tty_init_nhwindows(x, y) tty_init_nhwindows_(x, y)
#define tty_player_selection() tty_player_selection_()
#define tty_askname() tty_askname_()
#define tty_get_nh_event() tty_get_nh_event_()
#define tty_exit_nhwindows(x) tty_exit_nhwindows_(x)
#define tty_suspend_nhwindows(x) tty_suspend_nhwindows_(x)
#define tty_resume_nhwindows() tty_resume_nhwindows_()
#define tty_create_nhwindow(x) tty_create_nhwindow_(x)
#define tty_clear_nhwindow(x) tty_clear_nhwindow_(x)
#define tty_display_nhwindow(x, y) tty_display_nhwindow_(x, y)
#define tty_destroy_nhwindow(x) tty_destroy_nhwindow_(x)
#define tty_curs(x, y, z) tty_curs_(x, y, z)
#define tty_putstr(x, y, z) tty_putstr_(x, y, z)
#define tty_display_file(x, y) tty_display_file_(x, y)
#define tty_start_menu(x, b) tty_start_menu_(x, b)
#define tty_add_menu(a, b, c, d, e, f, g, h) \
tty_add_menu_(a, b, c, d, e, f, g, h)
#define tty_end_menu(a, b) tty_end_menu_(a, b)
#define tty_select_menu(a, b, c) tty_select_menu_(a, b, c)
#define tty_update_inventory() tty_update_inventory_()
#define tty_mark_synch() tty_mark_synch_()
#define tty_wait_synch() tty_wait_synch_()
#ifdef CLIPPING
#define tty_cliparound(x, y) tty_cliparound_(x, y)
#endif
#ifdef POSITIONBAR
#define tty_update_positionbar(x) tty_update_positionbar_(x)
#endif
#define tty_print_glyph(a, b, c, d, e) tty_print_glyph_(a, b, c, d, e)
#define tty_raw_print(x) tty_raw_print_(x)
#define tty_raw_print_bold(x) tty_raw_print_bold_(x)
#define tty_nhgetch() tty_nhgetch_()
#define tty_nh_poskey(x, y, z) tty_nh_poskey_(x, y, z)
#endif /* USE_TRAMPOLI */
#endif /* TRAMPOLI_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.h $NHDT-Date: 1547255912 2019/01/12 01:18:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.17 $ */
/* NetHack 3.7 trap.h $NHDT-Date: 1596498566 2020/08/03 23:49:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.19 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2016. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 unixconf.h $NHDT-Date: 1555361298 2019/04/15 20:48:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.42 $ */
/* NetHack 3.7 unixconf.h $NHDT-Date: 1607461111 2020/12/08 20:58:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.49 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2018. */
/* NetHack may be freely redistributed. See license for details. */
@@ -273,8 +273,11 @@
#endif
#endif
#endif
#ifndef NOSUSPEND
#if defined(BSD_JOB_CONTROL) || defined(POSIX_JOB_CONTROL) || defined(AUX)
#define SUSPEND /* let ^Z suspend the game */
#define SUSPEND /* let ^Z suspend the game (push to background) */
#endif
#endif
/*
@@ -389,7 +392,7 @@
#endif /* LINUX */
#endif /* GNOME_GRAPHICS */
#ifdef MACOSX
#if defined(MACOSX) && !defined(LIBNH)
# define RUNTIME_PASTEBUF_SUPPORT
#endif

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 vision.h $NHDT-Date: 1559994624 2019/06/08 11:50:24 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.7 vision.h $NHDT-Date: 1596498568 2020/08/03 23:49:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.13 $ */
/* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 vmsconf.h $NHDT-Date: 1555361299 2019/04/15 20:48:19 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.30 $ */
/* NetHack 3.7 vmsconf.h $NHDT-Date: 1596498569 2020/08/03 23:49:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.33 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winGnome.h $NHDT-Date: 1432512782 2015/05/25 00:13:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 winGnome.h $NHDT-Date: 1596498571 2020/08/03 23:49:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
/* Copyright (C) 1998 by Anthony Taylor <tonyt@ptialaska.net> */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winX.h $NHDT-Date: 1457079196 2016/03/04 08:13:16 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.23 $ */
/* NetHack 3.7 winX.h $NHDT-Date: 1596498574 2020/08/03 23:49:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.39 $ */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */
@@ -453,7 +453,8 @@ E void NDECL(X11_wait_synch);
#ifdef CLIPPING
E void FDECL(X11_cliparound, (int, int));
#endif
E void FDECL(X11_print_glyph, (winid, XCHAR_P, XCHAR_P, int, int));
E void FDECL(X11_print_glyph, (winid, XCHAR_P, XCHAR_P,
int, int, unsigned *));
E void FDECL(X11_raw_print, (const char *));
E void FDECL(X11_raw_print_bold, (const char *));
E int NDECL(X11_nhgetch);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winami.h $NHDT-Date: 1432512780 2015/05/25 00:13:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 winami.h $NHDT-Date: 1596498569 2020/08/03 23:49:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991. */
/* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1992, 1993. */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 wincurs.h */
/* NetHack 3.7 wincurs.h */
/* Copyright (c) Karl Garrison, 2010. */
/* NetHack may be freely redistributed. See license for details. */
@@ -90,7 +90,7 @@ extern void curses_mark_synch(void);
extern void curses_wait_synch(void);
extern void curses_cliparound(int x, int y);
extern void curses_print_glyph(winid wid, XCHAR_P x, XCHAR_P y,
int glyph, int bkglyph);
int glyph, int bkglyph, unsigned *glyphmod);
extern void curses_raw_print(const char *str);
extern void curses_raw_print_bold(const char *str);
extern int curses_nhgetch(void);
@@ -105,7 +105,7 @@ extern void curses_number_pad(int state);
extern void curses_delay_output(void);
extern void curses_start_screen(void);
extern void curses_end_screen(void);
extern void curses_outrip(winid wid, int how);
extern void curses_outrip(winid wid, int how, time_t when);
extern void genl_outrip(winid tmpwin, int how, time_t when);
extern void curses_preference_update(const char *pref);
extern void curs_reset_windows(boolean, boolean);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 wingem.h $NHDT-Date: 1433806582 2015/06/08 23:36:22 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.7 wingem.h $NHDT-Date: 1596498570 2020/08/03 23:49:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */
/* Copyright (c) Christian Bressler, 1999 */
/* NetHack may be freely redistributed. See license for details. */
@@ -84,7 +84,8 @@ E void FDECL(Gem_cliparound, (int, int));
#ifdef POSITIONBAR
E void FDECL(Gem_update_positionbar, (char *));
#endif
E void FDECL(Gem_print_glyph, (winid, XCHAR_P, XCHAR_P, int, int));
E void FDECL(Gem_print_glyph, (winid, XCHAR_P, XCHAR_P,
int, int, unsigned *));
E void FDECL(Gem_raw_print, (const char *));
E void FDECL(Gem_raw_print_bold, (const char *));
E int NDECL(Gem_nhgetch);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winprocs.h $NHDT-Date: 1567213890 2019/08/31 01:11:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.50 $ */
/* NetHack 3.7 winprocs.h $NHDT-Date: 1596498572 2020/08/03 23:49:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.56 $ */
/* Copyright (c) David Cohrs, 1992 */
/* NetHack may be freely redistributed. See license for details. */
@@ -45,7 +45,8 @@ struct window_procs {
#ifdef POSITIONBAR
void FDECL((*win_update_positionbar), (char *));
#endif
void FDECL((*win_print_glyph), (winid, XCHAR_P, XCHAR_P, int, int));
void FDECL((*win_print_glyph), (winid, XCHAR_P, XCHAR_P,
int, int, unsigned *));
void FDECL((*win_raw_print), (const char *));
void FDECL((*win_raw_print_bold), (const char *));
int NDECL((*win_nhgetch));
@@ -345,7 +346,8 @@ struct chain_procs {
#ifdef POSITIONBAR
void FDECL((*win_update_positionbar), (CARGS, char *));
#endif
void FDECL((*win_print_glyph), (CARGS, winid, XCHAR_P, XCHAR_P, int, int));
void FDECL((*win_print_glyph), (CARGS, winid, XCHAR_P, XCHAR_P,
int, int, unsigned *));
void FDECL((*win_raw_print), (CARGS, const char *));
void FDECL((*win_raw_print_bold), (CARGS, const char *));
int FDECL((*win_nhgetch), (CARGS));
@@ -420,7 +422,8 @@ extern void FDECL(safe_cliparound, (int, int));
#ifdef POSITIONBAR
extern void FDECL(safe_update_positionbar, (char *));
#endif
extern void FDECL(safe_print_glyph, (winid, XCHAR_P, XCHAR_P, int, int));
extern void FDECL(safe_print_glyph, (winid, XCHAR_P, XCHAR_P,
int, int, unsigned *));
extern void FDECL(safe_raw_print, (const char *));
extern void FDECL(safe_raw_print_bold, (const char *));
extern int NDECL(safe_nhgetch);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 wintty.h $NHDT-Date: 1594169998 2020/07/08 00:59:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.43 $ */
/* NetHack 3.7 wintty.h $NHDT-Date: 1596498572 2020/08/03 23:49:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.44 $ */
/* Copyright (c) David Cohrs, 1991,1992 */
/* NetHack may be freely redistributed. See license for details. */
@@ -52,6 +52,12 @@ struct WinDesc {
#define WIN_STOP 1 /* for NHW_MESSAGE; stops output */
#define WIN_LOCKHISTORY 2 /* for NHW_MESSAGE; suppress history updates */
/* topline states */
#define TOPLINE_EMPTY 0 /* empty */
#define TOPLINE_NEED_MORE 1 /* non-empty, need --More-- */
#define TOPLINE_NON_EMPTY 2 /* non-empty, no --More-- required */
#define TOPLINE_SPECIAL_PROMPT 3 /* special prompt state */
/* descriptor for tty-based displays -- all the per-display data */
struct DisplayDesc {
short rows, cols; /* width and height of tty display */
@@ -205,7 +211,7 @@ E void FDECL(tty_cliparound, (int, int));
#ifdef POSITIONBAR
E void FDECL(tty_update_positionbar, (char *));
#endif
E void FDECL(tty_print_glyph, (winid, XCHAR_P, XCHAR_P, int, int));
E void FDECL(tty_print_glyph, (winid, XCHAR_P, XCHAR_P, int, int, unsigned *));
E void FDECL(tty_raw_print, (const char *));
E void FDECL(tty_raw_print_bold, (const char *));
E int NDECL(tty_nhgetch);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 wintype.h $NHDT-Date: 1549327486 2019/02/05 00:44:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.19 $ */
/* NetHack 3.7 wintype.h $NHDT-Date: 1596498573 2020/08/03 23:49:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.23 $ */
/* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 xwindow.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 xwindow.h $NHDT-Date: 1596498574 2020/08/03 23:49:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 xwindowp.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.8 $ */
/* NetHack 3.7 xwindowp.h $NHDT-Date: 1596498575 2020/08/03 23:49:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.9 $ */
/* Copyright (c) Dean Luick, 1992 */
/* NetHack may be freely redistributed. See license for details. */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 you.h $NHDT-Date: 1593768079 2020/07/03 09:21:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.46 $ */
/* NetHack 3.7 you.h $NHDT-Date: 1596498576 2020/08/03 23:49:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.48 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2016. */
/* NetHack may be freely redistributed. See license for details. */
@@ -93,7 +93,9 @@ enum achivements {
ACH_NOVL = 20, /* read at least one passage from a Discworld novel */
ACH_SOKO = 21, /* entered Sokoban */
ACH_BGRM = 22, /* entered Bigroom (not guaranteed to be in every dgn) */
/* 23..30 are negated if hero is female at the time new rank is gained */
/* role's rank titles, beyond first (#0 at level one, not an achievement);
23..30 are negated if hero is female at the time new rank is gained
so that disclosing them can use the gender which applied at the time */
ACH_RNK1 = 23, ACH_RNK2 = 24, ACH_RNK3 = 25, ACH_RNK4 = 26,
ACH_RNK5 = 27, ACH_RNK6 = 28, ACH_RNK7 = 29, ACH_RNK8 = 30,
/* foo=31, 1 available potential achievement; #32 currently off-limits */
@@ -102,6 +104,8 @@ enum achivements {
/*
* Other potential achievements to track (this comment briefly resided
* in encodeachieve(topten.c) and has been revised since moving here:
* AC <= 0, AC <= -10, AC <= -20 (stop there; lower is better but
* not something to encourage with achievements),
* got quest summons,
* entered quest branch,
* chatted with leader,
@@ -334,6 +338,15 @@ enum utraptypes {
TT_BURIEDBALL = 5
};
enum utotypes {
UTOTYPE_NONE = 0x00,
UTOTYPE_ATSTAIRS = 0x01,
UTOTYPE_FALLING = 0x02,
UTOTYPE_PORTAL = 0x04,
UTOTYPE_RMPORTAL = 0x10, /* remove portal */
UTOTYPE_DEFERRED = 0x20 /* deferred_goto */
};
/*** Information about the player ***/
struct you {
xchar ux, uy; /* current map coordinates */
@@ -359,7 +372,7 @@ struct you {
char ushops_entered[5]; /* ditto, shops entered this turn */
char ushops_left[5]; /* ditto, shops exited this turn */
int uhunger; /* refd only in eat.c and shk.c */
int uhunger; /* refd only in eat.c and shk.c (also insight.c) */
unsigned uhs; /* hunger state - see eat.c */
struct prop uprops[LAST_PROP + 1];
@@ -422,14 +435,18 @@ struct you {
#define A_CURRENT 0
aligntyp ualignbase[CONVERT]; /* for ualign conversion record */
schar uluck, moreluck; /* luck and luck bonus */
/* default u.uluck is 0 except on special days (full moon: +1, Fri 13: -1,
both: 0); equilibrium for luck timeout is changed to those values,
but Luck max and min stay at 10+3 and -10-3 even on those days */
#define Luck (u.uluck + u.moreluck)
#define LUCKADD 3 /* value of u.moreluck when carrying luck stone;
+ when blessed or uncursed, - when cursed */
#define LUCKMAX 10 /* maximum value of u.ulUck */
* +3 when blessed or uncursed, -3 when cursed */
#define LUCKMAX 10 /* maximum value of u.uluck */
#define LUCKMIN (-10) /* minimum value of u.uluck */
schar uhitinc;
schar udaminc;
schar uac;
#define AC_MAX 99 /* abs(u.uac) <= 99; likewise for monster AC */
uchar uspellprot; /* protection by SPE_PROTECTION */
uchar usptime; /* #moves until uspellprot-- */
uchar uspmtime; /* #moves between uspellprot-- */
@@ -462,5 +479,6 @@ struct you {
}; /* end of `struct you' */
#define Upolyd (u.umonnum != u.umonster)
#define Ugender ((Upolyd ? u.mfemale : flags.female) ? 1 : 0)
#endif /* YOU_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 youprop.h $NHDT-Date: 1579655025 2020/01/22 01:03:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.30 $ */
/* NetHack 3.7 youprop.h $NHDT-Date: 1596498577 2020/08/03 23:49:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.32 $ */
/* Copyright (c) 1989 Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */