Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-07-13 00:38:10 -04:00
27 changed files with 123 additions and 89 deletions

View File

@@ -881,7 +881,7 @@ enum earlyarg e_arg;
* optimization so that display output
* can be debugged without buffering.
*/
void
STATIC_OVL void
debug_fields(opts)
const char *opts;
{

View File

@@ -1595,7 +1595,7 @@ int x,y;
&& is_valid_jump_pos(x, y, g.jumping_is_magic, FALSE));
}
void
STATIC_OVL void
display_jump_positions(state)
int state;
{
@@ -2848,7 +2848,7 @@ static const char
cant_reach[] = "can't reach that spot from here.";
/* find pos of monster in range, if only one monster */
boolean
STATIC_OVL boolean
find_poleable_mon(pos, min_range, max_range)
coord *pos;
int min_range, max_range;
@@ -2901,7 +2901,7 @@ int x, y;
&& distu(x, y) <= g.polearm_range_max);
}
void
STATIC_OVL void
display_polearm_positions(state)
int state;
{

View File

@@ -520,7 +520,7 @@ STATIC_VAR struct istat_s initblstats[MAXBLSTATS] = {
* without STATUS_HILITES.
*/
void
STATIC_OVL void
bot_via_windowport()
{
char buf[BUFSZ];
@@ -2769,7 +2769,7 @@ status_hilite_linestr_gather()
}
char *
STATIC_OVL char *
status_hilite2str(hl)
struct hilite_s *hl;
{

View File

@@ -2567,7 +2567,7 @@ int final;
}
/* attributes: intrinsics and the like, other non-obvious capabilities */
void
STATIC_OVL void
attributes_enlightenment(unused_mode, final)
int unused_mode UNUSED;
int final;

View File

@@ -897,7 +897,7 @@ xchar x, y;
}
}
int
STATIC_OVL int
tether_glyph(x, y)
int x, y;
{

View File

@@ -1341,7 +1341,7 @@ domove()
g.domove_attempting = 0L;
}
void
STATIC_OVL void
domove_core()
{
register struct monst *mtmp;
@@ -1939,7 +1939,7 @@ domove_core()
}
}
void
STATIC_OVL void
maybe_smudge_engr(x1,y1,x2,y2)
int x1, y1, x2, y2;
{

View File

@@ -19,7 +19,9 @@
#define ISAAC64_MASK ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
#if !defined(HAS_INLINE)
#define HAS_INLINE
#endif
#else
# if (defined(__GNUC__) && __GNUC__ >= 2 && !defined(inline))
# define inline __inline__

View File

@@ -1033,7 +1033,7 @@ newmextra()
return mextra;
}
boolean
STATIC_OVL boolean
makemon_rnd_goodpos(mon, gpflags, cc)
struct monst *mon;
unsigned gpflags;

View File

@@ -613,7 +613,7 @@ fixup_special()
g.num_lregions = 0;
}
void
STATIC_OVL void
check_ransacked(s)
char *s;
{
@@ -624,7 +624,7 @@ char *s;
#define ORC_LEADER 1
static const char *orcfruit[] = { "paddle cactus", "dwarven root" };
void
STATIC_OVL void
migrate_orc(mtmp, mflags)
struct monst *mtmp;
unsigned long mflags;
@@ -689,7 +689,7 @@ struct monst *mtmp;
add_to_minv(mtmp, otmp);
}
}
void
STATIC_OVL void
migr_booty_item(otyp, gang)
int otyp;
const char *gang;
@@ -710,7 +710,7 @@ const char *gang;
}
}
void
STATIC_OVL void
stolen_booty(VOID_ARGS)
{
char *gang, gang_name[BUFSZ];

View File

@@ -43,7 +43,7 @@ const char *warnings[] = {
#endif /* 0 */
void
STATIC_OVL void
sanity_check_single_mon(mtmp, chk_geno, msg)
struct monst *mtmp;
boolean chk_geno;
@@ -2733,7 +2733,7 @@ struct monst *mtmp;
return;
}
void
STATIC_OVL void
deal_with_overcrowding(mtmp)
struct monst *mtmp;
{

View File

@@ -411,7 +411,7 @@ struct obj *obj;
return xname_flags(obj, CXN_NORMAL);
}
char *
STATIC_OVL char *
xname_flags(obj, cxn_flags)
register struct obj *obj;
unsigned cxn_flags; /* bitmask of CXN_xxx values */
@@ -2570,7 +2570,7 @@ const char *oldstr;
return bp;
}
boolean
STATIC_OVL boolean
badman(basestr, to_plural)
const char *basestr;
boolean to_plural; /* true => makeplural, false => makesingular */

View File

@@ -1589,7 +1589,7 @@ int typ;
return (char *) 0;
}
int
STATIC_OVL int
query_msgtype()
{
winid tmpwin;
@@ -1783,7 +1783,7 @@ const char *errmsg;
return retval;
}
boolean
STATIC_OVL boolean
add_menu_coloring_parsed(str, c, a)
char *str;
int c, a;

View File

@@ -1409,7 +1409,7 @@ static const char *suptext2[] = {
(char *) 0,
};
void
STATIC_OVL void
do_supplemental_info(name, pm, without_asking)
char *name;
struct permonst *pm;
@@ -1885,61 +1885,61 @@ docontact(VOID_ARGS)
destroy_nhwindow(cwin);
}
void
STATIC_OVL void
dispfile_help(VOID_ARGS)
{
display_file(HELP, TRUE);
}
void
STATIC_OVL void
dispfile_shelp(VOID_ARGS)
{
display_file(SHELP, TRUE);
}
void
STATIC_OVL void
dispfile_optionfile(VOID_ARGS)
{
display_file(OPTIONFILE, TRUE);
}
void
STATIC_OVL void
dispfile_license(VOID_ARGS)
{
display_file(LICENSE, TRUE);
}
void
STATIC_OVL void
dispfile_debughelp(VOID_ARGS)
{
display_file(DEBUGHELP, TRUE);
}
void
STATIC_OVL void
hmenu_doextversion(VOID_ARGS)
{
(void) doextversion();
}
void
STATIC_OVL void
hmenu_dohistory(VOID_ARGS)
{
(void) dohistory();
}
void
STATIC_OVL void
hmenu_dowhatis(VOID_ARGS)
{
(void) dowhatis();
}
void
STATIC_OVL void
hmenu_dowhatdoes(VOID_ARGS)
{
(void) dowhatdoes();
}
void
STATIC_OVL void
hmenu_doextlist(VOID_ARGS)
{
(void) doextlist();

View File

@@ -1697,7 +1697,7 @@ int x, y;
return FALSE;
}
int
STATIC_OVL int
do_loot_cont(cobjp, cindex, ccount)
struct obj **cobjp;
int cindex, ccount; /* index of this container (1..N), number of them (N) */

View File

@@ -572,4 +572,21 @@ VA_DECL(const char *, str)
#endif
}
/* nhassert_failed is called when an nhassert's condition is false */
void
nhassert_failed(filepath, line)
const char * filepath;
int line;
{
const char * filename;
/* attempt to get filename from path. TODO: we really need a port provided
* function to return a filename from a path */
filename = strrchr(filepath, '/');
filename = (filename == NULL ? strrchr(filepath, '\\') : filename);
filename = (filename == NULL ? filepath : filename + 1);
impossible("nhassert failed in file '%s' at line %d", filename, line);
}
/*pline.c*/

View File

@@ -569,7 +569,7 @@ int how;
putmsghistory(out_line, FALSE);
}
boolean
STATIC_OVL boolean
skip_pager(common)
boolean common;
{

View File

@@ -2719,7 +2719,7 @@ boolean ininv, dummy, silent;
}
}
void
STATIC_OVL void
append_honorific(buf)
char *buf;
{

View File

@@ -1140,10 +1140,10 @@ struct monst *mtmp;
sent out of his room (caller might resort to goodpos() if
we report failure here, so this isn't full prevention) */
if (mtmp->isshk && inhishop(mtmp)) {
if (levl[x][y].roomno != ESHK(mtmp)->shoproom)
if (levl[x][y].roomno != (unsigned char) ESHK(mtmp)->shoproom)
return FALSE;
} else if (mtmp->ispriest && inhistemple(mtmp)) {
if (levl[x][y].roomno != EPRI(mtmp)->shroom)
if (levl[x][y].roomno != (unsigned char) EPRI(mtmp)->shroom)
return FALSE;
}
/* current location is <xx,yy> */