outrip() updating (trunk only)
Part II of the bones tracking patch. Change umpteen different outrip()
routines to handle its new time_t argument, and use formatkiller() instead
of directly accessing killer.{format,name} and killed_by_prefix[]. The
latter is now static within formatkiller().
The many sys/* and win/* changes are untested....
This commit is contained in:
11
src/end.c
11
src/end.c
@@ -283,8 +283,6 @@ static NEARDATA const char *ends[] = { /* "when you..." */
|
||||
|
||||
static boolean Schroedingers_cat = FALSE;
|
||||
|
||||
extern const char * const killed_by_prefix[]; /* from topten.c */
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
done1(sig_unused) /* called as signal() handler, so sent at least one arg */
|
||||
@@ -956,12 +954,9 @@ die:
|
||||
urace.femalenum : urace.malenum;
|
||||
}
|
||||
corpse = mk_named_object(CORPSE, &mons[mnum],
|
||||
u.ux, u.uy, plname);
|
||||
Sprintf(pbuf, "%s, %s%s", plname,
|
||||
killer.format == NO_KILLER_PREFIX ? "" :
|
||||
killed_by_prefix[how],
|
||||
killer.format == KILLED_BY_AN ? an(killer.name) :
|
||||
killer.name);
|
||||
u.ux, u.uy, plname);
|
||||
Sprintf(pbuf, "%s, ", plname);
|
||||
formatkiller(eos(pbuf), sizeof pbuf - strlen(pbuf), how);
|
||||
make_grave(u.ux, u.uy, pbuf);
|
||||
}
|
||||
/* if pets will contribute to score, populate mydogs list now
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
STATIC_DCL void FDECL(center, (int, char *));
|
||||
|
||||
extern const char * const killed_by_prefix[]; /* from topten.c */
|
||||
|
||||
#if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(GEM_GRAPHICS) || defined(MSWIN_GRAPHICS)
|
||||
# define TEXT_TOMBSTONE
|
||||
#endif
|
||||
|
||||
16
src/topten.c
16
src/topten.c
@@ -73,12 +73,6 @@ STATIC_DCL void FDECL(nsb_mung_line,(char*));
|
||||
STATIC_DCL void FDECL(nsb_unmung_line,(char*));
|
||||
#endif
|
||||
|
||||
/* must fit with end.c; used in rip.c */
|
||||
NEARDATA const char * const killed_by_prefix[] = {
|
||||
"killed by ", "choked on ", "poisoned by ", "died of ", "drowned in ",
|
||||
"burned by ", "dissolved in ", "crushed to death by ", "petrified by ",
|
||||
"turned to slime by ", "killed by ", "", "", "", "", ""
|
||||
};
|
||||
|
||||
static winid toptenwin = WIN_ERR;
|
||||
|
||||
@@ -89,6 +83,16 @@ char *buf;
|
||||
unsigned siz;
|
||||
int how;
|
||||
{
|
||||
static NEARDATA const char * const killed_by_prefix[] = {
|
||||
/* DIED, CHOKING, POISONING, STARVING, */
|
||||
"killed by ", "choked on ", "poisoned by ", "died of ",
|
||||
/* DROWNING, BURNING, DISSOLVED, CRUSHING, */
|
||||
"drowned in ", "burned by ", "dissolved in ", "crushed to death by ",
|
||||
/* STONING, TURNED_SLIME, GENOCIDED, */
|
||||
"petrified by ", "turned to slime by ", "killed by ",
|
||||
/* PANICKED, TRICKED, QUIT, ESCAPED, ASCENDED */
|
||||
"", "", "", "", ""
|
||||
};
|
||||
unsigned l;
|
||||
char *kname = killer.name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user