OSDN Git Service

[Refactor] #38997 do_cmd_redraw() に player_type * 引数を追加.
authordeskull <deskull@users.sourceforge.jp>
Wed, 31 Jul 2019 13:09:41 +0000 (22:09 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 31 Jul 2019 13:09:41 +0000 (22:09 +0900)
src/chuukei.c
src/cmd-dump.c
src/cmd-dump.h
src/core.c
src/monster-status.c
src/store.c
src/wizard2.c

index 45b6f70..8cf370d 100644 (file)
@@ -711,7 +711,7 @@ void prepare_movie_hooks(void)
 #else
                        prepare_chuukei_hooks();
 #endif
-                       do_cmd_redraw();
+                       do_cmd_redraw(p_ptr);
                }
        }
 }
index f0d3aaa..b85f703 100644 (file)
@@ -987,7 +987,7 @@ void do_cmd_nikki(void)
  * the "TERM_XTRA_REACT" hook before redrawing the windows.
  * </pre>
  */
-void do_cmd_redraw(void)
+void do_cmd_redraw(player_type *creature_ptr)
 {
        int j;
        term *old = Term;
@@ -997,23 +997,23 @@ void do_cmd_redraw(void)
        Term_xtra(TERM_XTRA_REACT, 0);
 
        /* Combine and Reorder the pack (later) */
-       p_ptr->update |= (PU_COMBINE | PU_REORDER);
-       p_ptr->update |= (PU_TORCH);
-       p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-       p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
-       p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
-       p_ptr->update |= (PU_MONSTERS);
+       creature_ptr->update |= (PU_COMBINE | PU_REORDER);
+       creature_ptr->update |= (PU_TORCH);
+       creature_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
+       creature_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
+       creature_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
+       creature_ptr->update |= (PU_MONSTERS);
 
-       p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY);
+       creature_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_MAP | PR_EQUIPPY);
 
-       p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
-       p_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
+       creature_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER);
+       creature_ptr->window |= (PW_MESSAGE | PW_OVERHEAD | PW_DUNGEON | PW_MONSTER | PW_OBJECT);
 
        update_playtime();
 
        handle_stuff();
 
-       if (p_ptr->prace == RACE_ANDROID) calc_android_exp(p_ptr);
+       if (creature_ptr->prace == RACE_ANDROID) calc_android_exp(creature_ptr);
 
 
        /* Redraw every window */
@@ -2616,7 +2616,7 @@ void do_cmd_visuals(void)
        }
        screen_load();
 
-       if (need_redraw) do_cmd_redraw();
+       if (need_redraw) do_cmd_redraw(p_ptr);
 }
 
 
@@ -4055,7 +4055,7 @@ void do_cmd_save_screen(void)
        if (html_dump)
        {
                do_cmd_save_screen_html();
-               do_cmd_redraw();
+               do_cmd_redraw(p_ptr);
        }
 
        /* Do we use a special screendump function ? */
@@ -7102,7 +7102,7 @@ void do_cmd_knowledge(void)
        }
        screen_load();
 
-       if (need_redraw) do_cmd_redraw();
+       if (need_redraw) do_cmd_redraw(p_ptr);
 }
 
 
index 72665fe..5e419d3 100644 (file)
@@ -50,7 +50,7 @@ extern concptr get_ordinal_number_suffix(int num);
 #endif
 extern errr exe_write_diary(player_type *creature_ptr, int type, int num, concptr note);
 extern void do_cmd_nikki(void);
-extern void do_cmd_redraw(void);
+extern void do_cmd_redraw(player_type *creature_ptr);
 extern void do_cmd_player_status(player_type *creature_ptr);
 extern void do_cmd_message_one(void);
 extern void do_cmd_messages(int num_now);
index 08997c7..0aaf1fe 100644 (file)
@@ -4118,7 +4118,7 @@ static void process_command(void)
                case '%':
                {
                        do_cmd_visuals();
-                       do_cmd_redraw();
+                       do_cmd_redraw(p_ptr);
                        break;
                }
 
@@ -4126,7 +4126,7 @@ static void process_command(void)
                case '&':
                {
                        do_cmd_colors();
-                       do_cmd_redraw();
+                       do_cmd_redraw(p_ptr);
                        break;
                }
 
@@ -4135,7 +4135,7 @@ static void process_command(void)
                {
                        do_cmd_options();
                        (void)combine_and_reorder_home(STORE_HOME);
-                       do_cmd_redraw();
+                       do_cmd_redraw(p_ptr);
                        break;
                }
 
@@ -4187,7 +4187,7 @@ static void process_command(void)
                case KTRL('R'):
                {
                        now_message = old_now_message;
-                       do_cmd_redraw();
+                       do_cmd_redraw(p_ptr);
                        break;
                }
 
index 1843929..01a678c 100644 (file)
@@ -825,7 +825,7 @@ bool set_monster_timewalk(int num, MONSTER_IDX who, bool vs_player)
        /* This monster cast spells */
        current_world_ptr->timewalk_m_idx = hack_m_idx;
 
-       if (vs_player) do_cmd_redraw();
+       if (vs_player) do_cmd_redraw(p_ptr);
 
        while (num--)
        {
index 4d4f589..9b1c5cc 100644 (file)
@@ -5404,7 +5404,7 @@ static void store_process_command(void)
 
                case KTRL('R'):
                {
-                       do_cmd_redraw();
+                       do_cmd_redraw(p_ptr);
                        display_store();
                        break;
                }
@@ -5602,7 +5602,7 @@ static void store_process_command(void)
                {
                        do_cmd_options();
                        (void)combine_and_reorder_home(STORE_HOME);
-                       do_cmd_redraw();
+                       do_cmd_redraw(p_ptr);
                        display_store();
                        break;
                }
index 4cf655e..bf2482a 100644 (file)
@@ -401,7 +401,7 @@ static void do_cmd_wiz_change(void)
 {
        /* Interact */
        do_cmd_wiz_change_aux();
-       do_cmd_redraw();
+       do_cmd_redraw(p_ptr);
 }