save.c File Reference

Individual saving functions. More...

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


void wr_description (void)
 Write a description of the character. More...
static void wr_item (const struct object *obj)
 Write an "item" record. More...
static void wr_monster (const struct monster *mon)
 Write a monster record (including held or mimicked objects) More...
static void wr_trap (struct trap *trap)
 Write a trap record. More...
void wr_randomizer (void)
 Write RNG state. More...
void wr_options (void)
 Write the "options". More...
void wr_messages (void)
void wr_monster_memory (void)
void wr_object_memory (void)
void wr_quests (void)
void wr_player (void)
void wr_ignore (void)
void wr_misc (void)
void wr_artifacts (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. More...
static void wr_objects_aux (struct chunk *c)
 Write the dungeon floor objects. More...
static void wr_monsters_aux (struct chunk *c)
 Write the monster list. More...
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

◆ wr_artifacts()

void wr_artifacts ( void  )

◆ wr_chunks()

void wr_chunks ( void  )

◆ wr_description()

void wr_description ( void  )

◆ wr_dungeon()

void wr_dungeon ( void  )

◆ wr_dungeon_aux()

static void wr_dungeon_aux ( struct chunk c)

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 square::feat, connector::feat, chunk::feeling, chunk::feeling_squares, connector::grid, chunk::height, i, square::info, connector::info, chunk::join, loc(), chunk::name, connector::next, OPT, square(), SQUARE_SIZE, chunk::turn, chunk::width, wr_byte(), wr_s32b(), wr_string(), wr_u16b(), loc::x, and loc::y.

Referenced by wr_chunks(), and wr_dungeon().

◆ wr_gear()

void wr_gear ( void  )

◆ wr_gear_aux()

static void wr_gear_aux ( struct object gear)

◆ wr_history()

void wr_history ( void  )

◆ wr_ignore()

void wr_ignore ( void  )

◆ wr_item()

static void wr_item ( const struct object obj)

◆ wr_messages()

void wr_messages ( void  )

◆ wr_misc()

void wr_misc ( void  )

◆ wr_monster()

static void wr_monster ( const struct monster mon)

◆ wr_monster_memory()

void wr_monster_memory ( void  )

◆ wr_monsters()

void wr_monsters ( void  )

References cave, player::cave, and wr_monsters_aux().

◆ wr_monsters_aux()

static void wr_monsters_aux ( struct chunk c)

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().

◆ wr_object_memory()

void wr_object_memory ( void  )

◆ wr_objects()

void wr_objects ( void  )

References cave, player::cave, and wr_objects_aux().

◆ wr_objects_aux()

static void wr_objects_aux ( struct chunk c)

◆ wr_options()

void wr_options ( void  )

◆ wr_player()

void wr_player ( void  )

◆ wr_player_hp()

void wr_player_hp ( void  )

◆ wr_player_spells()

void wr_player_spells ( void  )

◆ wr_quests()

void wr_quests ( void  )

◆ wr_randomizer()

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.

◆ wr_stores()

void wr_stores ( void  )

◆ wr_trap()

static void wr_trap ( struct trap trap)

◆ wr_traps()

void wr_traps ( void  )

References cave, player::cave, and wr_traps_aux().

◆ wr_traps_aux()

static void wr_traps_aux ( struct chunk c)