Hengband  2.2.1
関数 | 変数
save.c ファイル

セーブファイル書き込み処理 / Purpose: interact with savefiles [詳解]

#include "angband.h"
#include "util.h"
#include "save.h"
#include "load.h"
#include "report.h"
#include "core.h"
#include "artifact.h"
#include "sort.h"
#include "dungeon.h"
#include "quest.h"
#include "store.h"
#include "wild.h"
#include "floor.h"
#include "floor-events.h"
#include "floor-save.h"
#include "floor-town.h"
#include "files.h"
#include "world.h"
#include "objectkind.h"
#include "monsterrace.h"
#include "birth.h"
#include "bldg.h"
save.c の依存先関係図:

関数

static void sf_put (byte v)
 1バイトをファイルに書き込む / These functions place information into a savefile a byte at a time [詳解]
 
static void wr_byte (byte v)
 1バイトをファイルに書き込む(sf_put()の糖衣) [詳解]
 
static void wr_u16b (u16b v)
 符号なし16ビットをファイルに書き込む [詳解]
 
static void wr_s16b (s16b v)
 符号あり16ビットをファイルに書き込む [詳解]
 
static void wr_u32b (u32b v)
 符号なし32ビットをファイルに書き込む [詳解]
 
static void wr_s32b (s32b v)
 符号あり32ビットをファイルに書き込む [詳解]
 
static void wr_string (concptr str)
 文字列をファイルに書き込む [詳解]
 
static void wr_item (object_type *o_ptr)
 アイテムオブジェクトを書き込む / Write an "item" record [詳解]
 
static void wr_monster (monster_type *m_ptr)
 モンスター情報を書き込む / Write a "monster" record [詳解]
 
static void wr_lore (MONRACE_IDX r_idx)
 モンスターの思い出を書き込む / Write a "lore" record [詳解]
 
static void wr_xtra (KIND_OBJECT_IDX k_idx)
 その他のゲーム情報を書き込む(実質はアイテムの鑑定情報のみ) / Write an "xtra" record [詳解]
 
static void wr_store (store_type *st_ptr)
 セーブデータに店舗情報を書き込む / Write a "store" record [詳解]
 
static errr wr_randomizer (void)
 セーブデータに乱数情報を書き込む / Write RNG state [詳解]
 
static void wr_options (void)
 ゲームオプション情報を書き込む / Write the "options" [詳解]
 
static void wr_ghost (void)
 ダミー情報スキップを書き込む / Hack – Write the "ghost" info [詳解]
 
static void save_quick_start (void)
 クイック・スタート情報を書き込む / Save quick start data [詳解]
 
static void wr_extra (void)
 その他の情報を書き込む / Write some "extra" info [詳解]
 
static void wr_saved_floor (saved_floor_type *sf_ptr)
 保存フロアの書き込み / Actually write a saved floor data using effectively compressed format. [詳解]
 
static bool wr_dungeon (void)
 現在フロアの書き込み / Write the current dungeon (new method) [詳解]
 
static bool wr_savefile_new (void)
 セーブデータの書き込み / Actually write a save-file [詳解]
 
static bool save_player_aux (char *name)
 セーブデータ書き込みのサブルーチン / Medium level player saver [詳解]
 
bool save_player (void)
 セーブデータ書き込みのメインルーチン / Attempt to save the player in a savefile [詳解]
 
bool load_player (void)
 セーブデータ読み込みのメインルーチン / Attempt to Load a "savefile" [詳解]
 
void remove_loc (void)
 ファイルロック処理 [詳解]
 
static bool save_floor_aux (saved_floor_type *sf_ptr)
 ゲームプレイ中のフロア一時保存出力処理サブルーチン / Actually write a temporal saved floor file [詳解]
 
bool save_floor (saved_floor_type *sf_ptr, BIT_FLAGS mode)
 ゲームプレイ中のフロア一時保存出力処理メインルーチン / Attempt to save the temporally saved-floor data [詳解]
 

変数

static FILE * fff
 
static byte xor_byte
 
static u32b v_stamp = 0L
 
static u32b x_stamp = 0L
 

詳解

セーブファイル書き込み処理 / Purpose: interact with savefiles

日付
2014/07/12
著者
Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
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.

関数詳解

◆ load_player()

bool load_player ( void  )

セーブデータ読み込みのメインルーチン / Attempt to Load a "savefile"

戻り値
成功すればtrue
Version 2.7.0 introduced a slightly different "savefile" format from
older versions, requiring a completely different parsing method.
Note that savefiles from 2.7.0 - 2.7.2 are completely obsolete.
Pre-2.8.0 savefiles lose some data, see "load2.c" for info.
Pre-2.7.0 savefiles lose a lot of things, see "load1.c" for info.
On multi-user systems, you may only "read" a savefile if you will be
allowed to "write" it later, this prevents painful situations in which
the player loads a savefile belonging to someone else, and then is not
allowed to save his game when he quits.
We return "TRUE" if the savefile was usable, and we set the global
flag "current_world_ptr->character_loaded" if a real, living, character was loaded.
Note that we always try to load the "current" savefile, even if
there is no such file, so we must check for "empty" savefile names.
呼び出し関係図:

◆ remove_loc()

void remove_loc ( void  )

ファイルロック処理

戻り値
なし
呼び出し関係図:

◆ save_floor()

bool save_floor ( saved_floor_type sf_ptr,
BIT_FLAGS  mode 
)

ゲームプレイ中のフロア一時保存出力処理メインルーチン / Attempt to save the temporally saved-floor data

引数
sf_ptr保存フロア参照ポインタ
mode保存オプション
戻り値
なし
呼び出し関係図:

◆ save_floor_aux()

static bool save_floor_aux ( saved_floor_type sf_ptr)
static

ゲームプレイ中のフロア一時保存出力処理サブルーチン / Actually write a temporal saved floor file

引数
sf_ptr保存フロア参照ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ save_player()

bool save_player ( void  )

セーブデータ書き込みのメインルーチン / Attempt to save the player in a savefile

戻り値
成功すればtrue
呼び出し関係図:

◆ save_player_aux()

static bool save_player_aux ( char *  name)
static

セーブデータ書き込みのサブルーチン / Medium level player saver

戻り値
成功すればtrue

Angband 2.8.0 will use "fd" instead of "fff" if possible

呼び出し関係図:
被呼び出し関係図:

◆ save_quick_start()

static void save_quick_start ( void  )
static

クイック・スタート情報を書き込む / Save quick start data

戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ sf_put()

static void sf_put ( byte  v)
static

1バイトをファイルに書き込む / These functions place information into a savefile a byte at a time

引数
v書き込むバイト値
戻り値
なし
被呼び出し関係図:

◆ wr_byte()

static void wr_byte ( byte  v)
static

1バイトをファイルに書き込む(sf_put()の糖衣)

引数
v書き込むバイト
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_dungeon()

static bool wr_dungeon ( void  )
static

現在フロアの書き込み / Write the current dungeon (new method)

戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_extra()

static void wr_extra ( void  )
static

その他の情報を書き込む / Write some "extra" info

戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_ghost()

static void wr_ghost ( void  )
static

ダミー情報スキップを書き込む / Hack – Write the "ghost" info

戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_item()

static void wr_item ( object_type o_ptr)
static

アイテムオブジェクトを書き込む / Write an "item" record

引数
o_ptrアイテムオブジェクト保存元ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_lore()

static void wr_lore ( MONRACE_IDX  r_idx)
static

モンスターの思い出を書き込む / Write a "lore" record

引数
r_idxモンスター種族ID
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_monster()

static void wr_monster ( monster_type m_ptr)
static

モンスター情報を書き込む / Write a "monster" record

引数
m_ptrモンスター情報保存元ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_options()

static void wr_options ( void  )
static

ゲームオプション情報を書き込む / Write the "options"

戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_randomizer()

static errr wr_randomizer ( void  )
static

セーブデータに乱数情報を書き込む / Write RNG state

戻り値
常に0(成功を返す)
呼び出し関係図:
被呼び出し関係図:

◆ wr_s16b()

static void wr_s16b ( s16b  v)
static

符号あり16ビットをファイルに書き込む

引数
v書き込む符号あり16bit値
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_s32b()

static void wr_s32b ( s32b  v)
static

符号あり32ビットをファイルに書き込む

引数
v書き込む符号あり32bit値
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_saved_floor()

static void wr_saved_floor ( saved_floor_type sf_ptr)
static

保存フロアの書き込み / Actually write a saved floor data using effectively compressed format.

引数
sf_ptr保存したいフロアの参照ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_savefile_new()

static bool wr_savefile_new ( void  )
static

セーブデータの書き込み / Actually write a save-file

戻り値
成功すればtrue
呼び出し関係図:
被呼び出し関係図:

◆ wr_store()

static void wr_store ( store_type st_ptr)
static

セーブデータに店舗情報を書き込む / Write a "store" record

引数
st_ptr店舗情報の参照ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_string()

static void wr_string ( concptr  str)
static

文字列をファイルに書き込む

引数
str書き込む文字列
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_u16b()

static void wr_u16b ( u16b  v)
static

符号なし16ビットをファイルに書き込む

引数
v書き込む符号なし16bit値
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_u32b()

static void wr_u32b ( u32b  v)
static

符号なし32ビットをファイルに書き込む

引数
v書き込む符号なし32bit値
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ wr_xtra()

static void wr_xtra ( KIND_OBJECT_IDX  k_idx)
static

その他のゲーム情報を書き込む(実質はアイテムの鑑定情報のみ) / Write an "xtra" record

引数
k_idxベースアイテムのID
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

変数詳解

◆ fff

FILE* fff
static

◆ v_stamp

u32b v_stamp = 0L
static

◆ x_stamp

u32b x_stamp = 0L
static

◆ xor_byte

byte xor_byte
static