OSDN Git Service

[Refactor] #38844 player_type 構造体に now_damaged を取り込む。 / Move now_damaged to player_t...
authordeskull <deskull@users.sourceforge.jp>
Sat, 2 Mar 2019 15:54:49 +0000 (00:54 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sat, 2 Mar 2019 15:54:49 +0000 (00:54 +0900)
src/dungeon.c
src/effects.c
src/externs.h
src/types.h
src/util.c
src/variable.c

index 96f27ce..64d50f8 100644 (file)
@@ -4968,7 +4968,7 @@ static void process_player(void)
                p_ptr->window |= PW_PLAYER;
                p_ptr->sutemi = FALSE;
                p_ptr->counter = FALSE;
-               now_damaged = FALSE;
+               p_ptr->now_damaged = FALSE;
 
                handle_stuff();
 
@@ -5956,7 +5956,7 @@ void play_game(bool new_game)
        p_ptr->teleport_town = FALSE;
        p_ptr->sutemi = FALSE;
        world_monster = FALSE;
-       now_damaged = FALSE;
+       p_ptr->now_damaged = FALSE;
        now_message = 0;
        start_time = time(NULL) - 1;
        record_o_name[0] = '\0';
index a89c5c0..2e1f229 100644 (file)
@@ -3876,7 +3876,7 @@ int take_hit(int damage_type, HIT_POINT damage, concptr hit_from, int monspell)
                disturb(TRUE, TRUE);
                if (auto_more)
                {
-                       now_damaged = TRUE;
+                       p_ptr->now_damaged = TRUE;
                }
        }
 
@@ -4182,7 +4182,7 @@ int take_hit(int damage_type, HIT_POINT damage, concptr hit_from, int monspell)
                if (auto_more)
                {
                        /* stop auto_more even if DAMAGE_USELIFE */
-                       now_damaged = TRUE;
+                       p_ptr->now_damaged = TRUE;
                }
 
                msg_print(_("*** 警告:低ヒット・ポイント! ***", "*** LOW HITPOINT WARNING! ***"));
index 06f90d8..d85ccfd 100644 (file)
@@ -410,7 +410,6 @@ extern FEAT_IDX feat_wall_outer;
 extern FEAT_IDX feat_wall_inner;
 extern FEAT_IDX feat_wall_solid;
 extern FEAT_IDX feat_ground_type[100], feat_wall_type[100];
-extern bool now_damaged;
 extern COMMAND_CODE now_message;
 extern bool use_menu;
 
index ebda6e6..06b6dd5 100644 (file)
@@ -1262,6 +1262,7 @@ struct player_type
 
        bool wait_report_score;   /* Waiting to report score */
        bool is_dead;             /* Player is dead */
+       bool now_damaged;
 
        bool wizard;              /* Player is in wizard mode */
 
index 0ef1de0..f4ad16b 100644 (file)
@@ -2699,7 +2699,7 @@ static void msg_flush(int x)
        byte a = TERM_L_BLUE;
        bool nagasu = FALSE;
 
-       if ((auto_more && !now_damaged) || num_more < 0){
+       if ((auto_more && !p_ptr->now_damaged) || num_more < 0){
                int i;
                for (i = 0; i < 8; i++)
                {
@@ -2714,7 +2714,7 @@ static void msg_flush(int x)
                        nagasu = TRUE;
                }
        }
-       now_damaged = FALSE;
+       p_ptr->now_damaged = FALSE;
 
        if (!p_ptr->playing || !nagasu)
        {
index 629c65c..8f90614 100644 (file)
@@ -898,7 +898,6 @@ FEAT_IDX feat_wall_inner;
 FEAT_IDX feat_wall_solid;
 FEAT_IDX feat_ground_type[100], feat_wall_type[100];
 
-bool now_damaged;
 COMMAND_CODE now_message;
 bool use_menu;