OSDN Git Service

[Refactor] #38844 new_mane を player_type 構造体に移動.
authordeskull <deskull@users.sourceforge.jp>
Mon, 10 Jun 2019 14:18:03 +0000 (23:18 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 10 Jun 2019 14:18:03 +0000 (23:18 +0900)
src/core.c
src/externs.h
src/mspells1.c
src/mspells2.c
src/mspells3.c
src/player-effects.c
src/player-status.h
src/variable.c
src/view-mainwindow.c

index 2fa002c..87d106c 100644 (file)
@@ -4866,12 +4866,12 @@ static void process_player(void)
                                                p_ptr->mane_dam[j] = p_ptr->mane_dam[j + 1];
                                        }
                                }
-                               new_mane = FALSE;
+                               p_ptr->new_mane = FALSE;
                                p_ptr->redraw |= (PR_IMITATION);
                        }
                        if (p_ptr->action == ACTION_LEARN)
                        {
-                               new_mane = FALSE;
+                               p_ptr->new_mane = FALSE;
                                p_ptr->redraw |= (PR_STATE);
                        }
 
index 57fa5f6..0c422f5 100644 (file)
@@ -62,5 +62,3 @@ extern player_type *p_ptr;
 extern MONSTER_IDX pet_t_m_idx;
 extern MONSTER_IDX riding_t_m_idx;
 extern MONRACE_IDX today_mon;
-
-extern bool new_mane;
index 6893b3b..d59c82e 100644 (file)
@@ -1797,7 +1797,7 @@ bool make_attack_spell(MONSTER_IDX m_idx)
                        p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
                        p_ptr->mane_dam[p_ptr->mane_num] = dam;
                        p_ptr->mane_num++;
-                       new_mane = TRUE;
+                       p_ptr->new_mane = TRUE;
 
                        p_ptr->redraw |= (PR_IMITATION);
                }
index 17fd6cd..9967c8c 100644 (file)
@@ -731,7 +731,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
                        p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - RF4_SPELL_START;
                        p_ptr->mane_dam[p_ptr->mane_num] = dam;
                        p_ptr->mane_num++;
-                       new_mane = TRUE;
+                       p_ptr->new_mane = TRUE;
 
                        p_ptr->redraw |= (PR_IMITATION);
                }
index a6aafd0..33a3562 100644 (file)
@@ -1790,7 +1790,7 @@ void learn_spell(int monspell)
 
                sound(SOUND_STUDY);
 
-               new_mane = TRUE;
+               p_ptr->new_mane = TRUE;
                p_ptr->redraw |= (PR_STATE);
        }
 }
index d7d4940..1c68a1d 100644 (file)
@@ -125,7 +125,7 @@ void set_action(ACTION_IDX typ)
                        case ACTION_LEARN:
                        {
                                msg_print(_("学習をやめた。", "You stop Learning"));
-                               new_mane = FALSE;
+                               p_ptr->new_mane = FALSE;
                                break;
                        }
                        case ACTION_KAMAE:
@@ -504,7 +504,7 @@ bool set_confused(TIME_EFFECT v)
                        if (p_ptr->action == ACTION_LEARN)
                        {
                                msg_print(_("学習が続けられない!", "You cannot continue Learning!"));
-                               new_mane = FALSE;
+                               p_ptr->new_mane = FALSE;
 
                                p_ptr->redraw |= (PR_STATE);
                                p_ptr->action = ACTION_NONE;
index c94fc80..3356b4d 100644 (file)
@@ -384,6 +384,7 @@ struct player_type
        SPELL_IDX mane_spell[MAX_MANE];
        HIT_POINT mane_dam[MAX_MANE];
        s16b mane_num;
+       bool new_mane;
 
        #define CONCENT_RADAR_THRESHOLD 2
        #define CONCENT_TELE_THRESHOLD  5
index c00aac5..c0290b9 100644 (file)
@@ -48,8 +48,6 @@ MONSTER_IDX riding_t_m_idx;
 
 MONSTER_IDX today_mon;
 
-bool new_mane;
-
 #ifdef CHUUKEI
 bool chuukei_server;
 bool chuukei_client;
index adeef10..0a2bd8b 100644 (file)
@@ -1109,7 +1109,7 @@ static void prt_state(void)
                        case ACTION_LEARN:
                        {
                                strcpy(text, _("学習", "lear"));
-                               if (new_mane) attr = TERM_L_RED;
+                               if (p_ptr->new_mane) attr = TERM_L_RED;
                                break;
                        }
                        case ACTION_FISH:
@@ -1270,7 +1270,7 @@ static void prt_imitation(void)
                if (p_ptr->mane_num)
                {
                        TERM_COLOR attr;
-                       if (new_mane) attr = TERM_L_RED;
+                       if (p_ptr->new_mane) attr = TERM_L_RED;
                        else attr = TERM_WHITE;
                        c_put_str(attr, _("まね", "Imit"), row_study, col_study);
                }