From 5d3702f1deabfd7bcb32b23bcca4e8870ecc549f Mon Sep 17 00:00:00 2001 From: Deskull Date: Sun, 16 Dec 2018 11:14:07 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20notice=5Fstuff()=20?= =?utf8?q?=E3=81=AE=E7=9B=B4=E6=8E=A5=E5=91=BC=E5=87=BA=E3=81=97=E3=82=92?= =?utf8?q?=E6=8A=91=E6=AD=A2=E3=80=82=20/=20Forbid=20call=20of=20notice=5F?= =?utf8?q?stuff()=20except=20handle=5Fstuff().?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/bldg.c | 1 - src/dungeon.c | 34 +--------------------------------- src/store.c | 1 - 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/bldg.c b/src/bldg.c index 227f75199..772801606 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -4493,7 +4493,6 @@ void do_cmd_bldg(void) if(validcmd) bldg_process_command(bldg, i); - notice_stuff(); handle_stuff(); } diff --git a/src/dungeon.c b/src/dungeon.c index 2fcb27ede..2f77d8b36 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -4571,7 +4571,7 @@ static void pack_overflow(void) object_type *o_ptr; /* Is auto-destroy done? */ - notice_stuff(); + handle_stuff(); if (!inventory[INVEN_PACK].k_idx) return; /* Access the slot to be dropped */ @@ -4594,10 +4594,6 @@ static void pack_overflow(void) inven_item_describe(INVEN_PACK); inven_item_optimize(INVEN_PACK); - /* Handle "p_ptr->notice" */ - notice_stuff(); - - /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ handle_stuff(); } } @@ -4889,10 +4885,6 @@ static void process_player(void) p_ptr->counter = FALSE; now_damaged = FALSE; - /* Handle "p_ptr->notice" */ - notice_stuff(); - - /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ handle_stuff(); /* Place the cursor on the player */ @@ -5291,14 +5283,7 @@ static void dungeon(bool load_game) character_xtra = FALSE; p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS); - - /* Combine / Reorder the pack */ p_ptr->notice |= (PN_COMBINE | PN_REORDER); - - /* Handle "p_ptr->notice" */ - notice_stuff(); - - /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ handle_stuff(); /* Refresh */ @@ -5386,15 +5371,10 @@ static void dungeon(bool load_game) /* Hack -- Compress the object list occasionally */ if (o_cnt + 32 < o_max) compact_objects(0); - /* Process the player */ process_player(); - process_upkeep_with_speed(); - /* Handle "p_ptr->notice" */ - notice_stuff(); - /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ handle_stuff(); @@ -5410,10 +5390,6 @@ static void dungeon(bool load_game) /* Process all of the monsters */ process_monsters(); - /* Handle "p_ptr->notice" */ - notice_stuff(); - - /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ handle_stuff(); /* Hack -- Hilite the player */ @@ -5425,14 +5401,9 @@ static void dungeon(bool load_game) /* Hack -- Notice death or departure */ if (!p_ptr->playing || p_ptr->is_dead) break; - /* Process the world */ process_world(); - /* Handle "p_ptr->notice" */ - notice_stuff(); - - /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ handle_stuff(); /* Hack -- Hilite the player */ @@ -6073,13 +6044,10 @@ void play_game(bool new_game) /* Process the level */ dungeon(load_game); - /* Handle "p_ptr->notice" */ - notice_stuff(); /* Hack -- prevent "icky" message */ character_xtra = TRUE; - /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */ handle_stuff(); character_xtra = FALSE; diff --git a/src/store.c b/src/store.c index 13d17aa1b..f99a6d0b5 100644 --- a/src/store.c +++ b/src/store.c @@ -4948,7 +4948,6 @@ void do_cmd_store(void) /* Hack -- Character is still in "icky" mode */ character_icky = TRUE; - notice_stuff(); handle_stuff(); /* Pack Overflow */ -- 2.11.0