Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp

Conflicts:
	doc/fixes35.0
	include/extern.h
	include/ntconf.h
	include/obj.h
	include/patchlevel.h
	src/dig.c
	src/do.c
	src/files.c
	src/fountain.c
	src/mklev.c
	src/objnam.c
	src/options.c
	src/potion.c
	src/rumors.c
	src/save.c
	src/topten.c
	src/trap.c
	src/wield.c
	sys/share/pcmain.c
	sys/unix/unixmain.c
	sys/winnt/Makefile.msc
	util/lev_main.c
	util/makedefs.c
This commit is contained in:
Pasi Kallinen
2015-03-24 19:46:38 +02:00
58 changed files with 1957 additions and 481 deletions

View File

@@ -187,6 +187,7 @@
#endif
#define LOGFILE "logfile" /* larger file for debugging purposes */
#define XLOGFILE "xlogfile" /* even larger logfile */
#define NEWS "news" /* the file containing the latest hack news */
#define PANICLOG "paniclog" /* log of panic and impossible events */

View File

@@ -67,6 +67,8 @@ E struct dgn_topology { /* special dungeon levels for speed */
xchar d_mines_dnum, d_quest_dnum;
d_level d_qstart_level, d_qlocate_level, d_nemesis_level;
d_level d_knox_level;
d_level d_mineend_level;
d_level d_sokoend_level;
} dungeon_topology;
/* macros for accesing the dungeon levels by their old names */
#define oracle_level (dungeon_topology.d_oracle_level)
@@ -97,6 +99,8 @@ E struct dgn_topology { /* special dungeon levels for speed */
#define qlocate_level (dungeon_topology.d_qlocate_level)
#define nemesis_level (dungeon_topology.d_nemesis_level)
#define knox_level (dungeon_topology.d_knox_level)
#define mineend_level (dungeon_topology.d_mineend_level)
#define sokoend_level (dungeon_topology.d_sokoend_level)
E NEARDATA stairway dnstair, upstair; /* stairs up and down */
#define xdnstair (dnstair.sx)
@@ -180,6 +184,7 @@ E NEARDATA struct kinfo {
E long done_money;
E const char *configfile;
E char lastconfigfile[BUFSZ]; /* used for messaging */
E NEARDATA char plname[PL_NSIZ];
E NEARDATA char dogname[];
E NEARDATA char catname[];
@@ -240,6 +245,7 @@ E NEARDATA anything zeroany; /* init'd and defined in decl.c */
#include "you.h"
E NEARDATA struct you u;
E NEARDATA time_t ubirthday;
E NEARDATA struct u_realtime urealtime;
#include "onames.h"
#ifndef PM_H /* (pm.h has already been included via youprop.h) */
@@ -357,9 +363,10 @@ E const char * const monexplain[], invisexplain[], * const oclass_names[];
#define DATAPREFIX 4 /* this one must match hardcoded value in dlb.c */
#define SCOREPREFIX 5
#define LOCKPREFIX 6
#define CONFIGPREFIX 7
#define TROUBLEPREFIX 8
#define PREFIX_COUNT 9
#define SYSCONFPREFIX 7
#define CONFIGPREFIX 8
#define TROUBLEPREFIX 9
#define PREFIX_COUNT 10
/* used in files.c; xxconf.h can override if needed */
# ifndef FQN_MAX_FILENAME
#define FQN_MAX_FILENAME 512

View File

@@ -122,6 +122,8 @@ typedef struct branch {
#define Is_qlocate(x) (on_level(x, &qlocate_level))
#define Is_nemesis(x) (on_level(x, &nemesis_level))
#define Is_knox(x) (on_level(x, &knox_level))
#define Is_mineend_level(x) (on_level(x, &mineend_level))
#define Is_sokoend_level(x) (on_level(x, &sokoend_level))
#define In_sokoban(x) ((x)->dnum == sokoban_dnum)
#define Inhell In_hell(&u.uz) /* now gehennom */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 extern.h $NHDT-Date: 1426496453 2015/03/16 09:00:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.407 $ */
/* NetHack 3.5 extern.h $NHDT-Date: 1426966688 2015/03/21 19:38:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.411 $ */
/* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -26,6 +26,7 @@ E void NDECL(stop_occupation);
E void NDECL(display_gamewindows);
E void NDECL(newgame);
E void FDECL(welcome, (BOOLEAN_P));
E time_t NDECL(get_realtime);
/* ### apply.c ### */
@@ -386,7 +387,7 @@ E char *FDECL(Adjmonnam, (struct monst *,const char *));
E char *FDECL(Amonnam, (struct monst *));
E char *FDECL(a_monnam, (struct monst *));
E char *FDECL(distant_monnam, (struct monst *,int,char *));
E const char *NDECL(rndmonnam);
E char *FDECL(rndmonnam, (char *));
E const char *FDECL(hcolor, (const char *));
E const char *NDECL(rndcolor);
E const char *NDECL(roguename);
@@ -738,6 +739,9 @@ E void FDECL(free_saved_games, (char**));
#ifdef SELF_RECOVER
E boolean NDECL(recover_savefile);
#endif
#ifdef SYSCF_FILE
E void NDECL(assure_syscf_file);
#endif
#ifdef HOLD_LOCKFILE_OPEN
E void NDECL(really_close);
#endif
@@ -812,6 +816,7 @@ E void FDECL(copynchars, (char *,const char *,int));
E char FDECL(chrcasecpy, (int,int));
E char *FDECL(strcasecpy, (char *,const char *));
E char *FDECL(s_suffix, (const char *));
E char *FDECL(ing_suffix, (const char *));
E char *FDECL(xcrypt, (const char *,char *));
E boolean FDECL(onlyspace, (const char *));
E char *FDECL(tabexpand, (char *));
@@ -1174,7 +1179,7 @@ E struct obj *FDECL(mkobj_at, (CHAR_P,int,int,BOOLEAN_P));
E struct obj *FDECL(mksobj_at, (int,int,int,BOOLEAN_P,BOOLEAN_P));
E struct obj *FDECL(mkobj, (CHAR_P,BOOLEAN_P));
E int NDECL(rndmonnum);
E boolean FDECL(bogon_is_pname, (const char *));
E boolean FDECL(bogon_is_pname, (CHAR_P));
E struct obj *FDECL(splitobj, (struct obj *,long));
E void FDECL(replace_object, (struct obj *,struct obj *));
E void FDECL(bill_dummy_object, (struct obj *));
@@ -1931,6 +1936,7 @@ E const char *NDECL(Goodbye);
/* ### rumors.c ### */
E char *FDECL(getrumor, (int,char *, BOOLEAN_P));
E char *FDECL(get_rnd_text, (const char *, char *));
E void FDECL(outrumor, (int,int));
E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P));
E void FDECL(save_oracles, (int,int));
@@ -2286,9 +2292,6 @@ E void NDECL(port_help);
E void FDECL(sethanguphandler, (void (*)(int)));
E boolean NDECL(authorize_wizard_mode);
E boolean FDECL(check_user_string, (char *));
# ifdef SYSCF_FILE
E void NDECL(assure_syscf_file);
# endif
#endif /* UNIX */
/* ### unixtty.c ### */

View File

@@ -30,6 +30,9 @@
#define OPTIONFILE "opthelp" /* file explaining runtime options */
#define OPTIONS_USED "options" /* compile-time options, for #version */
#define SYMBOLS "symbols" /* replacement symbol sets */
#define EPITAPHFILE "epitaph" /* random epitaphs on graves */
#define ENGRAVEFILE "engrave" /* random engravings on the floor */
#define BOGUSMONFILE "bogusmon" /* hallucinatory monsters */
#define LEV_EXT ".lev" /* extension for special level files */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 ntconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 ntconf.h $NHDT-Date: 1426966690 2015/03/21 19:38:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.37 $ */
/* NetHack 3.5 ntconf.h $Date: 2012/01/15 19:11:38 $ $Revision: 1.35 $ */
/* SCCS Id: @(#)ntconf.h 3.5 2002/03/10 */
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
@@ -25,6 +25,9 @@
#define SELF_RECOVER /* Allow the game itself to recover from an aborted game */
#define SYSCF /* Use a global configuration */
#define SYSCF_FILE "sysconf" /* Use a file to hold the SYSCF configuration */
#define USER_SOUNDS
#ifdef WIN32CON

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 obj.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 obj.h $NHDT-Date: 1426949157 2015/03/21 14:45:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.36 $ */
/* NetHack 3.5 obj.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.31 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -107,8 +107,10 @@ struct obj {
int corpsenm; /* type of corpse is mons[corpsenm] */
#define leashmon corpsenm /* gets m_id of attached pet */
#define spestudied corpsenm /* # of times a spellbook has been studied */
#define fromsink corpsenm /* a potion from a sink */
#define record_achieve_special corpsenm
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;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.5 patchlevel.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 patchlevel.h $NHDT-Date: 1426948844 2015/03/21 14:40:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.95 $ */
/* NetHack 3.5 patchlevel.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.93 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -14,10 +14,10 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 56
#define EDITLEVEL 58
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2012"
"NetHack, Copyright 1985-2015"
#define COPYRIGHT_BANNER_B \
" By Stichting Mathematisch Centrum and M. Stephenson."
/* COPYRIGHT_BANNER_C is generated by makedefs into date.h */

View File

@@ -53,6 +53,26 @@ struct u_event {
Bitfield(ascended,1); /* has offered the Amulet */
};
struct u_achieve {
Bitfield(amulet,1); /* touched Amulet */
Bitfield(bell,1); /* touched Bell */
Bitfield(book,1); /* touched Book */
Bitfield(menorah,1); /* touched Candelabrum */
Bitfield(enter_gehennom,1); /* entered Gehennom (or Valley) by any means */
Bitfield(ascended,1); /* not quite the same as u.uevent.ascended */
Bitfield(mines_luckstone,1); /* got a luckstone at end of mines */
Bitfield(finish_sokoban,1); /* obtained the sokoban prize */
Bitfield(killed_medusa,1);
};
struct u_realtime {
time_t realtime; /* actual playing time up until the last restore */
time_t restored; /* time the game was started or restored */
time_t endtime;
};
/* KMH, conduct --
* These are voluntary challenges. Each field denotes the number of
* times a challenge has been violated.
@@ -306,6 +326,7 @@ struct you {
/* 1 free bit! */
unsigned udg_cnt; /* how long you have been demigod */
struct u_achieve uachieve; /* achievements */
struct u_event uevent; /* certain events have happened */
struct u_have uhave; /* you're carrying special objects */
struct u_conduct uconduct; /* KMH, conduct */