#include "hack.h"
#include "lev.h"
#include "tcap.h"
#include "quest.h"
Data Structures | |
struct | bucket |
Defines | |
#define | N_PER_BUCKET 64 |
#define | Is_IceBox(o) ((o)->otyp == ICE_BOX ? TRUE : FALSE) |
Functions | |
STATIC_DCL void | NDECL (find_lev_obj) |
STATIC_DCL void | FDECL (restlevchn,(int)) |
STATIC_DCL void | FDECL (restdamage,(int, BOOLEAN_P)) |
STATIC_DCL struct obj * | FDECL (restobjchn,(int, BOOLEAN_P, BOOLEAN_P)) |
STATIC_DCL struct monst * | FDECL (restmonchn,(int, BOOLEAN_P)) |
STATIC_DCL struct fruit * | FDECL (loadfruitchn,(int)) |
STATIC_DCL void | FDECL (freefruitchn,(struct fruit *)) |
STATIC_DCL void | FDECL (ghostfruit,(struct obj *)) |
STATIC_DCL boolean | FDECL (restgamestate,(int, unsigned int *, unsigned int *)) |
STATIC_DCL void | FDECL (restlevelstate,(unsigned int, unsigned int)) |
STATIC_DCL int | FDECL (restlevelfile,(int, XCHAR_P)) |
STATIC_DCL void | FDECL (reset_oattached_mids,(BOOLEAN_P)) |
STATIC_DCL void | NDECL (clear_id_mapping) |
STATIC_DCL void | FDECL (add_id_mapping,(unsigned, unsigned)) |
STATIC_OVL void | find_lev_obj () |
void | inven_inuse (boolean quietly) |
STATIC_OVL void | restlevchn (int fd) |
STATIC_OVL void | restdamage (int fd, boolean ghostly) |
struct lvl_sounds * | rest_lvl_sounds (int fd) |
struct mon_gen_override * | rest_mongen_override (int fd) |
STATIC_OVL struct obj * | restobjchn (int fd, boolean ghostly, boolean frozen) |
STATIC_OVL struct monst * | restmonchn (int fd, boolean ghostly) |
STATIC_OVL struct fruit * | loadfruitchn (int fd) |
STATIC_OVL void | freefruitchn (struct fruit *flist) |
STATIC_OVL void | ghostfruit (struct obj *otmp) |
STATIC_OVL boolean | restgamestate (int fd, unsigned int *stuckid, unsigned int *steedid) |
STATIC_OVL void | restlevelstate (unsigned int stuckid, unsigned int steedid) |
STATIC_OVL int | restlevelfile (int fd, xchar ltmp) |
int | dorecover (int fd) |
void | trickery (char *reason) |
void | getlev (int fd, int pid, xchar lev, boolean ghostly) |
STATIC_OVL void | clear_id_mapping () |
STATIC_OVL void | add_id_mapping (unsigned gid, unsigned nid) |
boolean | lookup_id_mapping (unsigned gid, unsigned *nidp) |
STATIC_OVL void | reset_oattached_mids (boolean ghostly) |
void | minit () |
void | mread (int fd, genericptr_t buf, unsigned int len) |
Variables | |
static int | n_ids_mapped = 0 |
static struct bucket * | id_map = 0 |
boolean | restoring = FALSE |
static NEARDATA struct fruit * | oldfruit |
static NEARDATA long | omoves |
#define Is_IceBox | ( | o ) | ((o)->otyp == ICE_BOX ? TRUE : FALSE) |
Referenced by restobjchn().
#define N_PER_BUCKET 64 |
Referenced by add_id_mapping(), and lookup_id_mapping().
STATIC_OVL void add_id_mapping | ( | unsigned | gid, |
unsigned | nid | ||
) |
References bucket::gid, id_map, bucket::map, N_PER_BUCKET, bucket::next, and bucket::nid.
Referenced by restmonchn(), and restobjchn().
STATIC_OVL void clear_id_mapping | ( | ) |
int dorecover | ( | int | fd ) |
References clear_nhwindow, close(), COLNO, curs, flag::debug, delete_savefile(), depth(), discover, display_nhwindow, dungeon::dname, d_level::dnum, docrt(), dungeons, flag::explore, FALSE, flags, fobj, FREE_SAVE, getlev(), inven_inuse(), Is_rogue_level, ledger_no(), load_qtlist(), lseek(), mark_synch, max_rank_sz(), mread(), window_procs::name, obj::nobj, otmp, obj::owornmask, PL_NSIZ, plname, program_state, putstr, read(), reset_attribute_clock(), restgamestate(), restlevelfile(), restlevelstate(), run_timers(), savelev(), setworn(), sinfo::something_worth_saving, strncmpi(), time(), TRUE, u, uptodate(), you::ustuck, you::uz, vision_full_recalc, vision_reset(), welcome(), WIN_BASE, WIN_MAP, WIN_MESSAGE, windowprocs, and wizard.
Referenced by restlevelfile().
STATIC_DCL struct obj* FDECL | ( | restobjchn | , |
(int, BOOLEAN_P, BOOLEAN_P) | |||
) | [read] |
STATIC_DCL void FDECL | ( | ghostfruit | , |
(struct obj *) | |||
) |
STATIC_DCL boolean FDECL | ( | restgamestate | , |
(int, unsigned int *, unsigned int *) | |||
) |
STATIC_DCL struct monst* FDECL | ( | restmonchn | , |
(int, BOOLEAN_P) | |||
) | [read] |
STATIC_DCL void FDECL | ( | restlevelstate | , |
(unsigned int, unsigned int) | |||
) |
STATIC_DCL int FDECL | ( | restlevelfile | , |
(int, XCHAR_P) | |||
) |
STATIC_DCL void FDECL | ( | add_id_mapping | , |
(unsigned, unsigned) | |||
) |
STATIC_DCL void FDECL | ( | restlevchn | , |
(int) | |||
) |
STATIC_DCL struct fruit* FDECL | ( | loadfruitchn | , |
(int) | |||
) | [read] |
STATIC_DCL void FDECL | ( | reset_oattached_mids | , |
(BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | restdamage | , |
(int, BOOLEAN_P) | |||
) |
STATIC_DCL void FDECL | ( | freefruitchn | , |
(struct fruit *) | |||
) |
STATIC_OVL void find_lev_obj | ( | ) |
References COLNO, fobj, level, obj::nobj, OBJ_FREE, dlevel_t::objects, otmp, obj::ox, obj::oy, place_object(), ROWNO, and obj::where.
Referenced by getlev().
STATIC_OVL void freefruitchn | ( | struct fruit * | flist ) |
References dealloc_fruit, and fruit::nextf.
Referenced by freedynamicdata(), getlev(), and restgamestate().
References assign_level(), billobjs, BR_NO_END1, BR_NO_END2, BR_PORTAL, BR_STAIR, BUFSZ, dlevel_t::buriedobjlist, clear_id_mapping(), COLNO, monst::data, dealloc_trap, deltrap(), d_level::dlevel, dndest, dnladder, dnstair, mkroom::doorct, doorindex, doors, trap::dst, branch::end1, branch::end2, FALSE, mkroom::fdoor, find_lev_obj(), dlevel_t::flags, fmon, fobj, freefruitchn(), ftrap, Is_branchlev(), ledger_no(), level, levl, loadfruitchn(), MAGIC_PORTAL, mazexy(), medusa_level, mon_catchup_elapsed_time(), dlevel_t::mon_gen, dlevel_t::monlist, monstermoves, dlevel_t::monsters, mread(), monst::mx, monst::my, newtrap, monst::nmon, nroom, trap::ntrap, O_BINARY, on_level(), peace_minded(), place_wsegs(), pline(), RANGE_LEVEL, relink_light_sources(), relink_timers(), reset_oattached_mids(), rest_engravings(), rest_lvl_sounds(), rest_mongen_override(), rest_regions(), rest_rooms(), rest_worm(), restdamage(), restmonchn(), restobjchn(), restore_cham(), restore_light_sources(), restore_timers(), rooms, ROWNO, set_malign(), set_residency(), dlevel_t::sounds, Sprintf, sstairs, STAIRS, stronghold_level, trickery(), branch::type, u, updest, upladder, upstair, you::uz, wizard, nhcoord::x, xdnstair, nhcoord::y, and ydnstair.
Referenced by dorecover(), dosave0(), getbones(), and goto_level().
STATIC_OVL void ghostfruit | ( | struct obj * | otmp ) |
References fruit::fid, fruit::fname, fruitadd(), and fruit::nextf.
Referenced by restobjchn().
void inven_inuse | ( | boolean | quietly ) |
References COIN_CLASS, dealloc_obj(), extract_nobj(), FALSE, invent, obj::nobj, obj::oclass, otmp, pline(), useup(), and xname().
Referenced by done(), and dorecover().
STATIC_OVL struct fruit* loadfruitchn | ( | int | fd ) | [read] |
References dealloc_fruit, mread(), newfruit, and fruit::nextf.
Referenced by getlev(), and restgamestate().
boolean lookup_id_mapping | ( | unsigned | gid, |
unsigned * | nidp | ||
) |
References FALSE, bucket::gid, bucket::map, N_PER_BUCKET, bucket::next, bucket::nid, and TRUE.
Referenced by relink_light_sources(), relink_timers(), reset_oattached_mids(), and reset_region_mids().
void minit | ( | ) |
void mread | ( | int | fd, |
genericptr_t | buf, | ||
unsigned int | len | ||
) |
References close(), delete_savefile(), pline(), and read().
Referenced by dorecover(), getbones(), getlev(), load_mapseen(), loadfruitchn(), rest_engravings(), rest_lvl_sounds(), rest_mongen_override(), rest_regions(), rest_room(), rest_rooms(), rest_worm(), restdamage(), restgamestate(), restlevchn(), restmonchn(), restnames(), restobjchn(), restore_artifacts(), restore_dungeon(), restore_light_sources(), restore_oracles(), restore_timers(), and restore_waterlevel().
STATIC_DCL void NDECL | ( | find_lev_obj | ) |
STATIC_DCL void NDECL | ( | clear_id_mapping | ) |
STATIC_OVL void reset_oattached_mids | ( | boolean | ghostly ) |
References fobj, lookup_id_mapping(), monst::m_id, monst::mtame, obj::nobj, OATTACHED_M_ID, OATTACHED_MONST, OATTACHED_NOTHING, obj::oextra, otmp, and obj::oxlth.
Referenced by getlev().
struct lvl_sounds* rest_lvl_sounds | ( | int | fd ) | [read] |
struct mon_gen_override* rest_mongen_override | ( | int | fd ) | [read] |
References mread(), and mon_gen_tuple::next.
Referenced by getlev().
STATIC_OVL void restdamage | ( | int | fd, |
boolean | ghostly | ||
) |
References dlevel_t::damagelist, d_level::dlevel, in_rooms(), inhishop(), level, monstermoves, mread(), omoves, repair_damage(), shop_keeper(), SHOPBASE, Strcpy, TRUE, u, and you::uz.
Referenced by getlev().
STATIC_OVL boolean restgamestate | ( | int | fd, |
unsigned int * | stuckid, | ||
unsigned int * | steedid | ||
) |
References amii_setpens(), current_fruit, discover, FALSE, ffruit, flags, freefruitchn(), getuid, GRAPPLING_HOOK, init_uasmon(), invent, loadfruitchn(), MAXSPELL, migrating_mons, migrating_objs, monstermoves, moves, mread(), obj::nobj, otmp, obj::otyp, obj::owornmask, PICK_AXE, pl_character, pl_fruit, pl_tutorial, pline(), quest_status, RANGE_GLOBAL, relink_light_sources(), relink_timers(), restlevchn(), restmonchn(), restnames(), restobjchn(), restore_artifacts(), restore_dungeon(), restore_light_sources(), restore_oracles(), restore_timers(), restore_waterlevel(), role_init(), setuwep(), setworn(), spl_book, TRUE, u, unweapon, Upolyd, uwep, wiz1_level, and wizard.
Referenced by dorecover().
STATIC_OVL void restlevchn | ( | int | fd ) |
References mread(), s_level::next, and sp_levchn.
Referenced by restgamestate().
STATIC_OVL int restlevelfile | ( | int | fd, |
xchar | ltmp | ||
) |
References allbones, alllevels, bclose(), bufon(), BUFSZ, clearlocks(), close(), COUNT_SAVE, create_levelfile(), dorecover(), EXIT_SUCCESS, FREE_SAVE, levels, lseek(), pline(), ramdisk, savelev(), terminate(), uptodate(), and WRITE_SAVE.
Referenced by dorecover().
STATIC_OVL void restlevelstate | ( | unsigned int | stuckid, |
unsigned int | steedid | ||
) |
References fmon, monst::m_id, monst::mx, monst::my, monst::nmon, remove_monster(), u, and you::ustuck.
Referenced by dorecover().
References add_id_mapping(), DEFUNCT_MONSTER, FALSE, flags, flag::ident, MON_NOWEP, mons, monsndx(), mread(), newmonst, monst::nmon, obj::nobj, obj::owornmask, propagate(), restobjchn(), restpriest(), restshk(), TRUE, and W_WEP.
Referenced by getlev(), and restgamestate().
References add_id_mapping(), age_is_relative, obj::cobj, flags, ghostfruit(), Has_contents, flag::ident, Is_IceBox, monstermoves, mread(), newobj, obj::nobj, otmp, and SLIME_MOLD.
Referenced by getlev(), restgamestate(), and restmonchn().
void trickery | ( | char * | reason ) |
Referenced by add_id_mapping().
int n_ids_mapped = 0 [static] |
NEARDATA long omoves [static] |
Referenced by restdamage().
Referenced by set_artifact_intrinsic().