OSDN Git Service

[Refactor] #37353 redraw_stuff() の直接呼出しを抑止。 / Forbid call of redraw_stuff() except...
authorDeskull <deskull@users.sourceforge.jp>
Sun, 16 Dec 2018 01:56:32 +0000 (10:56 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 16 Dec 2018 01:56:32 +0000 (10:56 +0900)
src/cave.c
src/dungeon.c
src/melee1.c
src/monster-status.c
src/spells1.c
src/xtra1.c

index ab8f673..688948a 100644 (file)
@@ -1746,7 +1746,7 @@ void prt_path(POSITION y, POSITION x)
        path_n = project_path(path_g, (project_length ? project_length : MAX_RANGE), p_ptr->y, p_ptr->x, y, x, PROJECT_PATH|PROJECT_THRU);
 
        p_ptr->redraw |= (PR_MAP);
-       redraw_stuff();
+       handle_stuff();
 
        /* Draw path */
        for (i = 0; i < path_n; i++)
index f29b7c4..3b75e10 100644 (file)
@@ -4974,7 +4974,7 @@ static void process_player(void)
                        command_rep--;
 
                        p_ptr->redraw |= (PR_STATE);
-                       redraw_stuff();
+                       handle_stuff();
 
                        /* Hack -- Assume messages were seen */
                        msg_flag = FALSE;
index a3b190d..1406cac 100644 (file)
@@ -1193,7 +1193,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
 
                        if ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_DEATH_SCYTHE) && one_in_(3))
                        {
-                               u32b flgs_aux[TR_FLAG_SIZE];
+                               BIT_FLAGS flgs_aux[TR_FLAG_SIZE];
 
                                sound(SOUND_HIT);
 
@@ -1285,12 +1285,11 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
                                if (k < 0) k = 0;
 
                                take_hit(DAMAGE_FORCE, k, _("死の大鎌", "Death scythe"), -1);
-                               redraw_stuff();
+                               handle_stuff();
                        }
                        else
                        {
                                sound(SOUND_MISS);
-
                                msg_format(_("ミス! %sにかわされた。", "You miss %s."), m_name);
                        }
                }
index e3ca658..c36ae14 100644 (file)
@@ -679,20 +679,14 @@ bool process_the_world(int num, MONSTER_IDX who, bool vs_player)
        {
                if (!m_ptr->r_idx) break;
                process_monster(world_monster);
-
                reset_target(m_ptr);
-
-               if (p_ptr->notice) notice_stuff();
-               if (p_ptr->update) handle_stuff();
-               if (p_ptr->redraw) redraw_stuff();
-               if (p_ptr->window) window_stuff();
+               handle_stuff();
 
                if (vs_player) Term_xtra(TERM_XTRA_DELAY, 500);
        }
 
        p_ptr->redraw |= (PR_MAP);
        p_ptr->update |= (PU_MONSTERS);
-
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
        world_monster = 0;
@@ -703,7 +697,6 @@ bool process_the_world(int num, MONSTER_IDX who, bool vs_player)
        }
 
        handle_stuff();
-
        return (TRUE);
 }
 
index ef1958f..f3cf9ff 100644 (file)
@@ -5005,7 +5005,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        {
                p_ptr->health_who = c_ptr->m_idx;
                p_ptr->redraw |= (PR_HEALTH);
-               redraw_stuff();
+               handle_stuff();
        }
 
        /* Verify this code */
index 7c70cc5..9d7e9cc 100644 (file)
@@ -6175,6 +6175,7 @@ void window_stuff(void)
  */
 void handle_stuff(void)
 {
+       if (p_ptr->notice) notice_stuff();
        if (p_ptr->update) update_stuff();
        if (p_ptr->redraw) redraw_stuff();
        if (p_ptr->window) window_stuff();