• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

変愚蛮怒のメインリポジトリです


コミットメタ情報

リビジョン9625dd05676cd56a91b715b73288f4139cd8a6bc (tree)
日時2017-07-14 23:58:13
作者Deskull <desull@user...>
コミッターDeskull

ログメッセージ

#37287 (2.2.0.31) do-spell.c内のC4457警告に対応。 / Deal C4457 warning in do-spell.c.

変更サマリ

差分

--- a/src/defines.h
+++ b/src/defines.h
@@ -53,7 +53,7 @@
5353 #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
5454 #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
5555 #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */
56-#define FAKE_VER_EXTRA 30 /*!< ゲームのバージョン番号定義(エクストラ番号) */
56+#define FAKE_VER_EXTRA 31 /*!< ゲームのバージョン番号定義(エクストラ番号) */
5757
5858
5959 /*!
--- a/src/do-spell.c
+++ b/src/do-spell.c
@@ -3173,14 +3173,14 @@ static cptr do_chaos_spell(int spell, int mode)
31733173 {
31743174 if (cast)
31753175 {
3176- u32b mode = 0L;
3176+ u32b flg = 0L;
31773177 bool pet = !one_in_(3);
31783178
3179- if (pet) mode |= PM_FORCE_PET;
3180- else mode |= PM_NO_PET;
3181- if (!(pet && (plev < 50))) mode |= PM_ALLOW_GROUP;
3179+ if (pet) flg |= PM_FORCE_PET;
3180+ else flg |= PM_NO_PET;
3181+ if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
31823182
3183- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_DEMON, mode))
3183+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_DEMON, flg))
31843184 {
31853185 msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
31863186 if (pet)
@@ -3865,17 +3865,17 @@ static cptr do_death_spell(int spell, int mode)
38653865 {
38663866 int type;
38673867 bool pet = one_in_(3);
3868- u32b mode = 0L;
3868+ u32b flg = 0L;
38693869
38703870 type = (plev > 47 ? SUMMON_HI_UNDEAD : SUMMON_UNDEAD);
38713871
38723872 if (!pet || (pet && (plev > 24) && one_in_(3)))
3873- mode |= PM_ALLOW_GROUP;
3873+ flg |= PM_ALLOW_GROUP;
38743874
3875- if (pet) mode |= PM_FORCE_PET;
3876- else mode |= (PM_ALLOW_UNIQUE | PM_NO_PET);
3875+ if (pet) flg |= PM_FORCE_PET;
3876+ else flg |= (PM_ALLOW_UNIQUE | PM_NO_PET);
38773877
3878- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, type, mode))
3878+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, type, flg))
38793879 {
38803880 msg_print(_("冷たい風があなたの周りに吹き始めた。それは腐敗臭を運んでいる...",
38813881 "Cold winds begin to blow around you, carrying with them the stench of decay..."));
@@ -6044,13 +6044,13 @@ static cptr do_daemon_spell(int spell, int mode)
60446044 if (cast)
60456045 {
60466046 bool pet = !one_in_(3);
6047- u32b mode = 0L;
6047+ u32b flg = 0L;
60486048
6049- if (pet) mode |= PM_FORCE_PET;
6050- else mode |= PM_NO_PET;
6051- if (!(pet && (plev < 50))) mode |= PM_ALLOW_GROUP;
6049+ if (pet) flg |= PM_FORCE_PET;
6050+ else flg |= PM_NO_PET;
6051+ if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
60526052
6053- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, plev*2/3+randint1(plev/2), SUMMON_DEMON, mode))
6053+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, plev*2/3+randint1(plev/2), SUMMON_DEMON, flg))
60546054 {
60556055 msg_print(_("硫黄の悪臭が充満した。", "The area fills with a stench of sulphur and brimstone."));
60566056
@@ -6784,13 +6784,13 @@ static cptr do_crusade_spell(int spell, int mode)
67846784 if (cast)
67856785 {
67866786 bool pet = !one_in_(3);
6787- u32b mode = 0L;
6787+ u32b flg = 0L;
67886788
6789- if (pet) mode |= PM_FORCE_PET;
6790- else mode |= PM_NO_PET;
6791- if (!(pet && (plev < 50))) mode |= PM_ALLOW_GROUP;
6789+ if (pet) flg |= PM_FORCE_PET;
6790+ else flg |= PM_NO_PET;
6791+ if (!(pet && (plev < 50))) flg |= PM_ALLOW_GROUP;
67926792
6793- if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, mode))
6793+ if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, (plev * 3) / 2, SUMMON_ANGEL, flg))
67946794 {
67956795 if (pet)
67966796 {
@@ -9005,7 +9005,7 @@ static cptr do_hex_spell(int spell, int mode)
90059005 }
90069006 else
90079007 {
9008- int power = 0;
9008+ int curse_rank = 0;
90099009 msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
90109010 o_ptr->curse_flags |= (TRC_CURSED);
90119011
@@ -9022,11 +9022,11 @@ static cptr do_hex_spell(int spell, int mode)
90229022 add_flag(o_ptr->art_flags, TR_VORPAL);
90239023 add_flag(o_ptr->art_flags, TR_VAMPIRIC);
90249024 msg_print(_("血だ!血だ!血だ!", "Blood, Blood, Blood!"));
9025- power = 2;
9025+ power = curse_rank;
90269026 }
90279027 }
90289028
9029- o_ptr->curse_flags |= get_curse(power, o_ptr);
9029+ o_ptr->curse_flags |= get_curse(curse_rank, o_ptr);
90309030 }
90319031
90329032 p_ptr->update |= (PU_BONUS);
@@ -9311,7 +9311,7 @@ static cptr do_hex_spell(int spell, int mode)
93119311 }
93129312 else
93139313 {
9314- int power = 0;
9314+ int curse_rank = 0;
93159315 msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
93169316 o_ptr->curse_flags |= (TRC_CURSED);
93179317
@@ -9329,11 +9329,11 @@ static cptr do_hex_spell(int spell, int mode)
93299329 add_flag(o_ptr->art_flags, TR_RES_DARK);
93309330 add_flag(o_ptr->art_flags, TR_RES_NETHER);
93319331 msg_print(_("血だ!血だ!血だ!", "Blood, Blood, Blood!"));
9332- power = 2;
9332+ curse_rank = 2;
93339333 }
93349334 }
93359335
9336- o_ptr->curse_flags |= get_curse(power, o_ptr);
9336+ o_ptr->curse_flags |= get_curse(curse_rank, o_ptr);
93379337 }
93389338
93399339 p_ptr->update |= (PU_BONUS);
旧リポジトリブラウザで表示