Merge remote-tracking branch 'origin/NetHack-3.6.0'

This commit is contained in:
keni
2017-08-15 07:59:38 -04:00
51 changed files with 2521 additions and 1573 deletions

View File

@@ -389,6 +389,14 @@ E char *fqn_prefix_names[PREFIX_COUNT];
E NEARDATA struct savefile_info sfcap, sfrestinfo, sfsaveinfo;
struct opvar {
xchar spovartyp; /* one of SPOVAR_foo */
union {
char *str;
long l;
} vardata;
};
struct autopickup_exception {
struct nhregex *regex;
char *pattern;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1496959470 2017/06/08 22:04:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.591 $ */
/* NetHack 3.6 extern.h $NHDT-Date: 1502753404 2017/08/14 23:30:04 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.600 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -384,9 +384,9 @@ E void NDECL(heal_legs);
/* ### do_name.c ### */
E char *FDECL(coord_desc, (int, int, char *, CHAR_P));
E boolean FDECL(getpos_menu, (coord *, BOOLEAN_P, int));
E boolean FDECL(getpos_menu, (coord *, int));
E int FDECL(getpos, (coord *, BOOLEAN_P, const char *));
E void FDECL(getpos_sethilite, (void (*f)(int)));
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_oname, (struct obj *, int));
@@ -1312,6 +1312,7 @@ E struct obj *FDECL(obj_nexto, (struct obj *));
E struct obj *FDECL(obj_nexto_xy, (struct obj *, int, int, BOOLEAN_P));
E struct obj *FDECL(obj_absorb, (struct obj **, struct obj **));
E struct obj *FDECL(obj_meld, (struct obj **, struct obj **));
E void FDECL(pudding_merge_message, (struct obj *, struct obj *));
/* ### mkroom.c ### */
@@ -1565,6 +1566,7 @@ E int FDECL(rnd_misc_item, (struct monst *));
E boolean FDECL(searches_for_item, (struct monst *, struct obj *));
E boolean FDECL(mon_reflects, (struct monst *, const char *));
E boolean FDECL(ureflects, (const char *, const char *));
E void FDECL(mcureblindness, (struct monst *, BOOLEAN_P));
E boolean FDECL(munstone, (struct monst *, BOOLEAN_P));
E boolean FDECL(munslime, (struct monst *, BOOLEAN_P));
@@ -1624,6 +1626,9 @@ E char *FDECL(simple_typename, (int));
E boolean FDECL(obj_is_pname, (struct obj *));
E char *FDECL(distant_name, (struct obj *, char *(*)(OBJ_P)));
E char *FDECL(fruitname, (BOOLEAN_P));
E struct fruit *FDECL(fruit_from_indx, (int));
E struct fruit *FDECL(fruit_from_name, (const char *, BOOLEAN_P, int *));
E void FDECL(reorder_fruit, (BOOLEAN_P));
E char *FDECL(xname, (struct obj *));
E char *FDECL(mshot_xname, (struct obj *));
E boolean FDECL(the_unique_obj, (struct obj *));
@@ -1833,12 +1838,6 @@ E void VDECL(There, (const char *, ...)) PRINTF_F(1, 2);
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 const char *FDECL(align_str, (ALIGNTYP_P));
E void FDECL(mstatusline, (struct monst *));
E void NDECL(ustatusline);
E void NDECL(self_invis_message);
E char *FDECL(piousness, (BOOLEAN_P, const char *));
E void FDECL(pudding_merge_message, (struct obj *, struct obj *));
/* ### polyself.c ### */
@@ -1876,6 +1875,7 @@ E void FDECL(make_stoned, (long, const char *, int, const char *));
E void FDECL(make_vomiting, (long, BOOLEAN_P));
E boolean FDECL(make_hallucinated, (long, BOOLEAN_P, long));
E void FDECL(make_deaf, (long, BOOLEAN_P));
E void NDECL(self_invis_message);
E int NDECL(dodrink);
E int FDECL(dopotion, (struct obj *));
E int FDECL(peffects, (struct obj *));
@@ -1932,6 +1932,10 @@ E void NDECL(clearpriests);
E void FDECL(restpriest, (struct monst *, BOOLEAN_P));
E void FDECL(newepri, (struct monst *));
E void FDECL(free_epri, (struct monst *));
E const char *FDECL(align_str, (ALIGNTYP_P));
E char *FDECL(piousness, (BOOLEAN_P, const char *));
E void FDECL(mstatusline, (struct monst *));
E void NDECL(ustatusline);
/* ### quest.c ### */
@@ -2250,6 +2254,11 @@ E boolean
FDECL(dig_corridor, (coord *, coord *, BOOLEAN_P, SCHAR_P, SCHAR_P));
E void FDECL(fill_room, (struct mkroom *, BOOLEAN_P));
E boolean FDECL(load_special, (const char *));
E xchar FDECL(selection_getpoint, (int, int, struct opvar *));
E struct opvar *FDECL(selection_opvar, (char *));
E void FDECL(opvar_free_x, (struct opvar *));
E void FDECL(set_selection_floodfillchk, (int FDECL((*), (int,int))));
E void FDECL(selection_floodfill, (struct opvar *, int, int, BOOLEAN_P));
/* ### spell.c ### */
@@ -2505,6 +2514,7 @@ E int FDECL(hide_privileges, (BOOLEAN_P));
E void FDECL(newegd, (struct monst *));
E void FDECL(free_egd, (struct monst *));
E boolean FDECL(grddead, (struct monst *));
E void NDECL(vault_summon_gd);
E char FDECL(vault_occupied, (char *));
E void NDECL(invault);
E int FDECL(gd_move, (struct monst *));

View File

@@ -176,6 +176,14 @@ struct sysflag {
#define GPCOORDS_COMFULL 'f'
#define GPCOORDS_SCREEN 's'
enum getloc_filters {
GFILTER_NONE = 0,
GFILTER_VIEW,
GFILTER_AREA,
NUM_GFILTER
};
struct instance_flags {
/* stuff that really isn't option or platform related. They are
* set and cleared during the game to control the internal
@@ -194,8 +202,9 @@ struct instance_flags {
#define TER_MON 0x08
#define TER_DETECT 0x10 /* detect_foo magic rather than #terrain */
boolean getloc_travelmode;
boolean getloc_limitview;
int getloc_filter; /* GFILTER_foo */
boolean getloc_usemenu;
boolean getloc_moveskip;
coord travelcc; /* coordinates for travel_cache */
boolean window_inited; /* true if init_nhwindows() completed */
boolean vision_inited; /* true if vision is ready */
@@ -483,9 +492,12 @@ enum nh_keyfunc {
NHKF_GETPOS_UNEX_PREV,
NHKF_GETPOS_INTERESTING_NEXT,
NHKF_GETPOS_INTERESTING_PREV,
NHKF_GETPOS_VALID_NEXT,
NHKF_GETPOS_VALID_PREV,
NHKF_GETPOS_HELP,
NHKF_GETPOS_MENU,
NHKF_GETPOS_LIMITVIEW,
NHKF_GETPOS_MOVESKIP,
NUM_NHKF
};
@@ -496,6 +508,7 @@ enum gloctypes {
GLOC_DOOR,
GLOC_EXPLORE,
GLOC_INTERESTING,
GLOC_VALID,
NUM_GLOCS
};

View File

@@ -34,6 +34,9 @@ enum encumbrance_types {
/* weight increment of heavy iron ball */
#define IRON_BALL_W_INCR 160
/* number of turns it takes for vault guard to show up */
#define VAULT_GUARD_TIME 30
/* hunger states - see hu_stat in eat.c */
enum hunger_state_types {
SATIATED = 0,

View File

@@ -70,7 +70,7 @@ extern NEARDATA struct permonst mons[]; /* the master list of monster types */
#define FAST_SPEED 15
#define VERY_FAST 24
#define NON_PM PM_PLAYERMON /* "not a monster" */
#define NON_PM (-1) /* "not a monster" */
#define LOW_PM (NON_PM + 1) /* first monster in mons[] */
#define SPECIAL_PM PM_LONG_WORM_TAIL /* [normal] < ~ < [special] */
/* mons[SPECIAL_PM] through mons[NUMMONS-1], inclusive, are

View File

@@ -7,7 +7,7 @@
/*** What the properties are ***
*
* note: propertynames[] array in timeout.c must be kept in synch with these.
* note: propertynames[] array in timeout.c has string values for these.
* Property #0 is not used.
*/
/* Resistances to troubles */

View File

@@ -235,6 +235,12 @@ enum screen_symbols {
#define is_cmap_drawbridge(i) ((i) >= S_vodbridge && (i) <= S_hcdbridge)
#define is_cmap_door(i) ((i) >= S_vodoor && (i) <= S_hcdoor)
#define is_cmap_wall(i) ((i) >= S_stone && (i) <= S_trwall)
#define is_cmap_room(i) ((i) >= S_room && (i) <= S_darkroom)
#define is_cmap_corr(i) ((i) >= S_corr && (i) <= S_litcorr)
#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)
struct symdef {
uchar sym;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 sp_lev.h $NHDT-Date: 1470212260 2016/08/03 08:17:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.17 $ */
/* NetHack 3.6 sp_lev.h $NHDT-Date: 1501803105 2017/08/03 23:31:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.21 $ */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */
@@ -257,14 +257,6 @@ enum opcode_defs {
#define SP_MAPCHAR_LIT(l) ((((l) >> 8) & 0xffff) - 10)
#define SP_MAPCHAR_PACK(typ, lit) (((10 + (lit)) << 8) | ((typ) & 0xff))
struct opvar {
xchar spovartyp; /* one of SPOVAR_foo */
union {
char *str;
long l;
} vardata;
};
struct splev_var {
struct splev_var *next;
char *name;
@@ -493,61 +485,52 @@ struct lc_breakdef {
#ifdef SPEC_LEV
/* compiling lev_comp rather than nethack */
#ifdef USE_OLDARGS
#undef VA_ARGS
#undef VA_DECL
#undef VA_DECL2
#undef VA_SHIFT
#ifndef VA_TYPE
typedef const char *vA;
#define VA_TYPE
#endif
#undef VA_ARGS /* redefine with the maximum number actually used */
#undef VA_SHIFT /* ditto */
#undef VA_PASS1
#define VA_ARGS \
arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, \
arg12, arg13, arg14
#define VA_DECL(typ1, var1) \
(var1, VA_ARGS) typ1 var1; \
char *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7, *arg8, *arg9, \
*arg10, *arg11, *arg12, *arg13, *arg14; \
{
#define VA_DECL2(typ1, var1, typ2, var2) \
(var1, var2, VA_ARGS) typ1 var1; \
typ2 var2; \
char *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7, *arg8, *arg9, \
*arg10, *arg11, *arg12, *arg13, *arg14; \
{
/* unlike in the core, lev_comp's VA_SHIFT is completely safe,
because callers always pass all these arguments */
/* Unlike in the core, lev_comp's VA_SHIFT should be completely safe,
because callers always pass all these arguments. */
#define VA_SHIFT() \
(arg1 = arg2, arg2 = arg3, arg3 = arg4, arg4 = arg5, arg5 = arg6, \
arg6 = arg7, arg7 = arg8, arg8 = arg9, arg9 = arg10, arg10 = arg11, \
arg11 = arg12, arg12 = arg13, arg13 = arg14, arg14 = 0)
/* standard NULL may be either (void *)0 or plain 0, both of
which would need to be explicitly cast to (char *) here */
typedef char *Va;
#define VA_PASS1(a1) \
(Va) a1, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, \
(Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, \
(vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS2(a1, a2) \
(Va) a1, (Va) a2, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, \
(Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) a2, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, \
(vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS3(a1, a2, a3) \
(Va) a1, (Va) a2, (Va) a3, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, \
(Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) a2, (vA) a3, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, \
(vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS4(a1, a2, a3, a4) \
(Va) a1, (Va) a2, (Va) a3, (Va) a4, (Va) 0, (Va) 0, (Va) 0, (Va) 0, \
(Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) a2, (vA) a3, (vA) a4, (vA) 0, (vA) 0, (vA) 0, (vA) 0, \
(vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS5(a1, a2, a3, a4, a5) \
(Va) a1, (Va) a2, (Va) a3, (Va) a4, (Va) a5, (Va) 0, (Va) 0, (Va) 0, \
(Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) a2, (vA) a3, (vA) a4, (vA) a5, (vA) 0, (vA) 0, (vA) 0, \
(vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS7(a1, a2, a3, a4, a5, a6, a7) \
(Va) a1, (Va) a2, (Va) a3, (Va) a4, (Va) a5, (Va) a6, (Va) a7, (Va) 0, \
(Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) a2, (vA) a3, (vA) a4, (vA) a5, (vA) a6, (vA) a7, (vA) 0, \
(vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS8(a1, a2, a3, a4, a5, a6, a7, a8) \
(Va) a1, (Va) a2, (Va) a3, (Va) a4, (Va) a5, (Va) a6, (Va) a7, (Va) a8, \
(Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) a2, (vA) a3, (vA) a4, (vA) a5, (vA) a6, (vA) a7, (vA) a8, \
(vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \
(Va) a1, (Va) a2, (Va) a3, (Va) a4, (Va) a5, (Va) a6, (Va) a7, (Va) a8, \
(Va) a9, (Va) 0, (Va) 0, (Va) 0, (Va) 0, (Va) 0
(vA) a1, (vA) a2, (vA) a3, (vA) a4, (vA) a5, (vA) a6, (vA) a7, (vA) a8, \
(vA) a9, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#define VA_PASS14(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, \
a14) \
(Va) a1, (Va) a2, (Va) a3, (Va) a4, (Va) a5, (Va) a6, (Va) a7, (Va) a8, \
(Va) a9, (Va) a10, (Va) a11, (Va) a12, (Va) a13, (Va) a14
(vA) a1, (vA) a2, (vA) a3, (vA) a4, (vA) a5, (vA) a6, (vA) a7, (vA) a8, \
(vA) a9, (vA) a10, (vA) a11, (vA) a12, (vA) a13, (vA) a14
#else /*!USE_OLDARGS*/
/* USE_STDARG and USE_VARARGS don't need to pass dummy arguments
or cast real ones */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 system.h $NHDT-Date: 1449269772 2015/12/04 22:56:12 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.6 system.h $NHDT-Date: 1501723401 2017/08/03 01:23:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.13 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -489,8 +489,17 @@ E int FDECL(vprintf, (const char *, va_list));
#endif
#endif
#else
#ifdef vprintf
#undef vprintf
#endif
#define vprintf printf
#ifdef vfprintf
#undef vfprintf
#endif
#define vfprintf fprintf
#ifdef vsprintf
#undef vsprintf
#endif
#define vsprintf sprintf
#endif
#endif /* NEED_VARARGS */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1448210011 2015/11/22 16:33:31 $ $NHDT-Branch: master $:$NHDT-Revision: 1.27 $ */
/* NetHack 3.6 tradstdc.h $NHDT-Date: 1501803107 2017/08/03 23:31:47 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.29 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -100,6 +100,7 @@
#define VA_END() \
va_end(the_args); \
}
#define VA_PASS1(a1) a1
#if defined(ULTRIX_PROTO) && !defined(_VA_LIST_)
#define _VA_LIST_ /* prevents multiple def in stdio.h */
#endif
@@ -125,18 +126,27 @@
#define VA_END() \
va_end(the_args); \
}
#define VA_PASS1(a1) a1
#else
/*USE_OLDARGS*/
/*
* CAVEAT: passing double (including float promoted to double) will
* almost certainly break this, as would any integer type bigger than
* sizeof (char *).
* NetHack avoids floating point, and any configuration able to use
* 'long long int' or I64P32 or the like should be using USE_STDARG.
*/
#ifndef VA_TYPE
typedef const char *vA;
#define VA_TYPE
#endif
#define VA_ARGS arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
#define VA_DECL(typ1, var1) \
(var1, VA_ARGS) typ1 var1; \
char *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7, *arg8, *arg9; \
(var1, VA_ARGS) typ1 var1; vA VA_ARGS; \
{
#define VA_DECL2(typ1, var1, typ2, var2) \
(var1, var2, VA_ARGS) typ1 var1; \
typ2 var2; \
char *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7, *arg8, *arg9; \
(var1, var2, VA_ARGS) typ1 var1; typ2 var2; vA VA_ARGS; \
{
#define VA_START(x)
#define VA_INIT(var1, typ1)
@@ -151,9 +161,12 @@
*/
#define VA_SHIFT() \
(arg1 = arg2, arg2 = arg3, arg3 = arg4, arg4 = arg5, arg5 = arg6, \
arg6 = arg7, arg7 = arg8, arg8 = arg9)
arg6 = arg7, arg7 = arg8, arg8 = arg9, arg9 = 0)
#define VA_NEXT(var1, typ1) ((var1 = (typ1) arg1), VA_SHIFT(), var1)
#define VA_END() }
/* needed in pline.c, where full number of arguments is known and expected */
#define VA_PASS1(a1) \
(vA) a1, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0, (vA) 0
#endif
#endif
@@ -380,7 +393,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
* append this to a prototype declaration (see pline() in extern.h).
*/
#ifdef __GNUC__
#if __GNUC__ >= 2
#if (__GNUC__ >= 2) && !defined(USE_OLDARGS)
#define PRINTF_F(f, v) __attribute__((format(printf, f, v)))
#endif
#if __GNUC__ >= 3

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 winprocs.h $NHDT-Date: 1433806582 2015/06/08 23:36:22 $ $NHDT-Branch: master $:$NHDT-Revision: 1.36 $ */
/* NetHack 3.6 winprocs.h $NHDT-Date: 1502141230 2017/08/07 21:27:10 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.38 $ */
/* Copyright (c) David Cohrs, 1992 */
/* NetHack may be freely redistributed. See license for details. */
@@ -13,8 +13,7 @@ struct window_procs {
* not start with '-'. Names starting with
* '+' are reserved for processors. */
unsigned long wincap; /* window port capability options supported */
unsigned long
wincap2; /* additional window port capability options supported */
unsigned long wincap2; /* additional window port capability options */
void FDECL((*win_init_nhwindows), (int *, char **));
void NDECL((*win_player_selection));
void NDECL((*win_askname));
@@ -177,91 +176,70 @@ extern
* Window port preference capability bits.
* Some day this might be better in its own wincap.h file.
*/
#define WC_COLOR 0x01L /* 01 Port can display things in color */
#define WC_HILITE_PET 0x02L /* 02 supports hilite pet */
#define WC_ASCII_MAP 0x04L /* 03 supports an ascii map */
#define WC_TILED_MAP 0x08L /* 04 supports a tiled map */
#define WC_PRELOAD_TILES 0x10L /* 05 supports pre-loading tiles */
#define WC_TILE_WIDTH 0x20L /* 06 prefer this width of tile */
#define WC_TILE_HEIGHT 0x40L /* 07 prefer this height of tile */
#define WC_TILE_FILE 0x80L /* 08 alternative tile file name */
#define WC_INVERSE 0x100L /* 09 Port supports inverse video */
#define WC_ALIGN_MESSAGE \
0x200L /* 10 supports message alignmt top|b|l|r */
#define WC_ALIGN_STATUS 0x400L /* 11 supports status alignmt top|b|l|r */
#define WC_VARY_MSGCOUNT \
0x800L /* 12 supports varying message window */
#define WC_FONT_MAP 0x1000L /* 13 supports specification of map win font */
#define WC_FONT_MESSAGE \
0x2000L /* 14 supports specification of msg win font */
#define WC_FONT_STATUS 0x4000L /* 15 supports specification of sts win font \
*/
#define WC_FONT_MENU 0x8000L /* 16 supports specification of mnu win font */
#define WC_FONT_TEXT 0x10000L /* 17 supports specification of txt win font \
*/
#define WC_FONTSIZ_MAP \
0x20000L /* 18 supports specification of map win font */
#define WC_FONTSIZ_MESSAGE \
0x40000L /* 19 supports specification of msg win font */
#define WC_FONTSIZ_STATUS \
0x80000L /* 20 supports specification of sts win font */
#define WC_FONTSIZ_MENU \
0x100000L /* 21 supports specification of mnu win font */
#define WC_FONTSIZ_TEXT \
0x200000L /* 22 supports specification of txt win font */
#define WC_SCROLL_MARGIN \
0x400000L /* 23 supports setting scroll margin for map */
#define WC_SPLASH_SCREEN \
0x800000L /* 24 supports display of splash screen */
#define WC_POPUP_DIALOG \
0x1000000L /* 25 supports queries in pop dialogs */
#define WC_SCROLL_AMOUNT \
0x2000000L /* 26 scroll this amount at scroll margin */
#define WC_EIGHT_BIT_IN \
0x4000000L /* 27 8-bit character input */
#define WC_PERM_INVENT \
0x8000000L /* 28 8-bit character input */
#define WC_MAP_MODE \
0x10000000L /* 29 map_mode option */
#define WC_WINDOWCOLORS \
0x20000000L /* 30 background color for message window */
#define WC_PLAYER_SELECTION \
0x40000000L /* 31 background color for message window */
/* clang-format off */
#define WC_COLOR 0x00000001L /* 01 Port can display things in color */
#define WC_HILITE_PET 0x00000002L /* 02 supports hilite pet */
#define WC_ASCII_MAP 0x00000004L /* 03 supports an ascii map */
#define WC_TILED_MAP 0x00000008L /* 04 supports a tiled map */
#define WC_PRELOAD_TILES 0x00000010L /* 05 supports pre-loading tiles */
#define WC_TILE_WIDTH 0x00000020L /* 06 prefer this width of tile */
#define WC_TILE_HEIGHT 0x00000040L /* 07 prefer this height of tile */
#define WC_TILE_FILE 0x00000080L /* 08 alternative tile file name */
#define WC_INVERSE 0x00000100L /* 09 Port supports inverse video */
#define WC_ALIGN_MESSAGE 0x00000200L /* 10 supports mesg alignment top|b|l|r */
#define WC_ALIGN_STATUS 0x00000400L /* 11 supports status alignmt top|b|l|r */
#define WC_VARY_MSGCOUNT 0x00000800L /* 12 supports varying message window */
#define WC_FONT_MAP 0x00001000L /* 13 supports spec of map window font */
#define WC_FONT_MESSAGE 0x00002000L /* 14 supports spec of message font */
#define WC_FONT_STATUS 0x00004000L /* 15 supports spec of status font */
#define WC_FONT_MENU 0x00008000L /* 16 supports spec of menu font */
#define WC_FONT_TEXT 0x00010000L /* 17 supports spec of text window font */
#define WC_FONTSIZ_MAP 0x00020000L /* 18 supports spec of map font size */
#define WC_FONTSIZ_MESSAGE 0x040000L /* 19 supports spec of mesg font size */
#define WC_FONTSIZ_STATUS 0x0080000L /* 20 supports spec of status font size */
#define WC_FONTSIZ_MENU 0x00100000L /* 21 supports spec of menu font size */
#define WC_FONTSIZ_TEXT 0x00200000L /* 22 supports spec of text font size */
#define WC_SCROLL_MARGIN 0x00400000L /* 23 supports setting map scroll marg */
#define WC_SPLASH_SCREEN 0x00800000L /* 24 supports display of splash screen */
#define WC_POPUP_DIALOG 0x01000000L /* 25 supports queries in popup dialogs */
#define WC_SCROLL_AMOUNT 0x02000000L /* 26 scroll this amount at scroll marg */
#define WC_EIGHT_BIT_IN 0x04000000L /* 27 8-bit character input */
#define WC_PERM_INVENT 0x08000000L /* 28 supports persistent inventory win */
#define WC_MAP_MODE 0x10000000L /* 29 map_mode option */
#define WC_WINDOWCOLORS 0x20000000L /* 30 background color for mesg window */
#define WC_PLAYER_SELECTION 0x40000000L /* 31 supports player selection */
#ifdef NHSTDC
#define WC_MOUSE_SUPPORT \
0x80000000UL /* 32 mouse support */
#define WC_MOUSE_SUPPORT 0x80000000UL /* 32 mouse support */
#else
#define WC_MOUSE_SUPPORT \
0x80000000L /* 32 mouse support */
#define WC_MOUSE_SUPPORT 0x80000000L /* 32 mouse support */
#endif
/* no free bits */
/* no free bits */
#define WC2_FULLSCREEN 0x01L /* 01 display full screen */
#define WC2_SOFTKEYBOARD 0x02L /* 02 software keyboard */
#define WC2_WRAPTEXT 0x04L /* 03 wrap long lines of text */
#define WC2_HILITE_STATUS \
0x08L /* 04 hilite fields in status */
#define WC2_SELECTSAVED 0x10L /* 05 saved game selection menu */
#define WC2_DARKGRAY 0x20L /* 06 use bold black for black glyphs */
/* 26 free bits */
#define WC2_FULLSCREEN 0x0001L /* 01 display full screen */
#define WC2_SOFTKEYBOARD 0x0002L /* 02 software keyboard */
#define WC2_WRAPTEXT 0x0004L /* 03 wrap long lines of text */
#define WC2_HILITE_STATUS 0x0008L /* 04 hilite fields in status */
#define WC2_SELECTSAVED 0x0010L /* 05 saved game selection menu */
#define WC2_DARKGRAY 0x0020L /* 06 use bold black for black glyphs */
/* 26 free bits */
#define ALIGN_LEFT 1
#define ALIGN_RIGHT 2
#define ALIGN_TOP 3
#define ALIGN_LEFT 1
#define ALIGN_RIGHT 2
#define ALIGN_TOP 3
#define ALIGN_BOTTOM 4
/* player_selection */
#define VIA_DIALOG 0
#define VIA_DIALOG 0
#define VIA_PROMPTS 1
/* map_mode settings - deprecated */
#define MAP_MODE_TILES 0
#define MAP_MODE_ASCII4x6 1
#define MAP_MODE_ASCII6x8 2
#define MAP_MODE_ASCII8x8 3
#define MAP_MODE_ASCII16x8 4
#define MAP_MODE_ASCII7x12 5
#define MAP_MODE_ASCII8x12 6
#define MAP_MODE_TILES 0
#define MAP_MODE_ASCII4x6 1
#define MAP_MODE_ASCII6x8 2
#define MAP_MODE_ASCII8x8 3
#define MAP_MODE_ASCII16x8 4
#define MAP_MODE_ASCII7x12 5
#define MAP_MODE_ASCII8x12 6
#define MAP_MODE_ASCII16x12 7
#define MAP_MODE_ASCII12x16 8
#define MAP_MODE_ASCII10x18 9
@@ -269,13 +247,13 @@ extern
#define MAP_MODE_TILES_FIT_TO_SCREEN 11
#if 0
#define WC_SND_SOUND 0x01L /* 01 Port has some sound capabilities */
#define WC_SND_SPEAKER 0x02L /* 02 Sound supported via built-in speaker */
#define WC_SND_STEREO 0x04L /* 03 Stereo sound supported */
#define WC_SND_RAW 0x08L /* 04 Raw sound supported */
#define WC_SND_WAVE 0x10L /* 05 Wave support */
#define WC_SND_MIDI 0x20L /* 06 Midi support */
/* 26 free bits */
#define WC_SND_SOUND 0x0001L /* 01 Port has some sound capabilities */
#define WC_SND_SPEAKER 0x0002L /* 02 Sound supported via built-in speaker */
#define WC_SND_STEREO 0x0004L /* 03 Stereo sound supported */
#define WC_SND_RAW 0x0008L /* 04 Raw sound supported */
#define WC_SND_WAVE 0x0010L /* 05 Wave support */
#define WC_SND_MIDI 0x0020L /* 06 Midi support */
/* 26 free bits */
#endif
struct wc_Opt {
@@ -284,17 +262,17 @@ struct wc_Opt {
};
/* role selection by player_selection(); this ought to be in the core... */
#define RS_NAME 0
#define RS_ROLE 1
#define RS_RACE 2
#define RS_GENDER 3
#define RS_NAME 0
#define RS_ROLE 1
#define RS_RACE 2
#define RS_GENDER 3
#define RS_ALGNMNT 4
#define RS_filter 5
#define RS_filter 5
#define RS_menu_arg(x) (ROLE_RANDOM - ((x) + 1)) /* 0..5 -> -3..-8 */
/* Choose_windows() may be called multiple times; these constants tell the
* init function whether the window system is coming or going. */
#define WININIT 0
#define WININIT 0
#define WININIT_UNDO 1
#ifdef WINCHAIN
@@ -310,7 +288,9 @@ struct wc_Opt {
nextdata is the Xprivate* for the next link in the chain
*/
#define WINCHAIN_ALLOC 0
#define WINCHAIN_INIT 1
#define WINCHAIN_INIT 1
/* clang-format on */
#define CARGS void *
@@ -321,8 +301,7 @@ struct chain_procs {
* not start with '-'. Names starting with
* '+' are reserved for processors. */
unsigned long wincap; /* window port capability options supported */
unsigned long
wincap2; /* additional window port capability options supported */
unsigned long wincap2; /* additional window port capability options */
void FDECL((*win_init_nhwindows), (CARGS, int *, char **));
void FDECL((*win_player_selection), (CARGS));
void FDECL((*win_askname), (CARGS));