Hengband  2.2.1
マクロ定義 | 関数 | 変数
floor-save.c ファイル
#include "angband.h"
#include "bldg.h"
#include "core.h"
#include "load.h"
#include "util.h"
#include "artifact.h"
#include "dungeon.h"
#include "floor.h"
#include "floor-save.h"
#include "floor-events.h"
#include "floor-generate.h"
#include "feature.h"
#include "geometry.h"
#include "grid.h"
#include "monster.h"
#include "quest.h"
#include "wild.h"
#include "spells-floor.h"
#include "monster-status.h"
#include "object-hook.h"
#include "cmd-pet.h"
#include "cmd-basic.h"
#include "files.h"
#include "player-effects.h"
#include "player-class.h"
#include "player-personality.h"
#include "world.h"
#include "spells.h"
#include "cmd-dump.h"
#include "save.h"
#include "view-mainwindow.h"
floor-save.c の依存先関係図:

マクロ定義

#define MAX_PARTY_MON   21
 フロア移動時に先のフロアに連れて行けるペットの最大数 Maximum number of preservable pets [詳解]
 

関数

void init_saved_floors (bool force)
 保存フロア配列を初期化する / Initialize saved_floors array. [詳解]
 
void clear_saved_floor_files (void)
 保存フロア用テンポラリファイルを削除する / Kill temporal files [詳解]
 
saved_floor_typeget_sf_ptr (FLOOR_IDX floor_id)
 保存フロアIDから参照ポインタを得る / Get a pointer for an item of the saved_floors array. [詳解]
 
static void kill_saved_floor (saved_floor_type *sf_ptr)
 参照ポインタ先の保存フロアを抹消する / kill a saved floor and get an empty space [詳解]
 
FLOOR_IDX get_new_floor_id (void)
 新規に利用可能な保存フロアを返す / Initialize new saved floor and get its floor id. [詳解]
 
void prepare_change_floor_mode (BIT_FLAGS mode)
 フロア切り替え時の処理フラグを追加する / Prepare mode flags of changing floor [詳解]
 
static void build_dead_end (floor_type *floor_ptr)
 階段移動先のフロアが生成できない時に簡単な行き止まりマップを作成する / Builds the dead end [詳解]
 
static void preserve_pet (void)
 フロア移動時のペット保存処理 / Preserve_pets [詳解]
 
void precalc_cur_num_of_pet (void)
 フロア移動時にペットを伴った場合の準備処理 / Pre-calculate the racial counters of preserved pets [詳解]
 
static void place_pet (player_type *master_ptr)
 移動先のフロアに伴ったペットを配置する / Place preserved pet monsters on new floor [詳解]
 
static void update_unique_artifact (s16b cur_floor_id)
 ユニークモンスターやアーティファクトの所在フロアを更新する / Hack – Update location of unique monsters and artifacts [詳解]
 
static void get_out_monster (floor_type *floor_ptr, player_type *protected_ptr)
 フロア移動時、プレイヤーの移動先モンスターが既にいた場合ランダムな近隣に移動させる / When a monster is at a place where player will return, [詳解]
 
static void locate_connected_stairs (player_type *creature_ptr, floor_type *floor_ptr, saved_floor_type *sf_ptr, BIT_FLAGS floor_mode)
 新フロアに移動元フロアに繋がる階段を配置する / Virtually teleport onto the stairs that is connecting between two floors. [詳解]
 
void leave_floor (player_type *creature_ptr)
 現在のフロアを離れるに伴って行なわれる保存処理 / Maintain quest monsters, mark next floor_id at stairs, save current floor, and prepare to enter next floor. [詳解]
 
void change_floor (player_type *creature_ptr)
 フロアの切り替え処理 / Enter new floor. [詳解]
 

変数

static FLOOR_IDX new_floor_id
 次のフロアのID / floor_id of the destination [詳解]
 
static u32b latest_visit_mark
 フロアを渡った回数?(確認中) / Max number of visit_mark [詳解]
 
FLOOR_IDX max_floor_id
 
u32b saved_floor_file_sign
 
static monster_type party_mon [MAX_PARTY_MON]
 フロア移動に保存するペットモンスターの配列 [詳解]
 

マクロ定義詳解

◆ MAX_PARTY_MON

#define MAX_PARTY_MON   21

フロア移動時に先のフロアに連れて行けるペットの最大数 Maximum number of preservable pets

関数詳解

◆ build_dead_end()

static void build_dead_end ( floor_type floor_ptr)
static

階段移動先のフロアが生成できない時に簡単な行き止まりマップを作成する / Builds the dead end

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

◆ change_floor()

void change_floor ( player_type creature_ptr)

フロアの切り替え処理 / Enter new floor.

戻り値
なし

If the floor is an old saved floor, it will be
restored from the temporal file. If the floor is new one, new p_ptr->current_floor_ptr->grid_array
will be generated.

呼び出し関係図:

◆ clear_saved_floor_files()

void clear_saved_floor_files ( void  )

保存フロア用テンポラリファイルを削除する / Kill temporal files

Should be called just before the game quit.

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

◆ get_new_floor_id()

FLOOR_IDX get_new_floor_id ( void  )

新規に利用可能な保存フロアを返す / Initialize new saved floor and get its floor id.

戻り値
利用可能な保存フロアID

If number of saved floors are already MAX_SAVED_FLOORS, kill the oldest one.

呼び出し関係図:

◆ get_out_monster()

static void get_out_monster ( floor_type floor_ptr,
player_type protected_ptr 
)
static

フロア移動時、プレイヤーの移動先モンスターが既にいた場合ランダムな近隣に移動させる / When a monster is at a place where player will return,

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

◆ get_sf_ptr()

saved_floor_type* get_sf_ptr ( FLOOR_IDX  floor_id)

保存フロアIDから参照ポインタを得る / Get a pointer for an item of the saved_floors array.

引数
floor_id保存フロアID
戻り値
IDに対応する保存フロアのポインタ、ない場合はNULLを返す。

◆ init_saved_floors()

void init_saved_floors ( bool  force)

保存フロア配列を初期化する / Initialize saved_floors array.

引数
forceテンポラリファイルが残っていた場合も警告なしで強制的に削除する。

Make sure that old temporal files are not remaining as gurbages.

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

◆ kill_saved_floor()

static void kill_saved_floor ( saved_floor_type sf_ptr)
static

参照ポインタ先の保存フロアを抹消する / kill a saved floor and get an empty space

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

◆ leave_floor()

void leave_floor ( player_type creature_ptr)

現在のフロアを離れるに伴って行なわれる保存処理 / Maintain quest monsters, mark next floor_id at stairs, save current floor, and prepare to enter next floor.

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

◆ locate_connected_stairs()

static void locate_connected_stairs ( player_type creature_ptr,
floor_type floor_ptr,
saved_floor_type sf_ptr,
BIT_FLAGS  floor_mode 
)
static

新フロアに移動元フロアに繋がる階段を配置する / Virtually teleport onto the stairs that is connecting between two floors.

引数
sf_ptr移動元の保存フロア構造体参照ポインタ
戻り値
なし
呼び出し関係図:
被呼び出し関係図:

◆ place_pet()

static void place_pet ( player_type master_ptr)
static

移動先のフロアに伴ったペットを配置する / Place preserved pet monsters on new floor

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

◆ precalc_cur_num_of_pet()

void precalc_cur_num_of_pet ( void  )

フロア移動時にペットを伴った場合の準備処理 / Pre-calculate the racial counters of preserved pets

戻り値
なし

To prevent multiple generation of unique monster who is the minion of player

呼び出し関係図:

◆ prepare_change_floor_mode()

void prepare_change_floor_mode ( BIT_FLAGS  mode)

フロア切り替え時の処理フラグを追加する / Prepare mode flags of changing floor

引数
mode追加したい所持フラグ
戻り値
なし

◆ preserve_pet()

static void preserve_pet ( void  )
static

フロア移動時のペット保存処理 / Preserve_pets

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

◆ update_unique_artifact()

static void update_unique_artifact ( s16b  cur_floor_id)
static

ユニークモンスターやアーティファクトの所在フロアを更新する / Hack – Update location of unique monsters and artifacts

引数
cur_floor_id現在のフロアID
戻り値
なし

The r_ptr->floor_id and a_ptr->floor_id are not updated correctly
while new floor creation since dungeons may be re-created by
auto-scum option.

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

変数詳解

◆ latest_visit_mark

u32b latest_visit_mark
static

フロアを渡った回数?(確認中) / Max number of visit_mark

◆ max_floor_id

FLOOR_IDX max_floor_id

◆ new_floor_id

FLOOR_IDX new_floor_id
static

次のフロアのID / floor_id of the destination

◆ party_mon

monster_type party_mon[MAX_PARTY_MON]
static

フロア移動に保存するペットモンスターの配列

◆ saved_floor_file_sign

u32b saved_floor_file_sign