Merge remote-tracking branch 'origin/NetHack-3.6.0'
This commit is contained in:
@@ -27,42 +27,18 @@ Astral Plane \GXXXXNNNN:123456 HP:1234(1234) Pw:1234(1234) AC:-127
|
||||
#define MAXCO (COLNO + 40)
|
||||
#endif
|
||||
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
#if 0
|
||||
/* clang-format off */
|
||||
#define BL_FLUSH -1
|
||||
#define BL_TITLE 0
|
||||
#define BL_STR 1
|
||||
#define BL_DX 2
|
||||
#define BL_CO 3
|
||||
#define BL_IN 4
|
||||
#define BL_WI 5
|
||||
#define BL_CH 6
|
||||
#define BL_ALIGN 7
|
||||
#define BL_SCORE 8
|
||||
#define BL_CAP 9
|
||||
#define BL_GOLD 10
|
||||
#define BL_ENE 11
|
||||
#define BL_ENEMAX 12
|
||||
#define BL_XP 13
|
||||
#define BL_AC 14
|
||||
#define BL_HD 15
|
||||
#define BL_TIME 16
|
||||
#define BL_HUNGER 17
|
||||
#define BL_HP 18
|
||||
#define BL_HPMAX 19
|
||||
#define BL_LEVELDESC 20
|
||||
#define BL_EXP 21
|
||||
#define BL_CONDITION 22
|
||||
/* clang-format on */
|
||||
enum statusfields {
|
||||
BL_CHARACTERISTICS = -2, /* alias for BL_STR..BL_CH */
|
||||
BL_FLUSH = -1, BL_TITLE = 0,
|
||||
BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, /* 1..6 */
|
||||
BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX, /* 7..12 */
|
||||
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, BL_LEVELDESC, /* 13..20 */
|
||||
BL_EXP, BL_CONDITION
|
||||
};
|
||||
|
||||
#else
|
||||
enum statusfields { BL_FLUSH = -1, BL_TITLE = 0, BL_STR, BL_DX, BL_CO, BL_IN,
|
||||
BL_WI, BL_CH, BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX,
|
||||
BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, BL_LEVELDESC,
|
||||
BL_EXP, BL_CONDITION };
|
||||
#endif
|
||||
#define MAXBLSTATS BL_CONDITION+1
|
||||
enum relationships { LT_VALUE = -1, EQ_VALUE, GT_VALUE, TXT_VALUE };
|
||||
|
||||
#define MAXBLSTATS (BL_CONDITION + 1)
|
||||
|
||||
#define BEFORE 0
|
||||
#define NOW 1
|
||||
@@ -87,7 +63,7 @@ BL_EXP, BL_CONDITION };
|
||||
|
||||
#define REASSESS_ONLY TRUE
|
||||
|
||||
#ifdef STATUS_HILITES
|
||||
/* #ifdef STATUS_HILITES */
|
||||
/* hilite status field behavior - coloridx values */
|
||||
#define BL_HILITE_NONE -1 /* no hilite of this field */
|
||||
#define BL_HILITE_INVERSE -2 /* inverse hilite */
|
||||
@@ -98,9 +74,26 @@ BL_EXP, BL_CONDITION };
|
||||
#define BL_TH_VAL_ABSOLUTE 101 /* threshold is particular value */
|
||||
#define BL_TH_UPDOWN 102 /* threshold is up or down change */
|
||||
#define BL_TH_CONDITION 103 /* threshold is bitmask of conditions */
|
||||
#endif
|
||||
#define BL_TH_TEXTMATCH 104 /* threshold text value to match against */
|
||||
#define BL_TH_ALWAYS_HILITE 105 /* highlight regardless of value */
|
||||
|
||||
|
||||
#define HL_ATTCLR_DIM CLR_MAX + 0
|
||||
#define HL_ATTCLR_BLINK CLR_MAX + 1
|
||||
#define HL_ATTCLR_ULINE CLR_MAX + 2
|
||||
#define HL_ATTCLR_INVERSE CLR_MAX + 3
|
||||
#define HL_ATTCLR_BOLD CLR_MAX + 4
|
||||
#define BL_ATTCLR_MAX CLR_MAX + 5
|
||||
|
||||
enum hlattribs { HL_UNDEF = 0x00,
|
||||
HL_NONE = 0x01,
|
||||
HL_BOLD = 0x02,
|
||||
HL_INVERSE = 0x04,
|
||||
HL_ULINE = 0x08,
|
||||
HL_BLINK = 0x10,
|
||||
HL_DIM = 0x20 };
|
||||
/* #endif STATUS_HILITES */
|
||||
|
||||
extern const char *status_fieldnames[]; /* in botl.c */
|
||||
#endif
|
||||
|
||||
#endif /* BOTL_H */
|
||||
|
||||
@@ -498,9 +498,7 @@ typedef unsigned char uchar;
|
||||
* Only available with POSIX_TYPES or GNU C */
|
||||
/* #define MSGHANDLER */
|
||||
|
||||
/* #define STATUS_VIA_WINDOWPORT */ /* re-work of the status line
|
||||
updating process */
|
||||
/* #define STATUS_HILITES */ /* support hilites of status fields */
|
||||
#define STATUS_HILITES /* support hilites of status fields */
|
||||
|
||||
/* #define WINCHAIN */ /* stacked window systems */
|
||||
|
||||
|
||||
@@ -325,9 +325,7 @@ E NEARDATA char **viz_array; /* could see/in sight row pointers */
|
||||
|
||||
/* Window system stuff */
|
||||
E NEARDATA winid WIN_MESSAGE;
|
||||
#ifndef STATUS_VIA_WINDOWPORT
|
||||
E NEARDATA winid WIN_STATUS;
|
||||
#endif
|
||||
E NEARDATA winid WIN_MAP, WIN_INVEN;
|
||||
|
||||
/* pline (et al) for a single string argument (suppress compiler warning) */
|
||||
|
||||
@@ -153,17 +153,17 @@ E long NDECL(botl_score);
|
||||
E int FDECL(describe_level, (char *));
|
||||
E const char *FDECL(rank_of, (int, SHORT_P, BOOLEAN_P));
|
||||
E void NDECL(bot);
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
E void FDECL(status_initialize, (BOOLEAN_P));
|
||||
E void NDECL(status_finish);
|
||||
E void FDECL(status_notify_windowport, (BOOLEAN_P));
|
||||
E void NDECL(status_eval_next_unhilite);
|
||||
#ifdef STATUS_HILITES
|
||||
E boolean FDECL(set_status_hilites, (char *op, BOOLEAN_P));
|
||||
E void FDECL(clear_status_hilites, (BOOLEAN_P));
|
||||
E char *FDECL(get_status_hilites, (char *, int));
|
||||
E boolean FDECL(parse_status_hl1, (char *op, BOOLEAN_P));
|
||||
E void NDECL(clear_status_hilites);
|
||||
E void NDECL(reset_status_hilites);
|
||||
E int NDECL(count_status_hilites);
|
||||
E boolean NDECL(status_hilite_menu);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ### cmd.c ### */
|
||||
|
||||
@@ -869,6 +869,7 @@ E char *FDECL(upstart, (char *));
|
||||
E char *FDECL(mungspaces, (char *));
|
||||
E char *FDECL(trimspaces, (char *));
|
||||
E char *FDECL(strip_newline, (char *));
|
||||
E char *FDECL(stripchars, (char *, const char *, const char *));
|
||||
E char *FDECL(eos, (char *));
|
||||
E boolean FDECL(str_end_is, (const char *, const char *));
|
||||
E char *FDECL(strkitten, (char *, CHAR_P));
|
||||
@@ -1536,7 +1537,7 @@ E void FDECL(Delay, (int));
|
||||
|
||||
/* ### mthrowu.c ### */
|
||||
|
||||
E int FDECL(thitu, (int, int, struct obj *, const char *));
|
||||
E int FDECL(thitu, (int, int, struct obj **, const char *));
|
||||
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 *));
|
||||
@@ -1714,8 +1715,11 @@ E boolean FDECL(parsesymbols, (char *));
|
||||
E struct symparse *FDECL(match_sym, (char *));
|
||||
E void NDECL(set_playmode);
|
||||
E int FDECL(sym_val, (const char *));
|
||||
E int FDECL(query_color, (const char *));
|
||||
E int FDECL(query_attr, (const char *));
|
||||
E const char *FDECL(clr2colorname, (int));
|
||||
E int FDECL(match_str2clr, (char *));
|
||||
E int FDECL(match_str2attr, (const char *, BOOLEAN_P));
|
||||
E boolean FDECL(add_menu_coloring, (char *));
|
||||
E boolean FDECL(get_menu_coloring, (char *, int *, int *));
|
||||
E void NDECL(free_menu_coloring);
|
||||
@@ -1886,7 +1890,7 @@ E int FDECL(dopotion, (struct obj *));
|
||||
E int FDECL(peffects, (struct obj *));
|
||||
E void FDECL(healup, (int, int, BOOLEAN_P, BOOLEAN_P));
|
||||
E void FDECL(strange_feeling, (struct obj *, const char *));
|
||||
E void FDECL(potionhit, (struct monst *, struct obj *, BOOLEAN_P));
|
||||
E void FDECL(potionhit, (struct monst *, struct obj *, int));
|
||||
E void FDECL(potionbreathe, (struct obj *));
|
||||
E int NDECL(dodip);
|
||||
E void FDECL(mongrantswish, (struct monst **));
|
||||
@@ -2458,7 +2462,7 @@ E void FDECL(check_caitiff, (struct monst *));
|
||||
E int FDECL(find_roll_to_hit,
|
||||
(struct monst *, UCHAR_P, struct obj *, int *, int *));
|
||||
E boolean FDECL(attack, (struct monst *));
|
||||
E boolean FDECL(hmon, (struct monst *, struct obj *, int));
|
||||
E boolean FDECL(hmon, (struct monst *, struct obj *, int, int));
|
||||
E int FDECL(damageum, (struct monst *, struct attack *));
|
||||
E void FDECL(missum, (struct monst *, struct attack *, BOOLEAN_P));
|
||||
E int FDECL(passive, (struct monst *, BOOLEAN_P, int, UCHAR_P, BOOLEAN_P));
|
||||
@@ -2739,16 +2743,11 @@ E void FDECL(genl_putmsghistory, (const char *, BOOLEAN_P));
|
||||
#ifdef HANGUPHANDLING
|
||||
E void NDECL(nhwindows_hangup);
|
||||
#endif
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
E void NDECL(genl_status_init);
|
||||
E void NDECL(genl_status_finish);
|
||||
E void FDECL(genl_status_enablefield,
|
||||
(int, const char *, const char *, BOOLEAN_P));
|
||||
E void FDECL(genl_status_update, (int, genericptr_t, int, int));
|
||||
#ifdef STATUS_HILITES
|
||||
E void FDECL(genl_status_threshold, (int, int, anything, int, int, int));
|
||||
#endif
|
||||
#endif
|
||||
E void FDECL(genl_status_update, (int, genericptr_t, int, int, int, unsigned long *));
|
||||
|
||||
E void FDECL(dump_open_log, (time_t));
|
||||
E void NDECL(dump_close_log);
|
||||
|
||||
@@ -251,7 +251,10 @@ struct instance_flags {
|
||||
boolean toptenwin; /* ending list in window instead of stdout */
|
||||
boolean use_background_glyph; /* use background glyph when appropriate */
|
||||
boolean use_menu_color; /* use color in menus; only if wc_color */
|
||||
boolean use_status_hilites; /* use color in status line */
|
||||
#ifdef STATUS_HILITES
|
||||
long hilite_delta; /* number of moves to leave a temp hilite lit */
|
||||
long unhilite_deadline; /* time when oldest temp hilite should be unlit */
|
||||
#endif
|
||||
boolean zerocomp; /* write zero-compressed save files */
|
||||
boolean rlecomp; /* alternative to zerocomp; run-length encoding
|
||||
* compression of levels when writing savefile */
|
||||
@@ -360,6 +363,7 @@ struct instance_flags {
|
||||
boolean wc2_wraptext; /* wrap text */
|
||||
boolean wc2_selectsaved; /* display a menu of user's saved games */
|
||||
boolean wc2_darkgray; /* try to use dark-gray color for black glyphs */
|
||||
boolean wc2_hitpointbar; /* show graphical bar representing hit points */
|
||||
boolean cmdassist; /* provide detailed assistance for some commands */
|
||||
boolean clicklook; /* allow right-clicking for look */
|
||||
boolean obsolete; /* obsolete options can point at this, it isn't used */
|
||||
|
||||
@@ -40,8 +40,9 @@ struct obj {
|
||||
unsigned owt;
|
||||
long quan; /* number of items */
|
||||
|
||||
schar spe; /* quality of weapon, armor or ring (+ or -);
|
||||
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;
|
||||
@@ -373,6 +374,12 @@ struct obj {
|
||||
#define ER_DAMAGED 2 /* object was damaged in some way */
|
||||
#define ER_DESTROYED 3 /* object was destroyed */
|
||||
|
||||
/* propeller method for potionhit() */
|
||||
#define POTHIT_HERO_BASH 0 /* wielded by hero */
|
||||
#define POTHIT_HERO_THROW 1 /* thrown by hero */
|
||||
#define POTHIT_MONST_THROW 2 /* thrown by a monster */
|
||||
#define POTHIT_OTHER_THROW 3 /* propelled by some other means [scatter()] */
|
||||
|
||||
/*
|
||||
* Notes for adding new oextra structures:
|
||||
*
|
||||
|
||||
@@ -73,16 +73,11 @@ struct window_procs {
|
||||
void FDECL((*win_preference_update), (const char *));
|
||||
char *FDECL((*win_getmsghistory), (BOOLEAN_P));
|
||||
void FDECL((*win_putmsghistory), (const char *, BOOLEAN_P));
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
void NDECL((*win_status_init));
|
||||
void NDECL((*win_status_finish));
|
||||
void FDECL((*win_status_enablefield),
|
||||
(int, const char *, const char *, BOOLEAN_P));
|
||||
void FDECL((*win_status_update), (int, genericptr_t, int, int));
|
||||
#ifdef STATUS_HILITES
|
||||
void FDECL((*win_status_threshold), (int, int, anything, int, int, int));
|
||||
#endif
|
||||
#endif
|
||||
void FDECL((*win_status_update), (int, genericptr_t, int, int, int, unsigned long *));
|
||||
boolean NDECL((*win_can_suspend));
|
||||
};
|
||||
|
||||
@@ -160,16 +155,11 @@ extern
|
||||
#define preference_update (*windowprocs.win_preference_update)
|
||||
#define getmsghistory (*windowprocs.win_getmsghistory)
|
||||
#define putmsghistory (*windowprocs.win_putmsghistory)
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
/* there is a status_initialize() in botl.c,
|
||||
* which calls win_status_init() directly; same with status_finish.
|
||||
*/
|
||||
#define status_enablefield (*windowprocs.win_status_enablefield)
|
||||
#define status_update (*windowprocs.win_status_update)
|
||||
#ifdef STATUS_HILITES
|
||||
#define status_threshold (*windowprocs.win_status_threshold)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* WINCAP
|
||||
@@ -221,7 +211,10 @@ extern
|
||||
#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 WC2_HITPOINTBAR 0x0040L /* 07 show bar representing hit points */
|
||||
#define WC2_FLUSH_STATUS 0x0080L /* 08 call status_update(BL_FLUSH)
|
||||
after updating status window fields */
|
||||
/* 24 free bits */
|
||||
|
||||
#define ALIGN_LEFT 1
|
||||
#define ALIGN_RIGHT 2
|
||||
@@ -362,17 +355,11 @@ struct chain_procs {
|
||||
void FDECL((*win_preference_update), (CARGS, const char *));
|
||||
char *FDECL((*win_getmsghistory), (CARGS, BOOLEAN_P));
|
||||
void FDECL((*win_putmsghistory), (CARGS, const char *, BOOLEAN_P));
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
void FDECL((*win_status_init), (CARGS));
|
||||
void FDECL((*win_status_finish), (CARGS));
|
||||
void FDECL((*win_status_enablefield),
|
||||
(CARGS, int, const char *, const char *, BOOLEAN_P));
|
||||
void FDECL((*win_status_update), (CARGS, int, genericptr_t, int, int));
|
||||
#ifdef STATUS_HILITES
|
||||
void FDECL((*win_status_threshold),
|
||||
(CARGS, int, int, anything, int, int, int));
|
||||
#endif
|
||||
#endif
|
||||
void FDECL((*win_status_update), (CARGS, int, genericptr_t, int, int, int, unsigned long));
|
||||
boolean FDECL((*win_can_suspend), (CARGS));
|
||||
};
|
||||
#endif /* WINCHAIN */
|
||||
|
||||
@@ -215,13 +215,8 @@ E short FDECL(set_tty_font_name, (winid, char *));
|
||||
#endif
|
||||
E char *NDECL(tty_get_color_string);
|
||||
#endif
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
E void NDECL(tty_status_init);
|
||||
E void FDECL(tty_status_update, (int, genericptr_t, int, int));
|
||||
#ifdef STATUS_HILITES
|
||||
E void FDECL(tty_status_threshold, (int, int, anything, int, int, int));
|
||||
#endif
|
||||
#endif
|
||||
E void FDECL(tty_status_update, (int, genericptr_t, int, int, int, unsigned long *));
|
||||
|
||||
/* other defs that really should go away (they're tty specific) */
|
||||
E void NDECL(tty_start_screen);
|
||||
|
||||
Reference in New Issue
Block a user