Defines | Functions | Variables

save.c File Reference

#include "hack.h"
#include "lev.h"
#include "quest.h"
#include <signal.h>
#include <fcntl.h>
Include dependency graph for save.c:

Defines

#define nulls   nul
#define HUP

Functions

STATIC_DCL void FDECL (savelevchn,(int, int))
STATIC_DCL void FDECL (savedamage,(int, int))
STATIC_DCL void FDECL (saveobjchn,(int, struct obj *, int))
STATIC_DCL void FDECL (savemonchn,(int, struct monst *, int))
STATIC_DCL void FDECL (savetrapchn,(int, struct trap *, int))
STATIC_DCL void FDECL (savegamestate,(int, int))
void FDECL (save_mongen_override,(int, struct mon_gen_override *, int))
void FDECL (save_lvl_sounds,(int, struct lvl_sounds *, int))
int dosave ()
int dosave0 ()
STATIC_OVL void savegamestate (int fd, int mode)
void savelev (int fd, xchar lev, int mode)
void bufon (int fd)
void bufoff (int fd)
void bflush (int fd)
void bwrite (int fd, genericptr_t loc, unsigned num)
void bclose (int fd)
STATIC_OVL void savelevchn (int fd, int mode)
STATIC_OVL void savedamage (int fd, int mode)
void save_mongen_override (int fd, struct mon_gen_override *or, int mode)
void save_lvl_sounds (int fd, struct lvl_sounds *or, int mode)
STATIC_OVL void saveobjchn (int fd, struct obj *otmp, int mode)
STATIC_OVL void savemonchn (int fd, struct monst *mtmp, int mode)
STATIC_OVL void savetrapchn (int fd, struct trap *trap, int mode)
void savefruitchn (int fd, int mode)
void free_dungeons ()
void freedynamicdata ()

Variables

static unsigned ustuck_id = 0
static unsigned usteed_id = 0
static int bw_fd = -1
static FILE * bw_FILE = 0
static boolean buffering = FALSE

Define Documentation

#define HUP

Referenced by dosave0().

#define nulls   nul

Function Documentation

void bclose ( int  fd )

References bufoff(), and close().

Referenced by dosave0(), goto_level(), restlevelfile(), and savebones().

Here is the call graph for this function:

Here is the caller graph for this function:

void bflush ( int  fd )

Referenced by bufoff(), savebones(), savegamestate(), and savelev().

Here is the caller graph for this function:

void bufoff ( int  fd )

References bflush(), and FALSE.

Referenced by bclose(), and store_version().

Here is the call graph for this function:

Here is the caller graph for this function:

void bufon ( int  fd )

References TRUE.

Referenced by goto_level(), restlevelfile(), and store_version().

Here is the caller graph for this function:

void bwrite ( int  fd,
genericptr_t  loc,
unsigned  num 
)
int dosave (  )
int dosave0 (  )
void FDECL ( save_lvl_sounds  ,
(int, struct lvl_sounds *, int)   
)
STATIC_DCL void FDECL ( savedamage  ,
(int, int)   
)
STATIC_DCL void FDECL ( savemonchn  ,
(int, struct monst *, int)   
)
STATIC_DCL void FDECL ( savelevchn  ,
(int, int)   
)
STATIC_DCL void FDECL ( savetrapchn  ,
(int, struct trap *, int)   
)
STATIC_DCL void FDECL ( saveobjchn  ,
(int, struct obj *, int)   
)
STATIC_DCL void FDECL ( savegamestate  ,
(int, int)   
)
void FDECL ( save_mongen_override  ,
(int, struct mon_gen_override *, int)   
)
void free_dungeons (  )

References FALSE, FREE_SAVE, save_dungeon(), savelevchn(), and TRUE.

Referenced by freedynamicdata(), and prscore().

Here is the call graph for this function:

Here is the caller graph for this function:

void freedynamicdata (  )
void save_lvl_sounds ( int  fd,
struct lvl_sounds or,
int  mode 
)

References bwrite(), perform_bwrite, and release_data.

Referenced by savelev().

Here is the call graph for this function:

Here is the caller graph for this function:

void save_mongen_override ( int  fd,
struct mon_gen_override or,
int  mode 
)

References bwrite(), mon_gen_tuple::next, perform_bwrite, and release_data.

Referenced by savelev().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void savedamage ( int  fd,
int  mode 
)

References bwrite(), dlevel_t::damagelist, level, damage::next, perform_bwrite, and release_data.

Referenced by savelev().

Here is the call graph for this function:

Here is the caller graph for this function:

void savefruitchn ( int  fd,
int  mode 
)

References bwrite(), dealloc_fruit, ffruit, fruit::fid, fruit::nextf, perform_bwrite, and release_data.

Referenced by savebones(), and savegamestate().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void savegamestate ( int  fd,
int  mode 
)
void savelev ( int  fd,
xchar  lev,
int  mode 
)
STATIC_OVL void savelevchn ( int  fd,
int  mode 
)

References bwrite(), s_level::next, perform_bwrite, release_data, and sp_levchn.

Referenced by free_dungeons(), and savegamestate().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void savemonchn ( int  fd,
struct monst mtmp,
int  mode 
)

References bwrite(), dealloc_monst, mons, monst::mxlth, monst::nmon, perform_bwrite, release_data, and saveobjchn().

Referenced by savegamestate(), and savelev().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void saveobjchn ( int  fd,
struct obj otmp,
int  mode 
)

References book_disappears(), bwrite(), dealloc_obj(), FOOD_CLASS, food_disappears(), Has_contents, obj::nobj, OBJ_FREE, obj::oxlth, perform_bwrite, release_data, and SPBOOK_CLASS.

Referenced by savegamestate(), savelev(), and savemonchn().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void savetrapchn ( int  fd,
struct trap trap,
int  mode 
)

References bwrite(), dealloc_trap, trap::ntrap, perform_bwrite, and release_data.

Referenced by savelev().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

boolean buffering = FALSE [static]
int bw_fd = -1 [static]
FILE* bw_FILE = 0 [static]
unsigned usteed_id = 0

Referenced by dosave0(), and savegamestate().

unsigned ustuck_id = 0 [static]