• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionda5d27173e95f7ca2599d04cdb35026c458cba8a (tree)
Time2019-05-05 11:40:45
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38844 is_loading_now を world_type 構造体へ移動.

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -4909,7 +4909,7 @@ static void dungeon(bool load_game)
49094909 current_floor_ptr->base_level = current_floor_ptr->dun_level;
49104910
49114911 /* Reset various flags */
4912- is_loading_now = FALSE;
4912+ current_world_ptr->is_loading_now = FALSE;
49134913
49144914 /* Not leaving */
49154915 p_ptr->leaving = FALSE;
@@ -5050,7 +5050,7 @@ static void dungeon(bool load_game)
50505050 /* Reset the object generation level */
50515051 current_floor_ptr->object_level = current_floor_ptr->base_level;
50525052
5053- is_loading_now = TRUE;
5053+ current_world_ptr->is_loading_now = TRUE;
50545054
50555055 if (p_ptr->energy_need > 0 && !p_ptr->inside_battle &&
50565056 (current_floor_ptr->dun_level || p_ptr->leaving_dungeon || p_ptr->inside_arena))
--- a/src/externs.h
+++ b/src/externs.h
@@ -146,7 +146,6 @@ extern int total_friends;
146146 extern int leaving_quest;
147147 extern bool reinit_wilderness;
148148 extern bool multi_rew;
149-extern bool is_loading_now;
150149 extern bool reset_concent;
151150 extern bool is_fired;
152151
--- a/src/files.c
+++ b/src/files.c
@@ -6057,7 +6057,7 @@ void do_cmd_save_game(int is_autosave)
60576057 (void)strcpy(p_ptr->died_from, _("(元気に生きている)", "(alive and well)"));
60586058
60596059 /* HACK -- don't get sanity blast on updating view */
6060- is_loading_now = FALSE;
6060+ current_world_ptr->is_loading_now = FALSE;
60616061
60626062 update_creature(p_ptr);
60636063
@@ -6065,7 +6065,7 @@ void do_cmd_save_game(int is_autosave)
60656065 mproc_init();
60666066
60676067 /* HACK -- reset the hackish flag */
6068- is_loading_now = TRUE;
6068+ current_world_ptr->is_loading_now = TRUE;
60696069 }
60706070
60716071
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -31,6 +31,7 @@
3131 #include "autopick.h"
3232 #include "cmd-dump.h"
3333 #include "melee.h"
34+#include "world.h"
3435
3536 /*!
3637 * @var horror_desc
@@ -2813,7 +2814,7 @@ void calc_bonuses(void)
28132814 if (p_ptr->icky_wield[i])
28142815 {
28152816 msg_print(_("今の装備はどうも自分にふさわしくない気がする。", "You do not feel comfortable with your weapon."));
2816- if (is_loading_now)
2817+ if (current_world_ptr->is_loading_now)
28172818 {
28182819 chg_virtue(V_FAITH, -1);
28192820 }
@@ -2859,7 +2860,7 @@ void calc_bonuses(void)
28592860 if (heavy_armor())
28602861 {
28612862 msg_print(_("装備が重くてバランスを取れない。", "The weight of your armor disrupts your balance."));
2862- if (is_loading_now)
2863+ if (current_world_ptr->is_loading_now)
28632864 {
28642865 chg_virtue(V_HARMONY, -1);
28652866 }
@@ -4232,7 +4233,7 @@ void sanity_blast(monster_type *m_ptr, bool necro)
42324233 }
42334234 else power *= 2;
42344235
4235- if (!is_loading_now)
4236+ if (!current_world_ptr->is_loading_now)
42364237 return; /* No effect yet, just loaded... */
42374238
42384239 if (!m_ptr->ml)
--- a/src/variable.c
+++ b/src/variable.c
@@ -126,8 +126,6 @@ bool shimmer_objects; /* Hack -- optimize multi-hued objects */
126126 bool repair_monsters; /* Hack -- optimize detect monsters */
127127 bool repair_objects; /* Hack -- optimize detect objects */
128128
129-bool is_loading_now; /*!< ロード直後にcalc_bonus()時の徳変化、及びsanity_blast()による異常を抑止する */
130-
131129 MONSTER_IDX hack_m_idx = 0; /* Hack -- see "process_monsters()" */
132130 MONSTER_IDX hack_m_idx_ii = 0;
133131
--- a/src/world.h
+++ b/src/world.h
@@ -16,6 +16,8 @@ typedef struct {
1616 u32b seed_flavor; /* Hack -- consistent object colors */
1717 u32b seed_town; /* Hack -- consistent town layout */
1818
19+ bool is_loading_now; /*!< ロード処理中フラグ...ロード直後にcalc_bonus()時の徳変化、及びsanity_blast()による異常を抑止する */
20+
1921 } world_type;
2022
2123 extern bool is_daytime(void);
Show on old repository browser