• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision389fa0c3f896912fc8372c76eb507ed5ed0fb717 (tree)
Time2019-06-12 23:44:09
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38844 change_floor_mode を player_type 構造体に取り込む.

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -5173,7 +5173,7 @@ static void dungeon(bool load_game)
51735173 * Maintain Unique monsters and artifact, save current
51745174 * floor, then prepare next floor
51755175 */
5176- leave_floor(change_floor_mode);
5176+ leave_floor(p_ptr->change_floor_mode);
51775177
51785178 /* Forget the flag */
51795179 reinit_wilderness = FALSE;
@@ -5547,7 +5547,7 @@ void play_game(bool new_game)
55475547 /* Generate a dungeon level if needed */
55485548 if (!current_world_ptr->character_dungeon)
55495549 {
5550- change_floor(change_floor_mode);
5550+ change_floor(p_ptr->change_floor_mode);
55515551 }
55525552
55535553 else
@@ -5559,7 +5559,7 @@ void play_game(bool new_game)
55595559 if (!p_ptr->y || !p_ptr->x)
55605560 {
55615561 msg_print(_("プレイヤーの位置がおかしい。フロアを再生成します。", "What a strange player location. Regenerate the dungeon floor."));
5562- change_floor(change_floor_mode);
5562+ change_floor(p_ptr->change_floor_mode);
55635563 }
55645564
55655565 /* Still no player? -- Try to locate random place */
@@ -5693,7 +5693,7 @@ void play_game(bool new_game)
56935693 prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_RAND_CONNECT);
56945694
56955695 /* prepare next floor */
5696- leave_floor(change_floor_mode);
5696+ leave_floor(p_ptr->change_floor_mode);
56975697 }
56985698 else
56995699 {
@@ -5709,7 +5709,7 @@ void play_game(bool new_game)
57095709 if (p_ptr->is_dead) break;
57105710
57115711 /* Make a new level */
5712- change_floor(change_floor_mode);
5712+ change_floor(p_ptr->change_floor_mode);
57135713 }
57145714
57155715 /* Close stuff */
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -44,7 +44,6 @@
4444
4545
4646 static FLOOR_IDX new_floor_id; /*!<次のフロアのID / floor_id of the destination */
47-BIT_FLAGS change_floor_mode; /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
4847 static u32b latest_visit_mark; /*!<フロアを渡った回数?(確認中) / Max number of visit_mark */
4948
5049 /*
@@ -139,7 +138,7 @@ void init_saved_floors(bool force)
139138 new_floor_id = 0;
140139
141140 /* No change floor mode yet */
142- change_floor_mode = 0;
141+ p_ptr->change_floor_mode = 0;
143142
144143 #ifdef SET_UID
145144 # ifdef SECURE
@@ -336,7 +335,7 @@ FLOOR_IDX get_new_floor_id(void)
336335 */
337336 void prepare_change_floor_mode(BIT_FLAGS mode)
338337 {
339- change_floor_mode |= mode;
338+ p_ptr->change_floor_mode |= mode;
340339 }
341340
342341 /*!
--- a/src/floor-save.h
+++ b/src/floor-save.h
@@ -17,7 +17,6 @@ typedef struct
1717 } saved_floor_type;
1818
1919 extern u32b saved_floor_file_sign;
20-extern BIT_FLAGS change_floor_mode; /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
2120
2221 extern void init_saved_floors(bool force);
2322 extern void change_floor(BIT_FLAGS floor_mode);
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -5882,7 +5882,7 @@ void cheat_death(player_type *creature_ptr)
58825882 " but revived."));
58835883
58845884 /* Prepare next floor */
5885- leave_floor(change_floor_mode);
5885+ leave_floor(p_ptr->change_floor_mode);
58865886 wipe_m_list();
58875887
58885888 }
--- a/src/player-status.h
+++ b/src/player-status.h
@@ -426,6 +426,7 @@ struct player_type
426426 bool is_dead; /* Player is dead */
427427 bool now_damaged;
428428 bool ambush_flag;
429+ BIT_FLAGS change_floor_mode; /*!<フロア移行処理に関するフラグ / Mode flags for changing floor */
429430
430431 bool reset_concent; /* Concentration reset flag */
431432
Show on old repository browser