• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

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


コミットメタ情報

リビジョン7002e1075f0fb53bcd029dc14a9a2a045f9bee1a (tree)
日時2018-12-08 01:29:25
作者Deskull <deskull@user...>
コミッターDeskull

ログメッセージ

[Refactor] #37353 メッセージとコメントの整理と型の置換 / Refactor messages and comments and type replacement.

変更サマリ

差分

--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -701,9 +701,9 @@ static bool pattern_effect(void)
701701 */
702702 static void regenhp(int percent)
703703 {
704- s32b new_chp;
704+ HIT_POINT new_chp;
705705 u32b new_chp_frac;
706- s32b old_chp;
706+ HIT_POINT old_chp;
707707
708708 if (p_ptr->special_defense & KATA_KOUKIJIN) return;
709709 if (p_ptr->action == ACTION_HAYAGAKE) return;
@@ -749,9 +749,9 @@ static void regenhp(int percent)
749749 * @param regen_amount 回復量
750750 * @return なし
751751 */
752-static void regenmana(int upkeep_factor, int regen_amount)
752+static void regenmana(MANA_POINT upkeep_factor, MANA_POINT regen_amount)
753753 {
754- s32b old_csp = p_ptr->csp;
754+ MANA_POINT old_csp = p_ptr->csp;
755755 s32b regen_rate = regen_amount * 100 - upkeep_factor * PY_REGEN_NORMAL;
756756
757757 /*
@@ -782,7 +782,7 @@ static void regenmana(int upkeep_factor, int regen_amount)
782782 else if (regen_rate > 0)
783783 {
784784 /* (percent/100) is the Regen factor in unit (1/2^16) */
785- s32b new_mana = 0;
785+ MANA_POINT new_mana = 0;
786786 u32b new_mana_frac = (p_ptr->msp * regen_rate / 100 + PY_REGEN_MNBASE);
787787
788788 /* Convert the unit (1/2^16) to (1/2^32) */
@@ -821,8 +821,6 @@ static void regenmana(int upkeep_factor, int regen_amount)
821821 }
822822 }
823823
824-
825- /* Redraw mana */
826824 if (old_csp != p_ptr->csp)
827825 {
828826 p_ptr->redraw |= (PR_MANA);
@@ -839,7 +837,7 @@ static void regenmana(int upkeep_factor, int regen_amount)
839837 */
840838 static void regenmagic(int regen_amount)
841839 {
842- s32b new_mana;
840+ MANA_POINT new_mana;
843841 int i;
844842 int dev = 30;
845843 int mult = (dev + adj_mag_mana[p_ptr->stat_ind[A_INT]]); /* x1 to x2 speed bonus for recharging */
@@ -972,7 +970,6 @@ static void regen_captured_monsters(void)
972970 {
973971 /* Combine pack */
974972 p_ptr->notice |= (PN_COMBINE);
975-
976973 p_ptr->window |= (PW_INVEN);
977974 p_ptr->window |= (PW_EQUIP);
978975 wild_regen = 20;
@@ -1162,7 +1159,7 @@ static void check_music(void)
11621159 {
11631160 const magic_type *s_ptr;
11641161 int spell;
1165- s32b need_mana;
1162+ MANA_POINT need_mana;
11661163 u32b need_mana_frac;
11671164
11681165 /* Music singed by player */
@@ -1518,7 +1515,7 @@ static void process_world_aux_hp_and_sp(void)
15181515
15191516 if (p_ptr->riding)
15201517 {
1521- int damage;
1518+ HIT_POINT damage;
15221519 if ((r_info[m_list[p_ptr->riding].r_idx].flags2 & RF2_AURA_FIRE) && !p_ptr->immune_fire)
15231520 {
15241521 damage = r_info[m_list[p_ptr->riding].r_idx].level / 2;
@@ -2553,7 +2550,7 @@ static void process_world_aux_curse(void)
25532550 /* Add light curse (Later) */
25542551 if ((p_ptr->cursed & TRC_ADD_L_CURSE) && one_in_(2000))
25552552 {
2556- u32b new_curse;
2553+ BIT_FLAGS new_curse;
25572554 object_type *o_ptr;
25582555
25592556 o_ptr = choose_cursed_obj_name(TRC_ADD_L_CURSE);
@@ -2576,7 +2573,7 @@ static void process_world_aux_curse(void)
25762573 /* Add heavy curse (Later) */
25772574 if ((p_ptr->cursed & TRC_ADD_H_CURSE) && one_in_(2000))
25782575 {
2579- u32b new_curse;
2576+ BIT_FLAGS new_curse;
25802577 object_type *o_ptr;
25812578
25822579 o_ptr = choose_cursed_obj_name(TRC_ADD_H_CURSE);
@@ -2696,19 +2693,11 @@ static void process_world_aux_curse(void)
26962693
26972694 if (o_ptr->name1 == ART_JUDGE)
26982695 {
2699-#ifdef JP
27002696 if (object_is_known(o_ptr))
2701- msg_print("『審判の宝石』はあなたの体力を吸収した!");
2697+ msg_print(_("『審判の宝石』はあなたの体力を吸収した!", "The Jewel of Judgement drains life from you!"));
27022698 else
2703- msg_print("なにかがあなたの体力を吸収した!");
2704- take_hit(DAMAGE_LOSELIFE, MIN(p_ptr->lev, 50), "審判の宝石", -1);
2705-#else
2706- if (object_is_known(o_ptr))
2707- msg_print("The Jewel of Judgement drains life from you!");
2708- else
2709- msg_print("Something drains life from you!");
2710- take_hit(DAMAGE_LOSELIFE, MIN(p_ptr->lev, 50), "the Jewel of Judgement", -1);
2711-#endif
2699+ msg_print(_("なにかがあなたの体力を吸収した!", "Something drains life from you!"));
2700+ take_hit(DAMAGE_LOSELIFE, MIN(p_ptr->lev, 50), _("審判の宝石", "the Jewel of Judgement"), -1);
27122701 }
27132702 }
27142703 }
@@ -2857,8 +2846,7 @@ static void process_world_aux_movement(void)
28572846 /* Determine the level */
28582847 if (dun_level || p_ptr->inside_quest || p_ptr->enter_dungeon)
28592848 {
2860- msg_print(_("上に引っ張りあげられる感じがする!",
2861- "You feel yourself yanked upwards!"));
2849+ msg_print(_("上に引っ張りあげられる感じがする!", "You feel yourself yanked upwards!"));
28622850
28632851 if (dungeon_type) p_ptr->recall_dungeon = dungeon_type;
28642852 if (record_stair)
@@ -2876,8 +2864,7 @@ static void process_world_aux_movement(void)
28762864 }
28772865 else
28782866 {
2879- msg_print(_("下に引きずり降ろされる感じがする!",
2880- "You feel yourself yanked downwards!"));
2867+ msg_print(_("下に引きずり降ろされる感じがする!", "You feel yourself yanked downwards!"));
28812868
28822869 dungeon_type = p_ptr->recall_dungeon;
28832870
@@ -3006,8 +2993,8 @@ static void process_world_aux_movement(void)
30062993 static int get_monster_crowd_number(MONSTER_IDX m_idx)
30072994 {
30082995 monster_type *m_ptr = &m_list[m_idx];
3009- int my = m_ptr->fy;
3010- int mx = m_ptr->fx;
2996+ POSITION my = m_ptr->fy;
2997+ POSITION mx = m_ptr->fx;
30112998 int i;
30122999 int count = 0;
30133000
@@ -3126,7 +3113,7 @@ static byte get_dungeon_feeling(void)
31263113 /* Artifacts */
31273114 if (object_is_artifact(o_ptr))
31283115 {
3129- s32b cost = object_value_real(o_ptr);
3116+ PRICE cost = object_value_real(o_ptr);
31303117
31313118 delta += 10 * base;
31323119 if (cost > 10000L) delta += 10 * base;
@@ -3138,27 +3125,16 @@ static byte get_dungeon_feeling(void)
31383125 }
31393126
31403127 if (o_ptr->tval == TV_DRAG_ARMOR) delta += 30 * base;
3141- if (o_ptr->tval == TV_SHIELD &&
3142- o_ptr->sval == SV_DRAGON_SHIELD) delta += 5 * base;
3143- if (o_ptr->tval == TV_GLOVES &&
3144- o_ptr->sval == SV_SET_OF_DRAGON_GLOVES) delta += 5 * base;
3145- if (o_ptr->tval == TV_BOOTS &&
3146- o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE) delta += 5 * base;
3147- if (o_ptr->tval == TV_HELM &&
3148- o_ptr->sval == SV_DRAGON_HELM) delta += 5 * base;
3149- if (o_ptr->tval == TV_RING &&
3150- o_ptr->sval == SV_RING_SPEED &&
3151- !object_is_cursed(o_ptr)) delta += 25 * base;
3152- if (o_ptr->tval == TV_RING &&
3153- o_ptr->sval == SV_RING_LORDLY &&
3154- !object_is_cursed(o_ptr)) delta += 15 * base;
3155- if (o_ptr->tval == TV_AMULET &&
3156- o_ptr->sval == SV_AMULET_THE_MAGI &&
3157- !object_is_cursed(o_ptr)) delta += 15 * base;
3128+ if (o_ptr->tval == TV_SHIELD && o_ptr->sval == SV_DRAGON_SHIELD) delta += 5 * base;
3129+ if (o_ptr->tval == TV_GLOVES && o_ptr->sval == SV_SET_OF_DRAGON_GLOVES) delta += 5 * base;
3130+ if (o_ptr->tval == TV_BOOTS && o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE) delta += 5 * base;
3131+ if (o_ptr->tval == TV_HELM && o_ptr->sval == SV_DRAGON_HELM) delta += 5 * base;
3132+ if (o_ptr->tval == TV_RING && o_ptr->sval == SV_RING_SPEED && !object_is_cursed(o_ptr)) delta += 25 * base;
3133+ if (o_ptr->tval == TV_RING && o_ptr->sval == SV_RING_LORDLY && !object_is_cursed(o_ptr)) delta += 15 * base;
3134+ if (o_ptr->tval == TV_AMULET && o_ptr->sval == SV_AMULET_THE_MAGI && !object_is_cursed(o_ptr)) delta += 15 * base;
31583135
31593136 /* Out-of-depth objects */
3160- if (!object_is_cursed(o_ptr) && !object_is_broken(o_ptr) &&
3161- k_ptr->level > dun_level)
3137+ if (!object_is_cursed(o_ptr) && !object_is_broken(o_ptr) && k_ptr->level > dun_level)
31623138 {
31633139 /* Rating increase */
31643140 delta += (k_ptr->level - dun_level) * base;
旧リポジトリブラウザで表示