• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision5592a54c00781c61e23571bbc628836fc0e73095 (tree)
Time2019-07-22 23:39:27
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/cmd-basic.c
+++ b/src/cmd-basic.c
@@ -1741,17 +1741,17 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
17411741 * Creatures can also open or bash doors, see elsewhere.
17421742 * </pre>
17431743 */
1744-void do_cmd_bash(void)
1744+void do_cmd_bash(player_type *creature_ptr)
17451745 {
17461746 int y, x, dir;
17471747 grid_type *g_ptr;
17481748 bool more = FALSE;
17491749
1750- if (p_ptr->wild_mode) return;
1750+ if (creature_ptr->wild_mode) return;
17511751
1752- if (p_ptr->special_defense & KATA_MUSOU)
1752+ if (creature_ptr->special_defense & KATA_MUSOU)
17531753 {
1754- set_action(p_ptr, ACTION_NONE);
1754+ set_action(creature_ptr, ACTION_NONE);
17551755 }
17561756
17571757 /* Allow repeated command */
@@ -1759,7 +1759,7 @@ void do_cmd_bash(void)
17591759 {
17601760 /* Set repeat count */
17611761 command_rep = command_arg - 1;
1762- p_ptr->redraw |= (PR_STATE);
1762+ creature_ptr->redraw |= (PR_STATE);
17631763
17641764 /* Cancel the arg */
17651765 command_arg = 0;
@@ -1771,8 +1771,8 @@ void do_cmd_bash(void)
17711771 FEAT_IDX feat;
17721772
17731773 /* Bash location */
1774- y = p_ptr->y + ddy[dir];
1775- x = p_ptr->x + ddx[dir];
1774+ y = creature_ptr->y + ddy[dir];
1775+ x = creature_ptr->x + ddx[dir];
17761776
17771777 g_ptr = &current_floor_ptr->grid_array[y][x];
17781778
@@ -1788,7 +1788,7 @@ void do_cmd_bash(void)
17881788 /* Monster in the way */
17891789 else if (g_ptr->m_idx)
17901790 {
1791- take_turn(p_ptr, 100);
1791+ take_turn(creature_ptr, 100);
17921792
17931793 msg_print(_("モンスターが立ちふさがっている!", "There is a monster in the way!"));
17941794
--- a/src/cmd-basic.h
+++ b/src/cmd-basic.h
@@ -16,7 +16,7 @@ extern void do_cmd_open(player_type *creature_ptr);
1616 extern void do_cmd_close(player_type *creature_ptr);
1717 extern void do_cmd_tunnel(player_type *creature_ptr);
1818 extern void do_cmd_disarm(player_type *creature_ptr);
19-extern void do_cmd_bash(void);
19+extern void do_cmd_bash(player_type *creature_ptr);
2020 extern void do_cmd_alter(void);
2121 extern void do_cmd_spike(player_type *creature_ptr);
2222 extern void do_cmd_walk(bool pickup);
--- a/src/core.c
+++ b/src/core.c
@@ -3800,7 +3800,7 @@ static void process_command(void)
38003800 /* Bash a door */
38013801 case 'B':
38023802 {
3803- do_cmd_bash();
3803+ do_cmd_bash(p_ptr);
38043804 break;
38053805 }
38063806
Show on old repository browser