OSDN Git Service

[Refactor] #37353 コメントとメッセージ整理 / Refactor comments and messages.
authorDeskull <deskull@users.sourceforge.jp>
Tue, 20 Nov 2018 14:44:26 +0000 (23:44 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Tue, 20 Nov 2018 14:44:26 +0000 (23:44 +0900)
src/cave.c
src/floor-generate.c
src/load.c
src/monster2.c
src/object2.c
src/save.c
src/spells1.c
src/spells2.c

index 46a4ca6..9432d40 100644 (file)
@@ -2002,7 +2002,6 @@ void display_map(int *cy, int *cx)
        {
                for (j = 0; j < cur_hgt; ++j)
                {
-                       /* Location */
                        x = i / xrat + 1;
                        y = j / yrat + 1;
 
@@ -2036,7 +2035,6 @@ void display_map(int *cy, int *cx)
        {
                for (i = 0; i < cur_wid; ++i)
                {
-                       /* Location */
                        x = i / xrat + 1;
                        y = j / yrat + 1;
 
index c60da9f..7efdd96 100644 (file)
@@ -306,7 +306,6 @@ static void alloc_object(int set, EFFECT_ID typ, int num)
 
                        dummy++;
 
-                       /* Location */
                        y = randint0(cur_hgt);
                        x = randint0(cur_wid);
 
index 460dc54..a765918 100644 (file)
@@ -347,7 +347,6 @@ static void rd_item_old(object_type *o_ptr)
        /* Kind */
        rd_s16b(&o_ptr->k_idx);
 
-       /* Location */
        rd_byte(&tmp8u);
        o_ptr->iy = (POSITION)tmp8u;
        rd_byte(&tmp8u);
@@ -628,7 +627,6 @@ static void rd_item(object_type *o_ptr)
        /* Kind */
        rd_s16b(&o_ptr->k_idx);
 
-       /* Location */
        rd_byte(&tmp8u);
        o_ptr->iy = (POSITION)tmp8u;
        rd_byte(&tmp8u);
index 1672953..b6ad372 100644 (file)
@@ -342,7 +342,6 @@ static void compact_monsters_aux(IDX i1, IDX i2)
        /* Old monster */
        m_ptr = &m_list[i1];
 
-       /* Location */
        y = m_ptr->fy;
        x = m_ptr->fx;
 
index 321e1d2..93acb50 100644 (file)
@@ -200,7 +200,6 @@ void delete_object_idx(OBJECT_IDX o_idx)
        {
                POSITION y, x;
 
-               /* Location */
                y = j_ptr->iy;
                x = j_ptr->ix;
 
@@ -4956,7 +4955,6 @@ void place_object(POSITION y, POSITION x, BIT_FLAGS mode)
                /* Structure Copy */
                object_copy(o_ptr, q_ptr);
 
-               /* Location */
                o_ptr->iy = y;
                o_ptr->ix = x;
 
@@ -5187,7 +5185,6 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
                        /* Ignore distant grids */
                        if (d > 10) continue;
 
-                       /* Location */
                        ty = y + dy;
                        tx = x + dx;
 
index 7db8b36..ad03dde 100644 (file)
@@ -164,7 +164,6 @@ static void wr_item(object_type *o_ptr)
        /*** Write only un-obvious elements ***/
        wr_s16b(o_ptr->k_idx);
 
-       /* Location */
        wr_byte((byte_hack)o_ptr->iy);
        wr_byte((byte_hack)o_ptr->ix);
 
index a454767..8d917e6 100644 (file)
@@ -7688,7 +7688,6 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                /* Player affected one monster (without "jumping") */
                if (!who && (project_m_n == 1) && !jump)
                {
-                       /* Location */
                        x = project_m_x;
                        y = project_m_y;
 
index d31dff9..cd4dde9 100644 (file)
@@ -196,7 +196,6 @@ bool detect_objects_gold(POSITION range)
                /* Skip held objects */
                if (o_ptr->held_m_idx) continue;
 
-               /* Location */
                y = o_ptr->iy;
                x = o_ptr->ix;
 
@@ -260,7 +259,6 @@ bool detect_objects_normal(POSITION range)
                /* Skip held objects */
                if (o_ptr->held_m_idx) continue;
 
-               /* Location */
                y = o_ptr->iy;
                x = o_ptr->ix;
 
@@ -331,7 +329,6 @@ bool detect_objects_magic(POSITION range)
                /* Skip held objects */
                if (o_ptr->held_m_idx) continue;
 
-               /* Location */
                y = o_ptr->iy;
                x = o_ptr->ix;
 
@@ -412,7 +409,6 @@ bool detect_monsters_normal(POSITION range)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -472,7 +468,6 @@ bool detect_monsters_invis(POSITION range)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -538,7 +533,6 @@ bool detect_monsters_evil(POSITION range)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -608,7 +602,6 @@ bool detect_monsters_nonliving(POSITION range)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -672,7 +665,6 @@ bool detect_monsters_mind(POSITION range)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -738,7 +730,6 @@ bool detect_monsters_string(POSITION range, cptr Match)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -806,7 +797,6 @@ bool detect_monsters_xxx(POSITION range, u32b match_flag)
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -908,9 +898,10 @@ bool detect_all(POSITION range)
  */
 bool project_hack(EFFECT_ID typ, HIT_POINT dam)
 {
-       int     i, x, y;
-       int     flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
-       bool    obvious = FALSE;
+       MONSTER_IDX i;
+       POSITION x, y;
+       BIT_FLAGS flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
+       bool obvious = FALSE;
 
 
        /* Mark all (nearby) monsters */
@@ -921,7 +912,6 @@ bool project_hack(EFFECT_ID typ, HIT_POINT dam)
                /* Paranoia -- Skip dead monsters */
                if (!m_ptr->r_idx) continue;
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -943,7 +933,6 @@ bool project_hack(EFFECT_ID typ, HIT_POINT dam)
                /* Remove mark */
                m_ptr->mflag &= ~(MFLAG_TEMP);
 
-               /* Location */
                y = m_ptr->fy;
                x = m_ptr->fx;
 
@@ -1081,7 +1070,6 @@ void aggravate_monsters(MONSTER_IDX who)
        bool    sleep = FALSE;
        bool    speed = FALSE;
 
-
        /* Aggravate everyone nearby */
        for (i = 1; i < m_max; i++)
        {
@@ -1117,14 +1105,8 @@ void aggravate_monsters(MONSTER_IDX who)
                }
        }
 
-       /* Messages */
-#ifdef JP
-       if (speed) msg_print("付近で何かが突如興奮したような感じを受けた!");
-       else if (sleep) msg_print("何かが突如興奮したような騒々しい音が遠くに聞こえた!");
-#else
-       if (speed) msg_print("You feel a sudden stirring nearby!");
-       else if (sleep) msg_print("You hear a sudden stirring in the distance!");
-#endif
+       if (speed) msg_print(_("付近で何かが突如興奮したような感じを受けた!", "You feel a sudden stirring nearby!"));
+       else if (sleep) msg_print(_("何かが突如興奮したような騒々しい音が遠くに聞こえた!", "You hear a sudden stirring in the distance!"));
        if (p_ptr->riding) p_ptr->update |= PU_BONUS;
 }
 
@@ -1149,15 +1131,10 @@ bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side,
 
        /* Hack -- Skip Unique Monsters or Quest Monsters */
        if (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) resist = TRUE;
-
        else if (r_ptr->flags7 & RF7_UNIQUE2) resist = TRUE;
-
        else if (m_idx == p_ptr->riding) resist = TRUE;
-
        else if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
-
        else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
-
        else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
 
        /* Delete the monster */