• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision0226637add938b64bd2923115dc1d61a117e6c91 (tree)
Time2019-06-10 23:18:03
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38844 new_mane を player_type 構造体に移動.

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -4866,12 +4866,12 @@ static void process_player(void)
48664866 p_ptr->mane_dam[j] = p_ptr->mane_dam[j + 1];
48674867 }
48684868 }
4869- new_mane = FALSE;
4869+ p_ptr->new_mane = FALSE;
48704870 p_ptr->redraw |= (PR_IMITATION);
48714871 }
48724872 if (p_ptr->action == ACTION_LEARN)
48734873 {
4874- new_mane = FALSE;
4874+ p_ptr->new_mane = FALSE;
48754875 p_ptr->redraw |= (PR_STATE);
48764876 }
48774877
--- a/src/externs.h
+++ b/src/externs.h
@@ -62,5 +62,3 @@ extern player_type *p_ptr;
6262 extern MONSTER_IDX pet_t_m_idx;
6363 extern MONSTER_IDX riding_t_m_idx;
6464 extern MONRACE_IDX today_mon;
65-
66-extern bool new_mane;
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -1797,7 +1797,7 @@ bool make_attack_spell(MONSTER_IDX m_idx)
17971797 p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - 96;
17981798 p_ptr->mane_dam[p_ptr->mane_num] = dam;
17991799 p_ptr->mane_num++;
1800- new_mane = TRUE;
1800+ p_ptr->new_mane = TRUE;
18011801
18021802 p_ptr->redraw |= (PR_IMITATION);
18031803 }
--- a/src/mspells2.c
+++ b/src/mspells2.c
@@ -731,7 +731,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
731731 p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - RF4_SPELL_START;
732732 p_ptr->mane_dam[p_ptr->mane_num] = dam;
733733 p_ptr->mane_num++;
734- new_mane = TRUE;
734+ p_ptr->new_mane = TRUE;
735735
736736 p_ptr->redraw |= (PR_IMITATION);
737737 }
--- a/src/mspells3.c
+++ b/src/mspells3.c
@@ -1790,7 +1790,7 @@ void learn_spell(int monspell)
17901790
17911791 sound(SOUND_STUDY);
17921792
1793- new_mane = TRUE;
1793+ p_ptr->new_mane = TRUE;
17941794 p_ptr->redraw |= (PR_STATE);
17951795 }
17961796 }
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -125,7 +125,7 @@ void set_action(ACTION_IDX typ)
125125 case ACTION_LEARN:
126126 {
127127 msg_print(_("学習をやめた。", "You stop Learning"));
128- new_mane = FALSE;
128+ p_ptr->new_mane = FALSE;
129129 break;
130130 }
131131 case ACTION_KAMAE:
@@ -504,7 +504,7 @@ bool set_confused(TIME_EFFECT v)
504504 if (p_ptr->action == ACTION_LEARN)
505505 {
506506 msg_print(_("学習が続けられない!", "You cannot continue Learning!"));
507- new_mane = FALSE;
507+ p_ptr->new_mane = FALSE;
508508
509509 p_ptr->redraw |= (PR_STATE);
510510 p_ptr->action = ACTION_NONE;
--- a/src/player-status.h
+++ b/src/player-status.h
@@ -384,6 +384,7 @@ struct player_type
384384 SPELL_IDX mane_spell[MAX_MANE];
385385 HIT_POINT mane_dam[MAX_MANE];
386386 s16b mane_num;
387+ bool new_mane;
387388
388389 #define CONCENT_RADAR_THRESHOLD 2
389390 #define CONCENT_TELE_THRESHOLD 5
--- a/src/variable.c
+++ b/src/variable.c
@@ -48,8 +48,6 @@ MONSTER_IDX riding_t_m_idx;
4848
4949 MONSTER_IDX today_mon;
5050
51-bool new_mane;
52-
5351 #ifdef CHUUKEI
5452 bool chuukei_server;
5553 bool chuukei_client;
--- a/src/view-mainwindow.c
+++ b/src/view-mainwindow.c
@@ -1109,7 +1109,7 @@ static void prt_state(void)
11091109 case ACTION_LEARN:
11101110 {
11111111 strcpy(text, _("学習", "lear"));
1112- if (new_mane) attr = TERM_L_RED;
1112+ if (p_ptr->new_mane) attr = TERM_L_RED;
11131113 break;
11141114 }
11151115 case ACTION_FISH:
@@ -1270,7 +1270,7 @@ static void prt_imitation(void)
12701270 if (p_ptr->mane_num)
12711271 {
12721272 TERM_COLOR attr;
1273- if (new_mane) attr = TERM_L_RED;
1273+ if (p_ptr->new_mane) attr = TERM_L_RED;
12741274 else attr = TERM_WHITE;
12751275 c_put_str(attr, _("まね", "Imit"), row_study, col_study);
12761276 }
Show on old repository browser