OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Sat, 5 Jan 2019 02:44:30 +0000 (11:44 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 5 Jan 2019 02:44:30 +0000 (11:44 +0900)
src/floor-events.c
src/monster2.c
src/mspells1.c
src/mspells4.c
src/snipe.c
src/spells1.c
src/spells3.c

index 860e257..20e9237 100644 (file)
@@ -27,11 +27,8 @@ void day_break()
                }\r
        }\r
 \r
-       /* Update the monsters */\r
        p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);\r
-\r
        p_ptr->redraw |= (PR_MAP);\r
-\r
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);\r
 \r
        if (p_ptr->special_defense & NINJA_S_STEALTH)\r
@@ -81,11 +78,8 @@ void night_falls(void)
                }\r
        }\r
 \r
-       /* Update the monsters */\r
        p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);\r
-\r
        p_ptr->redraw |= (PR_MAP);\r
-\r
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);\r
 \r
        if (p_ptr->special_defense & NINJA_S_STEALTH)\r
index 07434cb..7b59e09 100644 (file)
@@ -4050,7 +4050,6 @@ void message_pain(MONSTER_IDX m_idx, HIT_POINT dam)
 
        GAME_TEXT m_name[MAX_NLEN];
 
-       /* Get the monster name */
        monster_desc(m_name, m_ptr, 0);
 
        if(dam == 0) // Notice non-damage
index 625dcf4..b914e2a 100644 (file)
@@ -1342,7 +1342,7 @@ bool make_attack_spell(MONSTER_IDX m_idx)
        SPELL_IDX thrown_spell = 0;
        DEPTH rlev;
        PERCENTAGE failrate;
-       byte            spell[96], num = 0;
+       byte spell[96], num = 0;
        BIT_FLAGS f4, f5, f6;
        monster_type *m_ptr = &m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
@@ -1354,7 +1354,6 @@ bool make_attack_spell(MONSTER_IDX m_idx)
        bool            do_spell = DO_SPELL_NONE;
        int             dam = 0;
 
-       /* Target location */
        POSITION x = p_ptr->x;
        POSITION y = p_ptr->y;
 
@@ -1508,7 +1507,6 @@ bool make_attack_spell(MONSTER_IDX m_idx)
 
        reset_target(m_ptr);
 
-       /* Extract the monster level */
        rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
 
        /* Forbid inate attacks sometimes */
index 0e29eea..5baf6ad 100644 (file)
@@ -2665,8 +2665,8 @@ MONSTER_NUMBER summon_LOUSE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 MONSTER_NUMBER summon_Kin(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 {
        int k, count = 0;
-       monster_type    *m_ptr = &m_list[m_idx];
-       monster_race    *r_ptr = &r_info[m_ptr->r_idx];
+       monster_type *m_ptr = &m_list[m_idx];
+       monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
        for (k = 0; k < 4; k++)
        {
index e2a93f2..f6762b7 100644 (file)
@@ -113,14 +113,8 @@ static bool snipe_concentrate(void)
        msg_format(_("集中した。(集中度 %d)", "You concentrate deeply. (lvl %d)"), p_ptr->concent);
        reset_concent = FALSE;
 
-       /* Recalculate bonuses */
-       p_ptr->update |= (PU_BONUS);
-
+       p_ptr->update |= (PU_BONUS | PU_MONSTERS);
        p_ptr->redraw |= (PR_STATUS);
-
-       /* Update the monsters */
-       p_ptr->update |= (PU_MONSTERS);
-
        return (TRUE);
 }
 
@@ -139,13 +133,8 @@ void reset_concentration(bool msg)
        p_ptr->concent = 0;
        reset_concent = FALSE;
 
-       /* Recalculate bonuses */
-       p_ptr->update |= (PU_BONUS);
-
+       p_ptr->update |= (PU_BONUS | PU_MONSTERS);
        p_ptr->redraw |= (PR_STATUS);
-
-       /* Update the monsters */
-       p_ptr->update |= (PU_MONSTERS);
 }
 
 /*! 
index 77a96bc..cf17c13 100644 (file)
@@ -4034,7 +4034,6 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                /* Special message */
                                                if (see_s_msg)
                                                {
-                                                       /* Get the monster name */
                                                        monster_desc(killer, caster_ptr, 0);
                                                        msg_format(_("%^sは気分が良さそうだ。", "%^s appears healthier."), killer);
                                                }
@@ -5191,12 +5190,8 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
 
        if (who > 0)
        {
-               /* Get the source monster */
                m_ptr = &m_list[who];
-               /* Extract the monster level */
                rlev = (((&r_info[m_ptr->r_idx])->level >= 1) ? (&r_info[m_ptr->r_idx])->level : 1);
-
-               /* Get the monster name */
                monster_desc(m_name, m_ptr, 0);
 
                /* Get the monster's real name (gotten before polymorph!) */
index 1c6c30f..4df7378 100644 (file)
@@ -1471,15 +1471,8 @@ static bool vanish_dungeon(void)
        }
 
        /* Mega-Hack -- Forget the view and lite */
-       p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
-
-       p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
-
-       /* Update the monsters */
-       p_ptr->update |= (PU_MONSTERS);
-
+       p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
        p_ptr->redraw |= (PR_MAP);
-
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
        return TRUE;