From: Deskull Date: Thu, 22 Nov 2018 12:24:09 +0000 (+0900) Subject: [Refactor] #37353 コメント整理 / Refactor comments. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7cd6cd26e90bcb190d173633a6407ef1de1fda39;p=hengband%2Fhengband.git [Refactor] #37353 コメント整理 / Refactor comments. --- diff --git a/src/floor-save.c b/src/floor-save.c index 290077d51..4e37a9b59 100644 --- a/src/floor-save.c +++ b/src/floor-save.c @@ -478,7 +478,7 @@ static void preserve_pet(void) msg_format(_("%sは消え去った!", "%^s disappears!"), m_name); } - /* Delete the monster */ + delete_monster_idx(i); } } diff --git a/src/monster-process.c b/src/monster-process.c index cd664e8cb..78d6097f1 100644 --- a/src/monster-process.c +++ b/src/monster-process.c @@ -298,7 +298,7 @@ void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note, I /* Generate treasure */ monster_death(m_idx, FALSE); - /* Delete the monster */ + delete_monster_idx(m_idx); /* Not afraid */ @@ -774,43 +774,20 @@ static bool get_fear_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp) */ -static sint d_off_y_0[] = -{ 0 }; - -static sint d_off_x_0[] = -{ 0 }; - - -static sint d_off_y_1[] = -{ -1, -1, -1, 0, 0, 1, 1, 1, 0 }; - -static sint d_off_x_1[] = -{ -1, 0, 1, -1, 1, -1, 0, 1, 0 }; - +static sint d_off_y_0[] = { 0 }; +static sint d_off_x_0[] = { 0 }; -static sint d_off_y_2[] = -{ -1, -1, -2, -2, -2, 0, 0, 1, 1, 2, 2, 2, 0 }; +static sint d_off_y_1[] = { -1, -1, -1, 0, 0, 1, 1, 1, 0 }; +static sint d_off_x_1[] = { -1, 0, 1, -1, 1, -1, 0, 1, 0 }; -static sint d_off_x_2[] = -{ -2, 2, -1, 0, 1, -2, 2, -2, 2, -1, 0, 1, 0 }; +static sint d_off_y_2[] = { -1, -1, -2, -2, -2, 0, 0, 1, 1, 2, 2, 2, 0 }; +static sint d_off_x_2[] = { -2, 2, -1, 0, 1, -2, 2, -2, 2, -1, 0, 1, 0 }; +static sint d_off_y_3[] = { -1, -1, -2, -2, -3, -3, -3, 0, 0, 1, 1, 2, 2, 3, 3, 3, 0 }; +static sint d_off_x_3[] = { -3, 3, -2, 2, -1, 0, 1, -3, 3, -3, 3, -2, 2, -1, 0, 1, 0 }; -static sint d_off_y_3[] = -{ -1, -1, -2, -2, -3, -3, -3, 0, 0, 1, 1, 2, 2, - 3, 3, 3, 0 }; - -static sint d_off_x_3[] = -{ -3, 3, -2, 2, -1, 0, 1, -3, 3, -3, 3, -2, 2, - -1, 0, 1, 0 }; - - -static sint d_off_y_4[] = -{ -1, -1, -2, -2, -3, -3, -3, -3, -4, -4, -4, 0, - 0, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 0 }; - -static sint d_off_x_4[] = -{ -4, 4, -3, 3, -2, -3, 2, 3, -1, 0, 1, -4, 4, - -4, 4, -3, 3, -2, -3, 2, 3, -1, 0, 1, 0 }; +static sint d_off_y_4[] = { -1, -1, -2, -2, -3, -3, -3, -3, -4, -4, -4, 0, 0, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 0 }; +static sint d_off_x_4[] = { -4, 4, -3, 3, -2, -3, 2, 3, -1, 0, 1, -4, 4, -4, 4, -3, 3, -2, -3, 2, 3, -1, 0, 1, 0 }; static sint d_off_y_5[] = @@ -1992,7 +1969,7 @@ static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx) if (see_m) { #ifdef JP - msg_format("%sは%^sの攻撃をかわした。", t_name,m_name); + msg_format("%sは%^sの攻撃をかわした。", t_name, m_name); #else msg_format("%^s misses %s.", m_name, t_name); #endif @@ -2190,7 +2167,7 @@ void process_monster(MONSTER_IDX m_idx) do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_LOSE_PARENT, m_name); } - /* Delete the monster */ + delete_monster_idx(m_idx); return; @@ -2223,7 +2200,7 @@ void process_monster(MONSTER_IDX m_idx) /* Generate treasure, etc */ monster_death(m_idx, FALSE); - /* Delete the monster */ + delete_monster_idx(m_idx); if (sad) diff --git a/src/monster2.c b/src/monster2.c index 496622a79..da24c7883 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -476,7 +476,7 @@ void compact_monsters(int size) do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_COMPACT, m_name); } - /* Delete the monster */ + delete_monster_idx(i); /* Count the monster */ diff --git a/src/spells1.c b/src/spells1.c index 3da57c3a2..be4b48c2f 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -4863,7 +4863,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P /* Generate treasure, etc */ monster_death(c_ptr->m_idx, FALSE); - /* Delete the monster */ + delete_monster_idx(c_ptr->m_idx); if (sad) diff --git a/src/spells2.c b/src/spells2.c index a4264ce5d..904d20112 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -1131,7 +1131,7 @@ bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, 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 */ + else { if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname) @@ -2077,7 +2077,7 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) } } - /* Delete the monster */ + delete_monster(yy, xx); /* No longer safe */ diff --git a/src/xtra2.c b/src/xtra2.c index ba279817b..990e9cc8c 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -1929,7 +1929,7 @@ msg_format("%sを葬り去った。", m_name); if (is_pet(m_ptr)) mode |= PM_FORCE_PET; - /* Delete the monster */ + delete_monster_idx(m_idx); if (summon_named_creature(0, dummy_y, dummy_x, MON_BIKETAL, mode)) @@ -1939,7 +1939,7 @@ msg_format("%sを葬り去った。", m_name); } else { - /* Delete the monster */ + delete_monster_idx(m_idx); }