OSDN Git Service

[Refactor] #37353 window_stuff() の直接呼出しを抑止。 / Forbid call of window_stuff() except...
authorDeskull <deskull@users.sourceforge.jp>
Sun, 16 Dec 2018 02:05:38 +0000 (11:05 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 16 Dec 2018 02:05:38 +0000 (11:05 +0900)
14 files changed:
src/bldg.c
src/cmd-item.c
src/cmd-pet.c
src/cmd5.c
src/dungeon.c
src/hissatsu.c
src/main-win.c
src/mane.c
src/mind.c
src/mspells3.c
src/object1.c
src/snipe.c
src/spells2.c
src/util.c

index 3f46d15..227f751 100644 (file)
@@ -302,7 +302,7 @@ static void arena_comm(int cmd)
 
                                p_ptr->monster_race_idx = arena_info[p_ptr->arena_number].r_idx;
                                p_ptr->window |= (PW_MONSTER);
-                               window_stuff();
+                               handle_stuff();
 
                        }
                        break;
index da56f8b..16a6569 100644 (file)
@@ -811,7 +811,7 @@ void do_cmd_destroy(void)
                /* HACK : Add the line to message buffer */
                message_add(out_val);
                p_ptr->window |= (PW_MESSAGE);
-               window_stuff();
+               handle_stuff();
 
                /* Get an acceptable answer */
                while (TRUE)
@@ -1415,10 +1415,8 @@ void do_cmd_target(void)
  */
 void do_cmd_look(void)
 {
-       /*TEST*/
        p_ptr->window |= PW_MONSTER_LIST;
-       window_stuff();
-       /*TEST*/
+       handle_stuff();
 
        /* Look around */
        if (target_set(TARGET_LOOK))
index c9f2dcf..729ad17 100644 (file)
@@ -271,7 +271,7 @@ void do_cmd_pet_dismiss(void)
                        /* HACK : Add the line to message buffer */
                        msg_format(_("%s を放した。", "Dismissed %s."), friend_name);
                        p_ptr->window |= (PW_MESSAGE);
-                       window_stuff();
+                       handle_stuff();
 
                        delete_monster_idx(pet_ctr);
                        Dismissed++;
index 68e016c..a67677f 100644 (file)
@@ -125,10 +125,8 @@ static int get_spell(SPELL_IDX *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool
        /* No redraw yet */
        redraw = FALSE;
 
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       window_stuff();
+       handle_stuff();
 
        /* Build a prompt (accept all spells) */
 #ifdef JP
@@ -308,12 +306,8 @@ static int get_spell(SPELL_IDX *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool
        /* Restore the screen */
        if (redraw) screen_load();
 
-
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       window_stuff();
-
+       handle_stuff();
 
        /* Abort if needed */
        if (!flag) return FALSE;
index 3b75e10..2fcb27e 100644 (file)
@@ -6034,11 +6034,8 @@ void play_game(bool new_game)
        Term_xtra(TERM_XTRA_REACT, 0);
 
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
-
        p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
-
-       window_stuff();
-
+       handle_stuff();
 
        /* Set or clear "rogue_like_commands" if requested */
        if (arg_force_original) rogue_like_commands = FALSE;
index 0ec466b..b9f4a59 100644 (file)
@@ -293,11 +293,8 @@ static int get_hissatsu_power(SPELL_IDX *sn)
        /* Restore the screen */
        if (redraw) screen_load();
 
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       window_stuff();
-
+       handle_stuff();
 
        /* Abort if needed */
        if (!flag) return (FALSE);
index 099722b..3f2d30b 100644 (file)
@@ -5108,7 +5108,7 @@ LRESULT FAR PASCAL AngbandListProc(HWND hWnd, UINT uMsg,
 \r
                                /* HACK - Redraw all windows */\r
                                p_ptr->window = 0xFFFFFFFF;\r
-                               window_stuff();\r
+                               handle_stuff();\r
                        }\r
 \r
                        td->size_hack = FALSE;\r
index d4d5e57..5974546 100644 (file)
@@ -242,10 +242,8 @@ static int get_mane_power(int *sn, bool baigaesi)
        /* Restore the screen */
        if (redraw) screen_load();
 
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       window_stuff();
+       handle_stuff();
 
        /* Abort if needed */
        if (!flag) return (FALSE);
index 37580dd..b331ecd 100644 (file)
@@ -1000,10 +1000,8 @@ static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
        /* Restore the screen */
        if (redraw && !only_browse) screen_load();
 
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       window_stuff();
+       handle_stuff();
 
        /* Abort if needed */
        if (!flag) return (FALSE);
index b5a39ad..ead271f 100644 (file)
@@ -571,10 +571,8 @@ static int get_learned_power(SPELL_IDX *sn)
        /* Restore the screen */
        if (redraw) screen_load();
 
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       window_stuff();
+       handle_stuff();
 
        /* Abort if needed */
        if (!flag) return (FALSE);
index a472034..2a04f6b 100644 (file)
@@ -2974,8 +2974,7 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                }
 
                /* Toggle if needed */
-               if ((command_wrk && ni && !ne) ||
-                   (!command_wrk && !ni && ne))
+               if ((command_wrk && ni && !ne) || (!command_wrk && !ni && ne))
                {
                        /* Toggle */
                        toggle_inven_equip();
@@ -2984,12 +2983,8 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        toggle = !toggle;
                }
 
-               /* Update */
                p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-               /* Redraw windows */
-               window_stuff();
-
+               handle_stuff();
 
                /* Inventory screen */
                if (!command_wrk)
@@ -3480,11 +3475,8 @@ bool get_item(OBJECT_IDX *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Toggle again if needed */
        if (toggle) toggle_inven_equip();
 
-       /* Update */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-       window_stuff();
-
+       handle_stuff();
 
        /* Clear the prompt line */
        prt("", 0, 0);
@@ -3992,11 +3984,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
                        toggle = !toggle;
                }
 
-               /* Update */
                p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-               /* Redraw windows */
-               window_stuff();
+               handle_stuff();
 
                /* Inventory screen */
                if (command_wrk == (USE_INVEN))
@@ -4822,11 +4811,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, BIT_FLAGS mode)
        /* Toggle again if needed */
        if (toggle) toggle_inven_equip();
 
-       /* Update */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-       window_stuff();
-
+       handle_stuff();
 
        /* Clear the prompt line */
        prt("", 0, 0);
index 2c263eb..fea4232 100644 (file)
@@ -387,10 +387,8 @@ static int get_snipe_power(COMMAND_CODE *sn, bool only_browse)
        /* Restore the screen */
        if (redraw && !only_browse) screen_load();
 
-       /* Show choices */
        p_ptr->window |= (PW_SPELL);
-
-       window_stuff();
+       handle_stuff();
 
        /* Abort if needed */
        if (!flag) return (FALSE);
index 35e95ec..74cb059 100644 (file)
@@ -1316,8 +1316,9 @@ bool probing(void)
 
                        /* HACK : Add the line to message buffer */
                        message_add(buf);
+
                        p_ptr->window |= (PW_MESSAGE);
-                       window_stuff();
+                       handle_stuff();
 
                        if (m_ptr->ml) move_cursor_relative(m_ptr->fy, m_ptr->fx);
                        inkey();
index 7ba96f0..0ae9d37 100644 (file)
@@ -2904,7 +2904,7 @@ void msg_print(cptr msg)
        /* if (character_generated) message_add(t); */
 
        p_ptr->window |= (PW_MESSAGE);
-       window_stuff();
+       handle_stuff();
 
        /* Remember the message */
        msg_flag = TRUE;
@@ -3609,7 +3609,7 @@ bool get_check_strict(cptr prompt, BIT_FLAGS mode)
        if (auto_more)
        {
                p_ptr->window |= PW_MESSAGE;
-               window_stuff();
+               handle_stuff();
                num_more = 0;
        }
 
@@ -3645,7 +3645,7 @@ bool get_check_strict(cptr prompt, BIT_FLAGS mode)
                /* HACK : Add the line to message buffer */
                message_add(buf);
                p_ptr->window |= (PW_MESSAGE);
-               window_stuff();
+               handle_stuff();
        }
 
        /* Get an acceptable answer */