bones tracking (trunk only)

[See cvs log for include/rm.h or doc/window.doc for more complete description.]

Attach hero info, death reason, and date+time to a level that's being saved
as bones.  Read such data back when loading a bones file, then treat it as
part of that level for the rest of the game.  Dying on a loaded bones file
will chain the new hero+death+date to previous one(s) if new bones get saved.

outrip() now takes an extra argument of type time_t, and interface-specific
implementations of this routine need to be updated to handle that.
This commit is contained in:
nethack.rankin
2012-01-23 10:45:31 +00:00
parent b88c51deae
commit 9721470635
15 changed files with 152 additions and 64 deletions

View File

@@ -132,7 +132,7 @@ E void NDECL(drag_down);
E void FDECL(sanitize_name, (char *));
E void FDECL(drop_upon_death, (struct monst *,struct obj *,int,int));
E boolean NDECL(can_make_bones);
E void FDECL(savebones, (struct obj *));
E void FDECL(savebones, (int,time_t,struct obj *));
E int NDECL(getbones);
/* ### botl.c ### */
@@ -1947,7 +1947,7 @@ E void FDECL(put_gold_back, (struct monst *));
/* ### rip.c ### */
E void FDECL(genl_outrip, (winid,int));
E void FDECL(genl_outrip, (winid,int,time_t));
/* ### rnd.c ### */
@@ -2270,7 +2270,8 @@ E void NDECL(timer_sanity_check);
/* ### topten.c ### */
E void FDECL(topten, (int));
E void FDECL(formatkiller, (char *,unsigned,int));
E void FDECL(topten, (int,time_t));
E void FDECL(prscore, (int,char **));
E struct obj *FDECL(tt_oname, (struct obj *));

View File

@@ -13,7 +13,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 50
#define EDITLEVEL 51
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2012"

View File

@@ -69,7 +69,7 @@ struct window_procs {
void NDECL((*win_start_screen));
void NDECL((*win_end_screen));
void FDECL((*win_outrip), (winid,int));
void FDECL((*win_outrip), (winid,int,time_t));
void FDECL((*win_preference_update), (const char *));
char * FDECL((*win_getmsghistory), (BOOLEAN_P));
void FDECL((*win_putmsghistory), (const char *,BOOLEAN_P));
@@ -351,7 +351,7 @@ struct chain_procs {
void FDECL((*win_start_screen), (CARGS));
void FDECL((*win_end_screen), (CARGS));
void FDECL((*win_outrip), (CARGS, winid,int));
void FDECL((*win_outrip), (CARGS, winid,int,time_t));
void FDECL((*win_preference_update), (CARGS, const char *));
char * FDECL((*win_getmsghistory), (CARGS, BOOLEAN_P));
void FDECL((*win_putmsghistory), (CARGS, const char *,BOOLEAN_P));

View File

@@ -226,7 +226,7 @@ E char * NDECL(tty_get_color_string);
E void NDECL(tty_start_screen);
E void NDECL(tty_end_screen);
E void FDECL(genl_outrip, (winid,int));
E void FDECL(genl_outrip, (winid,int,time_t));
E char *FDECL(tty_getmsghistory, (BOOLEAN_P));
E void FDECL(tty_putmsghistory, (const char *,BOOLEAN_P));