Hengband
2.2.1
|
セーブファイル書き込み処理 / 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"
関数 | |
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
bool load_player | ( | void | ) |
セーブデータ読み込みのメインルーチン / Attempt to Load a "savefile"
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.
void remove_loc | ( | void | ) |
ファイルロック処理
bool save_floor | ( | saved_floor_type * | sf_ptr, |
BIT_FLAGS | mode | ||
) |
ゲームプレイ中のフロア一時保存出力処理メインルーチン / Attempt to save the temporally saved-floor data
sf_ptr | 保存フロア参照ポインタ |
mode | 保存オプション |
|
static |
ゲームプレイ中のフロア一時保存出力処理サブルーチン / Actually write a temporal saved floor file
sf_ptr | 保存フロア参照ポインタ |
bool save_player | ( | void | ) |
セーブデータ書き込みのメインルーチン / Attempt to save the player in a savefile
|
static |
セーブデータ書き込みのサブルーチン / Medium level player saver
Angband 2.8.0 will use "fd" instead of "fff" if possible
|
static |
クイック・スタート情報を書き込む / Save quick start data
|
static |
1バイトをファイルに書き込む / These functions place information into a savefile a byte at a time
v | 書き込むバイト値 |
|
static |
|
static |
現在フロアの書き込み / Write the current dungeon (new method)
|
static |
その他の情報を書き込む / Write some "extra" info
|
static |
ダミー情報スキップを書き込む / Hack – Write the "ghost" info
|
static |
アイテムオブジェクトを書き込む / Write an "item" record
o_ptr | アイテムオブジェクト保存元ポインタ |
|
static |
モンスターの思い出を書き込む / Write a "lore" record
r_idx | モンスター種族ID |
|
static |
モンスター情報を書き込む / Write a "monster" record
m_ptr | モンスター情報保存元ポインタ |
|
static |
ゲームオプション情報を書き込む / Write the "options"
|
static |
セーブデータに乱数情報を書き込む / Write RNG state
|
static |
符号あり16ビットをファイルに書き込む
v | 書き込む符号あり16bit値 |
|
static |
符号あり32ビットをファイルに書き込む
v | 書き込む符号あり32bit値 |
|
static |
保存フロアの書き込み / Actually write a saved floor data using effectively compressed format.
sf_ptr | 保存したいフロアの参照ポインタ |
|
static |
セーブデータの書き込み / Actually write a save-file
|
static |
セーブデータに店舗情報を書き込む / Write a "store" record
st_ptr | 店舗情報の参照ポインタ |
|
static |
文字列をファイルに書き込む
str | 書き込む文字列 |
|
static |
符号なし16ビットをファイルに書き込む
v | 書き込む符号なし16bit値 |
|
static |
符号なし32ビットをファイルに書き込む
v | 書き込む符号なし32bit値 |
|
static |
その他のゲーム情報を書き込む(実質はアイテムの鑑定情報のみ) / Write an "xtra" record
k_idx | ベースアイテムのID |
|
static |
|
static |
|
static |
|
static |