• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision9f093f959a05f5aed18dc9b59c0038409cef8c67 (tree)
Time2019-06-29 19:07:10
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 set_action() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -640,7 +640,7 @@ void do_cmd_activate(player_type *user_ptr)
640640
641641 if (user_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
642642 {
643- set_action(ACTION_NONE);
643+ set_action(p_ptr, ACTION_NONE);
644644 }
645645
646646 item_tester_hook = item_tester_hook_activate;
--- a/src/cmd-basic.c
+++ b/src/cmd-basic.c
@@ -195,7 +195,7 @@ void do_cmd_go_up(player_type *creature_ptr)
195195
196196 if (creature_ptr->special_defense & KATA_MUSOU)
197197 {
198- set_action(ACTION_NONE);
198+ set_action(p_ptr, ACTION_NONE);
199199 }
200200
201201 /* Verify stairs */
@@ -333,7 +333,7 @@ void do_cmd_go_down(player_type *creature_ptr)
333333
334334 if (creature_ptr->special_defense & KATA_MUSOU)
335335 {
336- set_action(ACTION_NONE);
336+ set_action(p_ptr, ACTION_NONE);
337337 }
338338
339339 /* Verify stairs */
@@ -830,7 +830,7 @@ void do_cmd_open(player_type *creature_ptr)
830830
831831 if (creature_ptr->special_defense & KATA_MUSOU)
832832 {
833- set_action(ACTION_NONE);
833+ set_action(p_ptr, ACTION_NONE);
834834 }
835835
836836 /* Option: Pick a direction */
@@ -974,7 +974,7 @@ void do_cmd_close(void)
974974
975975 if (p_ptr->special_defense & KATA_MUSOU)
976976 {
977- set_action(ACTION_NONE);
977+ set_action(p_ptr, ACTION_NONE);
978978 }
979979
980980 /* Option: Pick a direction */
@@ -1219,7 +1219,7 @@ void do_cmd_tunnel(void)
12191219
12201220 if (p_ptr->special_defense & KATA_MUSOU)
12211221 {
1222- set_action(ACTION_NONE);
1222+ set_action(p_ptr, ACTION_NONE);
12231223 }
12241224
12251225 /* Allow repeated command */
@@ -1552,7 +1552,7 @@ void do_cmd_disarm(void)
15521552
15531553 if (p_ptr->special_defense & KATA_MUSOU)
15541554 {
1555- set_action(ACTION_NONE);
1555+ set_action(p_ptr, ACTION_NONE);
15561556 }
15571557
15581558 /* Option: Pick a direction */
@@ -1752,7 +1752,7 @@ void do_cmd_bash(void)
17521752
17531753 if (p_ptr->special_defense & KATA_MUSOU)
17541754 {
1755- set_action(ACTION_NONE);
1755+ set_action(p_ptr, ACTION_NONE);
17561756 }
17571757
17581758 /* Allow repeated command */
@@ -1834,7 +1834,7 @@ void do_cmd_alter(void)
18341834
18351835 if (p_ptr->special_defense & KATA_MUSOU)
18361836 {
1837- set_action(ACTION_NONE);
1837+ set_action(p_ptr, ACTION_NONE);
18381838 }
18391839
18401840 /* Allow repeated command */
@@ -1964,7 +1964,7 @@ void do_cmd_spike(void)
19641964
19651965 if (p_ptr->special_defense & KATA_MUSOU)
19661966 {
1967- set_action(ACTION_NONE);
1967+ set_action(p_ptr, ACTION_NONE);
19681968 }
19691969
19701970 /* Get a "repeated" direction */
@@ -2055,7 +2055,7 @@ void do_cmd_walk(bool pickup)
20552055
20562056 if ((dir != 5) && (p_ptr->special_defense & KATA_MUSOU))
20572057 {
2058- set_action(ACTION_NONE);
2058+ set_action(p_ptr, ACTION_NONE);
20592059 }
20602060
20612061 /* Hack -- In small scale wilderness it takes MUCH more time to move */
@@ -2108,7 +2108,7 @@ void do_cmd_run(void)
21082108
21092109 if (p_ptr->special_defense & KATA_MUSOU)
21102110 {
2111- set_action(ACTION_NONE);
2111+ set_action(p_ptr, ACTION_NONE);
21122112 }
21132113
21142114 /* Get a "repeated" direction */
@@ -2160,7 +2160,7 @@ void do_cmd_stay(bool pickup)
21602160 void do_cmd_rest(void)
21612161 {
21622162
2163- set_action(ACTION_NONE);
2163+ set_action(p_ptr, ACTION_NONE);
21642164
21652165 if ((p_ptr->pclass == CLASS_BARD) && (SINGING_SONG_EFFECT(p_ptr) || INTERUPTING_SONG_EFFECT(p_ptr)))
21662166 {
@@ -2282,7 +2282,7 @@ void do_cmd_fire(SPELL_IDX snipe_type)
22822282
22832283 if (p_ptr->special_defense & KATA_MUSOU)
22842284 {
2285- set_action(ACTION_NONE);
2285+ set_action(p_ptr, ACTION_NONE);
22862286 }
22872287
22882288 q = _("どれを撃ちますか? ", "Fire which item? ");
@@ -2364,7 +2364,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
23642364
23652365 if (p_ptr->special_defense & KATA_MUSOU)
23662366 {
2367- set_action(ACTION_NONE);
2367+ set_action(p_ptr, ACTION_NONE);
23682368 }
23692369
23702370 if (shuriken >= 0)
--- a/src/cmd-eat.c
+++ b/src/cmd-eat.c
@@ -512,7 +512,7 @@ void do_cmd_eat_food(void)
512512
513513 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
514514 {
515- set_action(ACTION_NONE);
515+ set_action(p_ptr, ACTION_NONE);
516516 }
517517
518518 /* Restrict choices to food */
--- a/src/cmd-hissatsu.c
+++ b/src/cmd-hissatsu.c
@@ -333,7 +333,7 @@ void do_cmd_hissatsu(void)
333333
334334 if (p_ptr->special_defense & KATA_MASK)
335335 {
336- set_action(ACTION_NONE);
336+ set_action(p_ptr, ACTION_NONE);
337337 }
338338
339339 if (!get_hissatsu_power(&n)) return;
@@ -382,7 +382,7 @@ void do_cmd_gain_hissatsu(void)
382382
383383 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
384384 {
385- set_action(ACTION_NONE);
385+ set_action(p_ptr, ACTION_NONE);
386386 }
387387
388388 if (p_ptr->blind || no_lite())
--- a/src/cmd-item.c
+++ b/src/cmd-item.c
@@ -181,7 +181,7 @@ void do_cmd_wield(void)
181181
182182 if (p_ptr->special_defense & KATA_MUSOU)
183183 {
184- set_action(ACTION_NONE);
184+ set_action(p_ptr, ACTION_NONE);
185185 }
186186
187187 /* Restrict the choices */
@@ -531,7 +531,7 @@ void do_cmd_takeoff(void)
531531
532532 if (p_ptr->special_defense & KATA_MUSOU)
533533 {
534- set_action(ACTION_NONE);
534+ set_action(p_ptr, ACTION_NONE);
535535 }
536536
537537 q = _("どれを装備からはずしますか? ", "Take off which item? ");
@@ -596,7 +596,7 @@ void do_cmd_drop(void)
596596
597597 if (p_ptr->special_defense & KATA_MUSOU)
598598 {
599- set_action(ACTION_NONE);
599+ set_action(p_ptr, ACTION_NONE);
600600 }
601601
602602 q = _("どのアイテムを落としますか? ", "Drop which item? ");
@@ -656,7 +656,7 @@ void do_cmd_destroy(void)
656656
657657 if (p_ptr->special_defense & KATA_MUSOU)
658658 {
659- set_action(ACTION_NONE);
659+ set_action(p_ptr, ACTION_NONE);
660660 }
661661
662662 /* Hack -- force destruction */
@@ -1100,7 +1100,7 @@ void do_cmd_refill(void)
11001100
11011101 if (p_ptr->special_defense & KATA_MUSOU)
11021102 {
1103- set_action(ACTION_NONE);
1103+ set_action(p_ptr, ACTION_NONE);
11041104 }
11051105
11061106 /* It is nothing */
@@ -1529,7 +1529,7 @@ void do_cmd_use(void)
15291529
15301530 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
15311531 {
1532- set_action(ACTION_NONE);
1532+ set_action(p_ptr, ACTION_NONE);
15331533 }
15341534
15351535 item_tester_hook = item_tester_hook_use;
--- a/src/cmd-pet.c
+++ b/src/cmd-pet.c
@@ -285,7 +285,7 @@ bool do_riding(bool force)
285285 x = p_ptr->x + ddx[dir];
286286 g_ptr = &current_floor_ptr->grid_array[y][x];
287287
288- if (p_ptr->special_defense & KATA_MUSOU) set_action(ACTION_NONE);
288+ if (p_ptr->special_defense & KATA_MUSOU) set_action(p_ptr, ACTION_NONE);
289289
290290 if (p_ptr->riding)
291291 {
@@ -369,7 +369,7 @@ bool do_riding(bool force)
369369 msg_format(_("%sを起こした。", "You have waked %s up."), m_name);
370370 }
371371
372- if (p_ptr->action == ACTION_KAMAE) set_action(ACTION_NONE);
372+ if (p_ptr->action == ACTION_KAMAE) set_action(p_ptr, ACTION_NONE);
373373
374374 p_ptr->riding = g_ptr->m_idx;
375375
--- a/src/cmd-quaff.c
+++ b/src/cmd-quaff.c
@@ -610,7 +610,7 @@ void do_cmd_quaff_potion(void)
610610
611611 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
612612 {
613- set_action(ACTION_NONE);
613+ set_action(p_ptr, ACTION_NONE);
614614 }
615615
616616 /* Restrict choices to potions */
--- a/src/cmd-read.c
+++ b/src/cmd-read.c
@@ -632,7 +632,7 @@ void do_cmd_read_scroll(void)
632632
633633 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
634634 {
635- set_action(ACTION_NONE);
635+ set_action(p_ptr, ACTION_NONE);
636636 }
637637
638638 if (cmd_limit_blind(p_ptr)) return;
--- a/src/cmd-spell.c
+++ b/src/cmd-spell.c
@@ -651,7 +651,7 @@ void do_cmd_browse(void)
651651
652652 if (p_ptr->special_defense & KATA_MUSOU)
653653 {
654- set_action(ACTION_NONE);
654+ set_action(p_ptr, ACTION_NONE);
655655 }
656656
657657 if (p_ptr->pclass == CLASS_FORCETRAINER)
@@ -829,7 +829,7 @@ void do_cmd_study(void)
829829
830830 if (p_ptr->special_defense & KATA_MUSOU)
831831 {
832- set_action(ACTION_NONE);
832+ set_action(p_ptr, ACTION_NONE);
833833 }
834834
835835 #ifdef JP
--- a/src/cmd-usestaff.c
+++ b/src/cmd-usestaff.c
@@ -440,7 +440,7 @@ void do_cmd_use_staff(void)
440440
441441 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
442442 {
443- set_action(ACTION_NONE);
443+ set_action(p_ptr, ACTION_NONE);
444444 }
445445
446446 q = _("どの杖を使いますか? ", "Use which staff? ");
--- a/src/cmd-zaprod.c
+++ b/src/cmd-zaprod.c
@@ -412,7 +412,7 @@ void do_cmd_zap_rod(void)
412412
413413 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
414414 {
415- set_action(ACTION_NONE);
415+ set_action(p_ptr, ACTION_NONE);
416416 }
417417
418418 q = _("どのロッドを振りますか? ", "Zap which rod? ");
--- a/src/cmd-zapwand.c
+++ b/src/cmd-zapwand.c
@@ -463,7 +463,7 @@ void do_cmd_aim_wand(void)
463463 if (cmd_limit_arena(p_ptr)) return;
464464 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
465465 {
466- set_action(ACTION_NONE);
466+ set_action(p_ptr, ACTION_NONE);
467467 }
468468
469469 q = _("どの魔法棒で狙いますか? ", "Aim which wand? ");
--- a/src/core.c
+++ b/src/core.c
@@ -3715,8 +3715,8 @@ static void process_command(void)
37153715 /* Toggle search mode */
37163716 case 'S':
37173717 {
3718- if (p_ptr->action == ACTION_SEARCH) set_action(ACTION_NONE);
3719- else set_action(ACTION_SEARCH);
3718+ if (p_ptr->action == ACTION_SEARCH) set_action(p_ptr, ACTION_NONE);
3719+ else set_action(p_ptr, ACTION_SEARCH);
37203720 break;
37213721 }
37223722
@@ -4274,7 +4274,7 @@ static void process_command(void)
42744274 if (!p_ptr->wild_mode) do_cmd_travel();
42754275 if (p_ptr->special_defense & KATA_MUSOU)
42764276 {
4277- set_action(ACTION_NONE);
4277+ set_action(p_ptr, ACTION_NONE);
42784278 }
42794279 break;
42804280 }
@@ -4466,7 +4466,7 @@ static void process_player(void)
44664466 if ((p_ptr->chp == p_ptr->mhp) &&
44674467 (p_ptr->csp >= p_ptr->msp))
44684468 {
4469- set_action(ACTION_NONE);
4469+ set_action(p_ptr, ACTION_NONE);
44704470 }
44714471 }
44724472
@@ -4483,7 +4483,7 @@ static void process_player(void)
44834483 !p_ptr->image && !p_ptr->word_recall &&
44844484 !p_ptr->alter_reality)
44854485 {
4486- set_action(ACTION_NONE);
4486+ set_action(p_ptr, ACTION_NONE);
44874487 }
44884488 }
44894489 }
@@ -4592,7 +4592,7 @@ static void process_player(void)
45924592 /* Mana run out */
45934593 p_ptr->csp = 0;
45944594 p_ptr->csp_frac = 0;
4595- set_action(ACTION_NONE);
4595+ set_action(p_ptr, ACTION_NONE);
45964596 }
45974597 else
45984598 {
@@ -4608,7 +4608,7 @@ static void process_player(void)
46084608 {
46094609 if (p_ptr->csp < 3)
46104610 {
4611- set_action(ACTION_NONE);
4611+ set_action(p_ptr, ACTION_NONE);
46124612 }
46134613 else
46144614 {
@@ -4671,7 +4671,7 @@ static void process_player(void)
46714671 /* Reduce rest count */
46724672 p_ptr->resting--;
46734673
4674- if (!p_ptr->resting) set_action(ACTION_NONE);
4674+ if (!p_ptr->resting) set_action(p_ptr, ACTION_NONE);
46754675 p_ptr->redraw |= (PR_STATE);
46764676 }
46774677
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -2343,7 +2343,7 @@ bool py_attack(POSITION y, POSITION x, COMBAT_OPTION_IDX mode)
23432343
23442344 if ((p_ptr->special_defense & KATA_IAI) && ((mode != HISSATSU_IAI) || mdeath))
23452345 {
2346- set_action(ACTION_NONE);
2346+ set_action(p_ptr, ACTION_NONE);
23472347 }
23482348
23492349 return mdeath;
@@ -4108,7 +4108,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
41084108
41094109 if (p_ptr->special_defense & KATA_IAI)
41104110 {
4111- set_action(ACTION_NONE);
4111+ set_action(p_ptr, ACTION_NONE);
41124112 }
41134113
41144114 /* Assume we attacked */
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -99,9 +99,9 @@ const kamae kata_shurui[MAX_KATA] =
9999 * #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL から選択。
100100 * @return なし
101101 */
102-void set_action(ACTION_IDX typ)
102+void set_action(player_type *creature_ptr, ACTION_IDX typ)
103103 {
104- int prev_typ = p_ptr->action;
104+ int prev_typ = creature_ptr->action;
105105
106106 if (typ == prev_typ)
107107 {
@@ -114,32 +114,32 @@ void set_action(ACTION_IDX typ)
114114 case ACTION_SEARCH:
115115 {
116116 msg_print(_("探索をやめた。", "You no longer walk carefully."));
117- p_ptr->redraw |= (PR_SPEED);
117+ creature_ptr->redraw |= (PR_SPEED);
118118 break;
119119 }
120120 case ACTION_REST:
121121 {
122- p_ptr->resting = 0;
122+ creature_ptr->resting = 0;
123123 break;
124124 }
125125 case ACTION_LEARN:
126126 {
127127 msg_print(_("学習をやめた。", "You stop Learning"));
128- p_ptr->new_mane = FALSE;
128+ creature_ptr->new_mane = FALSE;
129129 break;
130130 }
131131 case ACTION_KAMAE:
132132 {
133133 msg_print(_("構えをといた。", "You stop assuming the posture."));
134- p_ptr->special_defense &= ~(KAMAE_MASK);
134+ creature_ptr->special_defense &= ~(KAMAE_MASK);
135135 break;
136136 }
137137 case ACTION_KATA:
138138 {
139139 msg_print(_("型を崩した。", "You stop assuming the posture."));
140- p_ptr->special_defense &= ~(KATA_MASK);
141- p_ptr->update |= (PU_MONSTERS);
142- p_ptr->redraw |= (PR_STATUS);
140+ creature_ptr->special_defense &= ~(KATA_MASK);
141+ creature_ptr->update |= (PU_MONSTERS);
142+ creature_ptr->redraw |= (PR_STATUS);
143143 break;
144144 }
145145 case ACTION_SING:
@@ -150,7 +150,7 @@ void set_action(ACTION_IDX typ)
150150 case ACTION_HAYAGAKE:
151151 {
152152 msg_print(_("足が重くなった。", "You are no longer walking extremely fast."));
153- take_turn(p_ptr, 100);
153+ take_turn(creature_ptr, 100);
154154 break;
155155 }
156156 case ACTION_SPELL:
@@ -161,18 +161,18 @@ void set_action(ACTION_IDX typ)
161161 }
162162 }
163163
164- p_ptr->action = typ;
164+ creature_ptr->action = typ;
165165
166166 /* If we are requested other action, stop singing */
167- if (prev_typ == ACTION_SING) stop_singing(p_ptr);
167+ if (prev_typ == ACTION_SING) stop_singing(creature_ptr);
168168 if (prev_typ == ACTION_SPELL) stop_hex_spell();
169169
170- switch (p_ptr->action)
170+ switch (creature_ptr->action)
171171 {
172172 case ACTION_SEARCH:
173173 {
174174 msg_print(_("注意深く歩き始めた。", "You begin to walk carefully."));
175- p_ptr->redraw |= (PR_SPEED);
175+ creature_ptr->redraw |= (PR_SPEED);
176176 break;
177177 }
178178 case ACTION_LEARN:
@@ -195,8 +195,8 @@ void set_action(ACTION_IDX typ)
195195 break;
196196 }
197197 }
198- p_ptr->update |= (PU_BONUS);
199- p_ptr->redraw |= (PR_STATE);
198+ creature_ptr->update |= (PU_BONUS);
199+ creature_ptr->redraw |= (PR_STATE);
200200 }
201201
202202 /*!
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -11,7 +11,7 @@ struct kamae
1111
1212 /* effects.c */
1313
14-extern void set_action(ACTION_IDX typ);
14+extern void set_action(player_type *creature_ptr, ACTION_IDX typ);
1515 extern void reset_tim_flags(player_type *creature_ptr);
1616 extern void dispel_player(player_type *creature_ptr);
1717 extern bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, IDX p, bool do_dec);
--- a/src/player-move.c
+++ b/src/player-move.c
@@ -677,7 +677,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
677677 (!p_ptr->levitation && have_flag(f_ptr->flags, FF_DEEP))))
678678 {
679679 msg_print(_("ここでは素早く動けない。", "You cannot run in here."));
680- set_action(ACTION_NONE);
680+ set_action(p_ptr, ACTION_NONE);
681681 }
682682 if (p_ptr->prace == RACE_MERFOLK)
683683 {
@@ -2297,7 +2297,7 @@ void disturb(bool stop_search, bool stop_travel)
22972297 if ((p_ptr->action == ACTION_REST) || (p_ptr->action == ACTION_FISH) || (stop_search && (p_ptr->action == ACTION_SEARCH)))
22982298 {
22992299 /* Cancel */
2300- set_action(ACTION_NONE);
2300+ set_action(p_ptr, ACTION_NONE);
23012301 }
23022302
23032303 /* Cancel running */
--- a/src/player-status.c
+++ b/src/player-status.c
@@ -1615,7 +1615,7 @@ void calc_bonuses(void)
16151615 {
16161616 if (!(empty_hands_status & EMPTY_HAND_RARM))
16171617 {
1618- set_action(ACTION_NONE);
1618+ set_action(p_ptr, ACTION_NONE);
16191619 }
16201620 }
16211621
--- a/src/racial.c
+++ b/src/racial.c
@@ -78,7 +78,7 @@ static bool choose_kamae(void)
7878 {
7979 if (p_ptr->action == ACTION_KAMAE)
8080 {
81- set_action(ACTION_NONE);
81+ set_action(p_ptr, ACTION_NONE);
8282 }
8383 else
8484 msg_print(_("もともと構えていない。", "You are not assuming a posture."));
@@ -106,7 +106,7 @@ static bool choose_kamae(void)
106106 break;
107107 }
108108 }
109- set_action(ACTION_KAMAE);
109+ set_action(p_ptr, ACTION_KAMAE);
110110
111111 if (p_ptr->special_defense & (KAMAE_GENBU << new_kamae))
112112 {
@@ -177,7 +177,7 @@ static bool choose_kata(void)
177177 {
178178 if (p_ptr->action == ACTION_KATA)
179179 {
180- set_action(ACTION_NONE);
180+ set_action(p_ptr, ACTION_NONE);
181181 }
182182 else
183183 msg_print(_("もともと構えていない。", "You are not assuming posture."));
@@ -205,7 +205,7 @@ static bool choose_kata(void)
205205 break;
206206 }
207207 }
208- set_action(ACTION_KATA);
208+ set_action(p_ptr, ACTION_KATA);
209209
210210 if (p_ptr->special_defense & (KATA_IAI << new_kata))
211211 {
@@ -579,11 +579,11 @@ static bool cmd_racial_power_aux(s32b command)
579579 {
580580 if (p_ptr->action == ACTION_LEARN)
581581 {
582- set_action(ACTION_NONE);
582+ set_action(p_ptr, ACTION_NONE);
583583 }
584584 else
585585 {
586- set_action(ACTION_LEARN);
586+ set_action(p_ptr, ACTION_LEARN);
587587 }
588588 free_turn(p_ptr);
589589 break;
@@ -855,7 +855,7 @@ void do_cmd_racial_power(void)
855855
856856 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
857857 {
858- set_action(ACTION_NONE);
858+ set_action(p_ptr, ACTION_NONE);
859859 }
860860
861861 switch (p_ptr->pclass)
--- a/src/realm-hex.c
+++ b/src/realm-hex.c
@@ -54,7 +54,7 @@ bool stop_hex_spell_all(void)
5454 CASTING_HEX_FLAGS(p_ptr) = 0;
5555 CASTING_HEX_NUM(p_ptr) = 0;
5656
57- if (p_ptr->action == ACTION_SPELL) set_action(ACTION_NONE);
57+ if (p_ptr->action == ACTION_SPELL) set_action(p_ptr, ACTION_NONE);
5858
5959 p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
6060 p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
@@ -824,7 +824,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
824824 do_spell(REALM_HEX, spell, SPELL_STOP);
825825 CASTING_HEX_FLAGS(p_ptr) &= ~(1L << spell);
826826 CASTING_HEX_NUM(p_ptr)--;
827- if (!SINGING_SONG_ID(p_ptr)) set_action(ACTION_NONE);
827+ if (!SINGING_SONG_ID(p_ptr)) set_action(p_ptr, ACTION_NONE);
828828 }
829829 }
830830 if (stop)
@@ -1122,7 +1122,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
11221122 CASTING_HEX_FLAGS(p_ptr) |= 1L << (spell);
11231123 CASTING_HEX_NUM(p_ptr)++;
11241124
1125- if (p_ptr->action != ACTION_SPELL) set_action(ACTION_SPELL);
1125+ if (p_ptr->action != ACTION_SPELL) set_action(p_ptr, ACTION_SPELL);
11261126 }
11271127
11281128 if (!info)
--- a/src/realm-song.c
+++ b/src/realm-song.c
@@ -27,7 +27,7 @@ static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
2727
2828
2929 /* Now the player is singing */
30- set_action(ACTION_SING);
30+ set_action(p_ptr, ACTION_SING);
3131
3232 p_ptr->update |= (PU_BONUS);
3333 p_ptr->redraw |= (PR_STATUS);
--- a/src/spells-status.c
+++ b/src/spells-status.c
@@ -169,8 +169,8 @@ void stop_singing(player_type *creature_ptr)
169169 /* The player is singing? */
170170 if (!SINGING_SONG_EFFECT(creature_ptr)) return;
171171
172- /* Hack -- if called from set_action(), avoid recursive loop */
173- if (creature_ptr->action == ACTION_SING) set_action(ACTION_NONE);
172+ /* Hack -- if called from set_action(p_ptr, ), avoid recursive loop */
173+ if (creature_ptr->action == ACTION_SING) set_action(p_ptr, ACTION_NONE);
174174
175175 /* Message text of each song or etc. */
176176 do_spell(REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP);
@@ -426,7 +426,7 @@ bool fishing(player_type *creature_ptr)
426426 free_turn(creature_ptr);
427427 return FALSE;
428428 }
429- set_action(ACTION_FISH);
429+ set_action(p_ptr, ACTION_FISH);
430430 creature_ptr->redraw |= (PR_STATE);
431431 return TRUE;
432432 }
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -4211,7 +4211,7 @@ void hayagake(player_type *creature_ptr)
42114211 {
42124212 if (creature_ptr->action == ACTION_HAYAGAKE)
42134213 {
4214- set_action(ACTION_NONE);
4214+ set_action(p_ptr, ACTION_NONE);
42154215 }
42164216 else
42174217 {
@@ -4225,7 +4225,7 @@ void hayagake(player_type *creature_ptr)
42254225 }
42264226 else
42274227 {
4228- set_action(ACTION_HAYAGAKE);
4228+ set_action(p_ptr, ACTION_HAYAGAKE);
42294229 }
42304230 }
42314231 creature_ptr->energy_use = 0;
--- a/src/wild.c
+++ b/src/wild.c
@@ -1181,7 +1181,7 @@ bool change_wild_mode(bool encount)
11811181 if (hex_spelling_any()) stop_hex_spell_all();
11821182
11831183 /* Cancel any special action */
1184- set_action(ACTION_NONE);
1184+ set_action(p_ptr, ACTION_NONE);
11851185
11861186 /* Go into the global map */
11871187 p_ptr->wild_mode = TRUE;
Show on old repository browser