Angband
Functions
save.c File Reference

Individual saving functions. More...

#include "angband.h"
#include "cave.h"
#include "game-world.h"
#include "init.h"
#include "mon-lore.h"
#include "mon-make.h"
#include "monster.h"
#include "object.h"
#include "obj-pile.h"
#include "obj-gear.h"
#include "obj-ignore.h"
#include "option.h"
#include "player.h"
#include "savefile.h"
#include "store.h"
#include "obj-util.h"
#include "player-history.h"
#include "player-timed.h"
#include "trap.h"

Functions

void wr_description (void)
 Write a description of the character.
static void wr_item (const object_type *obj)
 Write an "item" record.
static void wr_monster (const monster_type *mon)
 Write a monster record (including held or mimicked objects)
static void wr_trap (struct trap *trap)
 Write a trap record.
void wr_randomizer (void)
 Write RNG state.
void wr_options (void)
 Write the "options".
void wr_messages (void)
void wr_monster_memory (void)
void wr_object_memory (void)
void wr_quests (void)
void wr_artifacts (void)
void wr_player (void)
void wr_ignore (void)
void wr_misc (void)
void wr_player_hp (void)
void wr_player_spells (void)
static void wr_gear_aux (struct object *gear)
void wr_gear (void)
void wr_stores (void)
static void wr_dungeon_aux (struct chunk *c)
 Write the current dungeon terrain features and info flags.
static void wr_objects_aux (struct chunk *c)
 Write the dungeon floor objects.
static void wr_monsters_aux (struct chunk *c)
 Write the monster list.
static void wr_traps_aux (struct chunk *c)
void wr_dungeon (void)
void wr_objects (void)
void wr_monsters (void)
void wr_traps (void)
void wr_chunks (void)
void wr_history (void)

Detailed Description

Individual saving functions.

Copyright (c) 1997 Ben Harrison

This work is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation, version 2, or

b) the "Angband licence": This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply.

Function Documentation

void wr_artifacts ( void  )
void wr_chunks ( void  )
void wr_description ( void  )
void wr_dungeon ( void  )
static void wr_dungeon_aux ( struct chunk c)
static

Write the current dungeon terrain features and info flags.

Note that the cost and when fields of c->squares[y][x] are not saved

References chunk::created_at, square::feat, chunk::feeling, chunk::feeling_squares, chunk::height, i, square::info, MAX_UCHAR, chunk::name, SQUARE_SIZE, chunk::squares, chunk::width, wr_byte(), wr_s32b(), wr_string(), and wr_u16b().

Referenced by wr_chunks(), and wr_dungeon().

void wr_gear ( void  )
static void wr_gear_aux ( struct object gear)
static
void wr_history ( void  )
void wr_ignore ( void  )
static void wr_item ( const object_type obj)
static
void wr_messages ( void  )
void wr_misc ( void  )
static void wr_monster ( const monster_type mon)
static
void wr_monster_memory ( void  )
void wr_monsters ( void  )

References cave, cave_k, and wr_monsters_aux().

static void wr_monsters_aux ( struct chunk c)
static

Write the monster list.

References cave_monster(), cave_monster_max(), i, player::is_dead, wr_monster(), and wr_u16b().

Referenced by wr_chunks(), and wr_monsters().

void wr_object_memory ( void  )
void wr_objects ( void  )

References cave, cave_k, and wr_objects_aux().

static void wr_objects_aux ( struct chunk c)
static

Write the dungeon floor objects.

References chunk::height, player::is_dead, mem_free(), mem_zalloc(), object::next, square::obj, chunk::squares, chunk::width, and wr_item().

Referenced by wr_chunks(), and wr_objects().

void wr_options ( void  )
void wr_player ( void  )
void wr_player_hp ( void  )
void wr_player_spells ( void  )
void wr_quests ( void  )
void wr_randomizer ( void  )

Write RNG state.

There were originally 64 bytes of randomizer saved. Now we only need 32 + 5 bytes saved, so we'll write an extra 27 bytes at the end which won't be used.

References i, RAND_DEG, Rand_value, STATE, state_i, wr_u32b(), z0, z1, and z2.

void wr_stores ( void  )
static void wr_trap ( struct trap trap)
static

Write a trap record.

References trap::flags, trap::fx, trap::fy, i, trap::t_idx, TRF_SIZE, wr_byte(), and trap::xtra.

Referenced by wr_traps_aux().

void wr_traps ( void  )

References cave, cave_k, and wr_traps_aux().

static void wr_traps_aux ( struct chunk c)
static