#include "hack.h"
#include "dlb.h"
#include "patchlevel.h"
Data Structures | |
struct | toptenentry |
Defines | |
#define | done_stopprint program_state.stopprint |
#define | newttentry() (struct toptenentry *) alloc(sizeof(struct toptenentry)) |
#define | dealloc_ttentry(ttent) free((genericptr_t) (ttent)) |
#define | NAMSZ 10 |
#define | DTHSZ 100 |
#define | ROLESZ 3 |
#define | PERSMAX 3 |
#define | POINTSMIN 1 |
#define | ENTRYMAX 100 |
#define | PERS_IS_UID |
#define | TTFIELDS 13 |
#define | HUP |
Functions | |
STATIC_DCL void | FDECL (topten_print,(const char *)) |
STATIC_DCL void | FDECL (topten_print_bold,(const char *)) |
STATIC_DCL xchar | FDECL (observable_depth,(d_level *)) |
STATIC_DCL void | NDECL (outheader) |
STATIC_DCL void | FDECL (outentry,(int, struct toptenentry *, BOOLEAN_P)) |
STATIC_DCL void | FDECL (readentry,(FILE *, struct toptenentry *)) |
STATIC_DCL void | FDECL (writeentry,(FILE *, struct toptenentry *)) |
STATIC_DCL void | FDECL (free_ttlist,(struct toptenentry *)) |
STATIC_DCL int | FDECL (classmon,(char *, BOOLEAN_P)) |
STATIC_DCL int | FDECL (score_wanted,(BOOLEAN_P, int, struct toptenentry *, int, const char **, int)) |
STATIC_OVL void | topten_print (char *x) const |
STATIC_OVL void | topten_print_bold (char *x) const |
STATIC_OVL xchar | observable_depth (d_level *lev) |
STATIC_OVL void | readentry (FILE *rfile, struct toptenentry *tt) |
STATIC_OVL void | writeentry (FILE *rfile, struct toptenentry *tt) |
STATIC_OVL void | free_ttlist (struct toptenentry *tt) |
void | topten (int how) |
STATIC_OVL void | outheader () |
STATIC_OVL void | outentry (int rank, struct toptenentry *t1, boolean so) |
else | if (!strncmp("ascended ", t1->death, 9)) |
else | if (!strncmp("ascended", t1->death, 8)) |
if (second_line) | |
if (bp<=linebuf+hppos) | |
if (so) | |
else | if (!done_stopprint) topten_print(linebuf) |
STATIC_OVL int | score_wanted (boolean current_ver, int rank, struct toptenentry *t1, int playerct, const char **players, int uid) |
void | prscore (int argc, char **argv) |
STATIC_OVL int | classmon (char *plch, boolean fem) |
struct obj * | tt_oname (struct obj *otmp) |
Variables | |
struct toptenentry * | tt_head |
NEARDATA const char *const | killed_by_prefix [] |
static winid | toptenwin = WIN_ERR |
hppos = COLNO - 7 - (int)strlen(hpbuf) | |
bp = eos(linebuf) |
#define dealloc_ttentry | ( | ttent ) | free((genericptr_t) (ttent)) |
Referenced by free_ttlist(), and topten().
#define done_stopprint program_state.stopprint |
Referenced by if(), outheader(), and topten().
#define DTHSZ 100 |
Referenced by topten().
#define ENTRYMAX 100 |
Referenced by topten().
#define HUP |
#define NAMSZ 10 |
Referenced by score_wanted(), and topten().
#define newttentry | ( | ) | (struct toptenentry *) alloc(sizeof(struct toptenentry)) |
#define PERS_IS_UID |
Referenced by topten().
#define PERSMAX 3 |
Referenced by topten().
#define POINTSMIN 1 |
Referenced by topten().
#define ROLESZ 3 |
Referenced by classmon(), and topten().
#define TTFIELDS 13 |
Referenced by readentry().
STATIC_OVL int classmon | ( | char * | plch, |
boolean | fem | ||
) |
References Role::femalenum, RoleName::m, Role::malenum, Role::name, NON_PM, PM_HUMAN, PM_HUMAN_MUMMY, PM_RANGER, roles, and ROLESZ.
Referenced by tt_oname().
STATIC_DCL void FDECL | ( | topten_print_bold | , |
(const char *) | |||
) |
STATIC_DCL void FDECL | ( | free_ttlist | , |
(struct toptenentry *) | |||
) |
STATIC_DCL int FDECL | ( | classmon | , |
(char *, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | outentry | , |
(int, struct toptenentry *, BOOLEAN_P) | |||
) |
STATIC_DCL int FDECL | ( | score_wanted | , |
(BOOLEAN_P, int, struct toptenentry *, int, const char **, int) | |||
) |
STATIC_DCL void FDECL | ( | topten_print | , |
(const char *) | |||
) |
STATIC_DCL void FDECL | ( | readentry | , |
(FILE *, struct toptenentry *) | |||
) |
STATIC_DCL void FDECL | ( | writeentry | , |
(FILE *, struct toptenentry *) | |||
) |
STATIC_OVL void free_ttlist | ( | struct toptenentry * | tt ) |
References dealloc_ttentry, and toptenentry::tt_next.
Referenced by prscore(), and topten().
else if | ( | ! | done_stopprint ) |
References putstr.
Referenced by arti_invoke(), carry_count(), cast_cleric_spell(), change_sex(), collect_obj_classes(), display_minventory(), doconsult(), dog_move(), dogaze(), doorganize(), dosearch0(), expire_gas_cloud(), find_defensive(), get_mtraits(), getprice(), grow_up(), gulpmu(), ini_inv(), inside_gas_cloud(), lookat(), m_move(), makemon(), maybe_wail(), mk_mplayer(), mon_catchup_elapsed_time(), object_detect(), percent_success(), pickup(), readobjnam(), recharge(), relink_light_sources(), rescham(), resist(), restore_cham(), revive_corpse(), save_mtraits(), savebones(), set_artifact_intrinsic(), setworn(), sleep_monst(), snuff_light_source(), thrwmu(), toss_up(), and use_candle().
else if | ( | ! | strncmp"ascended ", t1->death, 9 ) |
else if | ( | ! | strncmp"ascended", t1->death, 8 ) |
if | ( | second_line | ) |
if | ( | so | ) |
References COLNO, done_stopprint, eos(), and topten_print_bold().
if | ( | bp<=linebuf+ | hppos ) |
STATIC_DCL void NDECL | ( | outheader | ) |
References depth(), In_endgame, Is_airlevel, Is_astralevel, Is_earthlevel, Is_firelevel, and Is_waterlevel.
Referenced by topten().
STATIC_OVL void outentry | ( | int | rank, |
struct toptenentry * | t1, | ||
boolean | so | ||
) |
STATIC_OVL void outheader | ( | ) |
References bp, BUFSZ, COLNO, done_stopprint, dump(), eos(), Strcpy, and topten_print().
Referenced by prscore(), and topten().
void prscore | ( | int | argc, |
char ** | argv | ||
) |
References BUFSZ, create_nhwindow, destroy_nhwindow, display_nhwindow, dlb_cleanup, dlb_init, FALSE, fopen_datafile(), free_dungeons(), free_ttlist(), getuid, hname, index, init_dungeons(), init_nhwindows, newttentry, NHW_TEXT, outentry(), outheader(), pbuf, plname, toptenentry::points, rank(), raw_print(), readentry(), RECORD, score_wanted(), SCOREPREFIX, Sprintf, Strcat, Strcpy, TRUE, tt_head, toptenentry::tt_next, toptenentry::uid, WIN_ERR, and wiz1_level.
STATIC_OVL void readentry | ( | FILE * | rfile, |
struct toptenentry * | tt | ||
) |
References toptenentry::birthdate, toptenentry::death, toptenentry::deathdate, toptenentry::deathdnum, toptenentry::deathlev, toptenentry::deaths, Role::filecode, GAME_SHORT_NAME, toptenentry::hp, toptenentry::maxhp, toptenentry::maxlvl, toptenentry::name, toptenentry::patchlevel, toptenentry::plalign, toptenentry::plgend, toptenentry::plrace, toptenentry::plrole, toptenentry::points, roles, str2role(), Strcpy, TTFIELDS, toptenentry::uid, toptenentry::ver_major, and toptenentry::ver_minor.
Referenced by prscore(), topten(), and tt_oname().
STATIC_OVL int score_wanted | ( | boolean | current_ver, |
int | rank, | ||
struct toptenentry * | t1, | ||
int | playerct, | ||
const char ** | players, | ||
int | uid | ||
) |
References digit(), index, toptenentry::name, NAMSZ, PATCHLEVEL, toptenentry::patchlevel, toptenentry::plrace, toptenentry::plrole, str2race(), str2role(), toptenentry::uid, toptenentry::ver_major, toptenentry::ver_minor, VERSION_MAJOR, and VERSION_MINOR.
Referenced by prscore().
void topten | ( | int | how ) |
References aligns, an(), toptenentry::birthdate, BUFSZ, create_nhwindow, dealloc_ttentry, toptenentry::death, toptenentry::deathdate, toptenentry::deathdnum, toptenentry::deathlev, toptenentry::deaths, deepest_lev_reached(), destroy_nhwindow, discover, display_nhwindow, d_level::dnum, done_stopprint, DTHSZ, dump(), dump_html(), flag::end_around, flag::end_own, flag::end_top, ENTRYMAX, FALSE, flag::female, Align::filecode, Gender::filecode, Race::filecode, Role::filecode, flags, fopen_datafile(), free_ttlist(), genders, getuid, toptenentry::hp, HUP, KILLED_BY, KILLED_BY_AN, killer, killer_format, lock_file(), LOGFILE, toptenentry::maxhp, toptenentry::maxlvl, toptenentry::name, NAMSZ, newttentry, NHW_TEXT, NO_KILLER_PREFIX, observable_depth(), ordin(), outentry(), outheader(), PANICKED, sinfo::panicking, PATCHLEVEL, toptenentry::patchlevel, pbuf, PERS_IS_UID, PERSMAX, toptenentry::plalign, toptenentry::plgend, plname, toptenentry::plrace, toptenentry::plrole, toptenentry::points, POINTSMIN, program_state, rank(), raw_print(), readentry(), RECORD, ROLESZ, SCOREPREFIX, SEEK_SET, Sprintf, Strcat, Strcpy, topten_print(), flag::toptenwin, TRUE, tt_head, toptenentry::tt_next, align::type, u, you::ualign, you::ubirthday, you::udeathday, you::uhp, you::uhpmax, toptenentry::uid, you::umortality, unlock_file(), urace, urole, you::urscore, you::uz, toptenentry::ver_major, toptenentry::ver_minor, VERSION_MAJOR, VERSION_MINOR, WIN_ERR, wizard, writeentry(), XLOGFILE, and yyyymmdd().
STATIC_OVL void topten_print | ( | char * | x ) | const |
References ATR_NONE, putstr, raw_print(), and WIN_ERR.
Referenced by outheader(), and topten().
STATIC_OVL void topten_print_bold | ( | char * | x ) | const |
References ATR_BOLD, putstr, raw_print_bold, and WIN_ERR.
Referenced by if().
References classmon(), CORPSE, fopen_datafile(), toptenentry::name, obj_stop_timers(), oname(), otmp, toptenentry::plgend, toptenentry::plrole, toptenentry::points, rank(), readentry(), RECORD, rewind, rnd(), SCOREPREFIX, start_corpse_timeout(), and weight().
Referenced by mk_tt_object().
STATIC_OVL void writeentry | ( | FILE * | rfile, |
struct toptenentry * | tt | ||
) |
References toptenentry::birthdate, toptenentry::death, toptenentry::deathdate, toptenentry::deathdnum, toptenentry::deathlev, toptenentry::deaths, GAME_SHORT_NAME, toptenentry::hp, toptenentry::maxhp, toptenentry::maxlvl, toptenentry::name, onlyspace(), toptenentry::patchlevel, toptenentry::plalign, toptenentry::plgend, toptenentry::plrace, toptenentry::plrole, toptenentry::points, toptenentry::uid, toptenentry::ver_major, and toptenentry::ver_minor.
Referenced by topten().
bp = eos(linebuf) |
Referenced by add_one_tobill(), addupbill(), Adjmonnam(), Amonnam(), aobjnam(), cheapest_item(), doinvbill(), dokick(), doname_base(), dopay(), dowrite(), getobj(), jump(), makesingular(), Monnam(), mungspaces(), noit_Monnam(), obfree(), onbill(), outentry(), outheader(), pacify_shk(), readobjnam(), rile_shk(), shop_debt(), splitbill(), sub_one_frombill(), tabexpand(), Tobjnam(), and x_monnam().
hppos = COLNO - 7 - (int)strlen(hpbuf) |
Referenced by outentry().
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 ", "turned to slime by ", "killed by ", "", "", "", "" }
struct toptenentry * tt_head |