OSDN Git Service

[Refactor] #37353 notice_stuff() の直接呼出しを抑止。 / Forbid call of notice_stuff() except...
[hengband/hengband.git] / src / bldg.c
index e3c5c8d..7728016 100644 (file)
@@ -302,19 +302,15 @@ 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;
                case BACT_ARENA_RULES:
-
-                       /* Save screen */
                        screen_save();
 
                        /* Peruse the arena help file */
                        (void)show_file(TRUE, _("arena_j.txt", "arena.txt"), NULL, 0, 0);
-
-                       /* Load screen */
                        screen_load();
 
                        break;
@@ -979,95 +975,6 @@ static int do_poker(void)
                cards[i] = deck[deck_ptr++];
                kaeruka[i] = 0; /* default:nokosu */
        }
-       
-#if 0
-       /* debug:RF */
-       cards[0] = 12;
-       cards[1] = 0;
-       cards[2] = 9;
-       cards[3] = 11;
-       cards[4] = 10;
-#endif
-#if 0
-       /* debug:SF */
-       cards[0] = 3;
-       cards[1] = 2;
-       cards[2] = 4;
-       cards[3] = 6;
-       cards[4] = 5;
-#endif
-#if 0
-       /* debug:Four Cards */
-       cards[0] = 0;
-       cards[1] = 0 + 13 * 1;
-       cards[2] = 0 + 13 * 2;
-       cards[3] = 0 + 13 * 3;
-       cards[4] = 51;
-#endif
-#if 0
-       /* debug:Straight1 */
-       cards[0] = 1;
-       cards[1] = 0 + 13;
-       cards[2] = 3;
-       cards[3] = 2 + 26;
-       cards[4] = 4;
-#endif
-#if 0
-       /* debug:Straight2 */
-       cards[0] = 12;
-       cards[1] = 0;
-       cards[2] = 9;
-       cards[3] = 11 + 13 * 2;
-       cards[4] = 10;
-#endif
-#if 0
-       /* debug:Straight3 */
-       cards[0] = 52;
-       cards[1] = 0;
-       cards[2] = 9;
-       cards[3] = 11 + 13 * 2;
-       cards[4] = 10;
-#endif
-#if 0
-       /* debug:Straight4 */
-       cards[0] = 12;
-       cards[1] = 52;
-       cards[2] = 9;
-       cards[3] = 11 + 13 * 2;
-       cards[4] = 10;
-#endif
-#if 0
-       /* debug:Straight5 */
-       cards[0] = 4;
-       cards[1] = 5 + 13;
-       cards[2] = 6;
-       cards[3] = 7 + 26;
-       cards[4] = 3;
-#endif
-#if 0
-       /* debug:Five Card1 */
-       cards[0] = 4;
-       cards[1] = 52;
-       cards[2] = 4 + 13;
-       cards[3] = 4 + 26;
-       cards[4] = 4 + 39;
-#endif
-#if 0
-       /* debug:Five Card2 */
-       cards[1] = 52;
-       cards[0] = 4;
-       cards[2] = 4 + 13;
-       cards[3] = 4 + 26;
-       cards[4] = 4 + 39;
-#endif
-#if 0
-       /* debug */
-       cards[0] = 52;
-       cards[1] = 0;
-       cards[2] = 1;
-       cards[3] = 2;
-       cards[4] = 3;
-#endif
 
        /* suteruno wo kimeru */
        prt(_("残すカードを決めて下さい(方向で移動, スペースで選択)。", "Stay witch? "), 0, 0);
@@ -1999,14 +1906,11 @@ static bool kankin(void)
                                 */
                                item_new = inven_carry(&forge);
 
-                               /* Describe the object */
                                object_desc(o_name, &forge, 0);
                                msg_format(_("%s(%c)を貰った。", "You get %s (%c). "), o_name, index_to_label(item_new));
 
                                /* Auto-inscription */
                                autopick_alter_item(item_new, FALSE);
-
-                               /* Handle stuff */
                                handle_stuff();
 
                                change = TRUE;
@@ -2307,13 +2211,10 @@ static void castle_quest(void)
  */
 static void town_history(void)
 {
-       /* Save screen */
        screen_save();
 
        /* Peruse the building help file */
        (void)show_file(TRUE, _("jbldg.txt", "bldg.txt"), NULL, 0, 0);
-
-       /* Load screen */
        screen_load();
 }
 
@@ -2886,8 +2787,8 @@ static PRICE compare_weapons(PRICE bcost)
                        /* Copy i-th weapon into the weapon slot (if it's not already there) */
                        if (o_ptr[i] != i_ptr) object_copy(i_ptr, o_ptr[i]);
 
-                       /* Get the new values */
-                       calc_bonuses();
+                       p_ptr->update |= PU_BONUS;
+                       handle_stuff();
 
                        /* List the new values */
                        list_weapon(o_ptr[i], row, col);
@@ -2898,7 +2799,8 @@ static PRICE compare_weapons(PRICE bcost)
                }
 
                /* Reset the values for the old weapon */
-               calc_bonuses();
+               p_ptr->update |= PU_BONUS;
+               handle_stuff();
 
                character_xtra = old_character_xtra;
 
@@ -3459,11 +3361,8 @@ static bool enchant_item(PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_C
        /* Failure */
        if (!okay)
        {
-               /* Flush */
                if (flush_failure) flush();
-
                msg_print(_("改良に失敗した。", "The improvement failed."));
-
                return (FALSE);
        }
        else
@@ -4139,8 +4038,6 @@ static bool research_mon(void)
 
                                /* Save this monster ID */
                                monster_race_track(r_idx);
-
-                               /* Hack -- Handle stuff */
                                handle_stuff();
 
                                /* know every thing mode */
@@ -4594,13 +4491,8 @@ void do_cmd_bldg(void)
                        }
                }
 
-               if (validcmd)
-                       bldg_process_command(bldg, i);
-
-               /* Notice stuff */
-               notice_stuff();
+               if(validcmd) bldg_process_command(bldg, i);
 
-               /* Handle stuff */
                handle_stuff();
        }