• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisioneb25ee65ea03da4e08276e93b3320ae32507abd2 (tree)
Time2019-01-08 12:58:36
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 コメント整理。 / Refactor comments.

Change Summary

Incremental Difference

--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -2189,8 +2189,6 @@ void do_cmd_rest(void)
21892189 /* Save the rest code */
21902190 resting = command_arg;
21912191 p_ptr->action = ACTION_REST;
2192-
2193- /* Recalculate bonuses */
21942192 p_ptr->update |= (PU_BONUS);
21952193
21962194 /* Redraw the state */
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -1200,8 +1200,6 @@ static void check_music(void)
12001200 INTERUPTING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
12011201 msg_print(_("歌を再開した。", "You restart singing."));
12021202 p_ptr->action = ACTION_SING;
1203-
1204- /* Recalculate bonuses */
12051203 p_ptr->update |= (PU_BONUS | PU_HP);
12061204
12071205 /* Redraw map and status bar */
--- a/src/effects.c
+++ b/src/effects.c
@@ -116,8 +116,6 @@ void set_action(ACTION_IDX typ)
116116 break;
117117 }
118118 }
119-
120- /* Recalculate bonuses */
121119 p_ptr->update |= (PU_BONUS);
122120
123121 /* Redraw the state */
@@ -271,8 +269,6 @@ void dispel_player(void)
271269 SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
272270 msg_format(_("%sが途切れた。", "Your %s is interrupted."), str);
273271 p_ptr->action = ACTION_NONE;
274-
275- /* Recalculate bonuses */
276272 p_ptr->update |= (PU_BONUS | PU_HP);
277273
278274 p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
@@ -340,8 +336,6 @@ bool set_mimic(TIME_EFFECT v, IDX p, bool do_dec)
340336
341337 /* Redraw title */
342338 p_ptr->redraw |= (PR_BASIC | PR_STATUS);
343-
344- /* Recalculate bonuses */
345339 p_ptr->update |= (PU_BONUS | PU_HP);
346340
347341 handle_stuff();
@@ -793,8 +787,6 @@ bool set_fast(TIME_EFFECT v, bool do_dec)
793787 if (!notice) return (FALSE);
794788
795789 if (disturb_state) disturb(FALSE, FALSE);
796-
797- /* Recalculate bonuses */
798790 p_ptr->update |= (PU_BONUS);
799791 handle_stuff();
800792 return (TRUE);
@@ -850,8 +842,6 @@ bool set_lightspeed(TIME_EFFECT v, bool do_dec)
850842 if (!notice) return (FALSE);
851843
852844 if (disturb_state) disturb(FALSE, FALSE);
853-
854- /* Recalculate bonuses */
855845 p_ptr->update |= (PU_BONUS);
856846 handle_stuff();
857847 return (TRUE);
@@ -903,8 +893,6 @@ bool set_slow(TIME_EFFECT v, bool do_dec)
903893 if (!notice) return (FALSE);
904894
905895 if (disturb_state) disturb(FALSE, FALSE);
906-
907- /* Recalculate bonuses */
908896 p_ptr->update |= (PU_BONUS);
909897 handle_stuff();
910898 return (TRUE);
@@ -960,8 +948,6 @@ bool set_shield(TIME_EFFECT v, bool do_dec)
960948 if (!notice) return (FALSE);
961949
962950 if (disturb_state) disturb(FALSE, FALSE);
963-
964- /* Recalculate bonuses */
965951 p_ptr->update |= (PU_BONUS);
966952 handle_stuff();
967953 return (TRUE);
@@ -1017,8 +1003,6 @@ bool set_tsubureru(TIME_EFFECT v, bool do_dec)
10171003 if (!notice) return (FALSE);
10181004
10191005 if (disturb_state) disturb(FALSE, FALSE);
1020-
1021- /* Recalculate bonuses */
10221006 p_ptr->update |= (PU_BONUS);
10231007 handle_stuff();
10241008 return (TRUE);
@@ -1074,8 +1058,6 @@ bool set_magicdef(TIME_EFFECT v, bool do_dec)
10741058 if (!notice) return (FALSE);
10751059
10761060 if (disturb_state) disturb(FALSE, FALSE);
1077-
1078- /* Recalculate bonuses */
10791061 p_ptr->update |= (PU_BONUS);
10801062 handle_stuff();
10811063 return (TRUE);
@@ -1130,8 +1112,6 @@ bool set_blessed(TIME_EFFECT v, bool do_dec)
11301112 if (!notice) return (FALSE);
11311113
11321114 if (disturb_state) disturb(FALSE, FALSE);
1133-
1134- /* Recalculate bonuses */
11351115 p_ptr->update |= (PU_BONUS);
11361116 handle_stuff();
11371117 return (TRUE);
@@ -1187,8 +1167,6 @@ bool set_hero(TIME_EFFECT v, bool do_dec)
11871167 if (!notice) return (FALSE);
11881168
11891169 if (disturb_state) disturb(FALSE, FALSE);
1190-
1191- /* Recalculate bonuses */
11921170 p_ptr->update |= (PU_BONUS);
11931171
11941172 /* Recalculate hitpoints */
@@ -1247,8 +1225,6 @@ bool set_shero(TIME_EFFECT v, bool do_dec)
12471225 if (!notice) return (FALSE);
12481226
12491227 if (disturb_state) disturb(FALSE, FALSE);
1250-
1251- /* Recalculate bonuses */
12521228 p_ptr->update |= (PU_BONUS);
12531229
12541230 /* Recalculate hitpoints */
@@ -1373,8 +1349,6 @@ bool set_wraith_form(TIME_EFFECT v, bool do_dec)
13731349 if (!notice) return (FALSE);
13741350
13751351 if (disturb_state) disturb(FALSE, FALSE);
1376-
1377- /* Recalculate bonuses */
13781352 p_ptr->update |= (PU_BONUS);
13791353 handle_stuff();
13801354 return (TRUE);
@@ -1447,8 +1421,6 @@ bool set_invuln(TIME_EFFECT v, bool do_dec)
14471421 if (!notice) return (FALSE);
14481422
14491423 if (disturb_state) disturb(FALSE, FALSE);
1450-
1451- /* Recalculate bonuses */
14521424 p_ptr->update |= (PU_BONUS);
14531425 handle_stuff();
14541426 return (TRUE);
@@ -1503,8 +1475,6 @@ bool set_tim_esp(TIME_EFFECT v, bool do_dec)
15031475 if (!notice) return (FALSE);
15041476
15051477 if (disturb_state) disturb(FALSE, FALSE);
1506-
1507- /* Recalculate bonuses */
15081478 p_ptr->update |= (PU_BONUS);
15091479 p_ptr->update |= (PU_MONSTERS);
15101480 handle_stuff();
@@ -1560,8 +1530,6 @@ bool set_tim_invis(TIME_EFFECT v, bool do_dec)
15601530 if (!notice) return (FALSE);
15611531
15621532 if (disturb_state) disturb(FALSE, FALSE);
1563-
1564- /* Recalculate bonuses */
15651533 p_ptr->update |= (PU_BONUS);
15661534
15671535 /* Update the monsters */
@@ -1619,8 +1587,6 @@ bool set_tim_infra(TIME_EFFECT v, bool do_dec)
16191587 if (!notice) return (FALSE);
16201588
16211589 if (disturb_state) disturb(FALSE, FALSE);
1622-
1623- /* Recalculate bonuses */
16241590 p_ptr->update |= (PU_BONUS);
16251591
16261592 /* Update the monsters */
@@ -1678,8 +1644,6 @@ bool set_tim_regen(TIME_EFFECT v, bool do_dec)
16781644 if (!notice) return (FALSE);
16791645
16801646 if (disturb_state) disturb(FALSE, FALSE);
1681-
1682- /* Recalculate bonuses */
16831647 p_ptr->update |= (PU_BONUS);
16841648 handle_stuff();
16851649 return (TRUE);
@@ -1734,8 +1698,6 @@ bool set_tim_stealth(TIME_EFFECT v, bool do_dec)
17341698 if (!notice) return (FALSE);
17351699
17361700 if (disturb_state) disturb(FALSE, FALSE);
1737-
1738- /* Recalculate bonuses */
17391701 p_ptr->update |= (PU_BONUS);
17401702 handle_stuff();
17411703 return (TRUE);
@@ -1847,8 +1809,6 @@ bool set_tim_levitation(TIME_EFFECT v, bool do_dec)
18471809 if (!notice) return (FALSE);
18481810
18491811 if (disturb_state) disturb(FALSE, FALSE);
1850-
1851- /* Recalculate bonuses */
18521812 p_ptr->update |= (PU_BONUS);
18531813 handle_stuff();
18541814 return (TRUE);
@@ -1956,8 +1916,6 @@ bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
19561916 if (!notice) return (FALSE);
19571917
19581918 if (disturb_state) disturb(FALSE, FALSE);
1959-
1960- /* Recalculate bonuses */
19611919 p_ptr->update |= (PU_BONUS);
19621920 handle_stuff();
19631921 return (TRUE);
@@ -2012,8 +1970,6 @@ bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec)
20121970 if (!notice) return (FALSE);
20131971
20141972 if (disturb_state) disturb(FALSE, FALSE);
2015-
2016- /* Recalculate bonuses */
20171973 p_ptr->update |= (PU_BONUS);
20181974 handle_stuff();
20191975 return (TRUE);
@@ -2068,8 +2024,6 @@ bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
20682024 if (!notice) return (FALSE);
20692025
20702026 if (disturb_state) disturb(FALSE, FALSE);
2071-
2072- /* Recalculate bonuses */
20732027 p_ptr->update |= (PU_BONUS);
20742028 handle_stuff();
20752029 return (TRUE);
@@ -2125,8 +2079,6 @@ bool set_resist_magic(TIME_EFFECT v, bool do_dec)
21252079 if (!notice) return (FALSE);
21262080
21272081 if (disturb_state) disturb(FALSE, FALSE);
2128-
2129- /* Recalculate bonuses */
21302082 p_ptr->update |= (PU_BONUS);
21312083 handle_stuff();
21322084 return (TRUE);
@@ -2181,8 +2133,6 @@ bool set_tim_reflect(TIME_EFFECT v, bool do_dec)
21812133 if (!notice) return (FALSE);
21822134
21832135 if (disturb_state) disturb(FALSE, FALSE);
2184-
2185- /* Recalculate bonuses */
21862136 p_ptr->update |= (PU_BONUS);
21872137 handle_stuff();
21882138 return (TRUE);
@@ -2235,8 +2185,6 @@ bool set_multishadow(TIME_EFFECT v, bool do_dec)
22352185 if (!notice) return (FALSE);
22362186
22372187 if (disturb_state) disturb(FALSE, FALSE);
2238-
2239- /* Recalculate bonuses */
22402188 p_ptr->update |= (PU_BONUS);
22412189 handle_stuff();
22422190 return (TRUE);
@@ -2291,8 +2239,6 @@ bool set_dustrobe(TIME_EFFECT v, bool do_dec)
22912239 if (!notice) return (FALSE);
22922240
22932241 if (disturb_state) disturb(FALSE, FALSE);
2294-
2295- /* Recalculate bonuses */
22962242 p_ptr->update |= (PU_BONUS);
22972243 handle_stuff();
22982244 return (TRUE);
@@ -2347,8 +2293,6 @@ bool set_kabenuke(TIME_EFFECT v, bool do_dec)
23472293 if (!notice) return (FALSE);
23482294
23492295 if (disturb_state) disturb(FALSE, FALSE);
2350-
2351- /* Recalculate bonuses */
23522296 p_ptr->update |= (PU_BONUS);
23532297 handle_stuff();
23542298 return (TRUE);
@@ -2409,8 +2353,6 @@ bool set_tsuyoshi(TIME_EFFECT v, bool do_dec)
24092353 if (!notice) return (FALSE);
24102354
24112355 if (disturb_state) disturb(FALSE, FALSE);
2412-
2413- /* Recalculate bonuses */
24142356 p_ptr->update |= (PU_BONUS);
24152357
24162358 /* Recalculate hitpoints */
@@ -2986,8 +2928,6 @@ bool set_stun(TIME_EFFECT v)
29862928 if (!notice) return (FALSE);
29872929
29882930 if (disturb_state) disturb(FALSE, FALSE);
2989-
2990- /* Recalculate bonuses */
29912931 p_ptr->update |= (PU_BONUS);
29922932
29932933 /* Redraw the "stun" */
@@ -3181,8 +3121,6 @@ bool set_cut(TIME_EFFECT v)
31813121 if (!notice) return (FALSE);
31823122
31833123 if (disturb_state) disturb(FALSE, FALSE);
3184-
3185- /* Recalculate bonuses */
31863124 p_ptr->update |= (PU_BONUS);
31873125
31883126 /* Redraw the "cut" */
@@ -3377,8 +3315,6 @@ bool set_food(TIME_EFFECT v)
33773315 if (!notice) return (FALSE);
33783316
33793317 if (disturb_state) disturb(FALSE, FALSE);
3380-
3381- /* Recalculate bonuses */
33823318 p_ptr->update |= (PU_BONUS);
33833319
33843320 /* Redraw hunger */
@@ -3442,8 +3378,6 @@ bool inc_stat(int stat)
34423378 {
34433379 p_ptr->stat_max[stat] = value;
34443380 }
3445-
3446- /* Recalculate bonuses */
34473381 p_ptr->update |= (PU_BONUS);
34483382
34493383 /* Success */
@@ -3577,8 +3511,6 @@ bool dec_stat(int stat, int amount, int permanent)
35773511
35783512 /* Redisplay the stats later */
35793513 p_ptr->redraw |= (PR_STATS);
3580-
3581- /* Recalculate bonuses */
35823514 p_ptr->update |= (PU_BONUS);
35833515 }
35843516
@@ -3598,8 +3530,6 @@ bool res_stat(int stat)
35983530 {
35993531 /* Restore */
36003532 p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
3601-
3602- /* Recalculate bonuses */
36033533 p_ptr->update |= (PU_BONUS);
36043534
36053535 /* Redisplay the stats later */
@@ -3868,8 +3798,6 @@ bool lose_all_info(void)
38683798 /* Hack -- Clear the "felt" flag */
38693799 o_ptr->ident &= ~(IDENT_SENSE);
38703800 }
3871-
3872- /* Recalculate bonuses */
38733801 p_ptr->update |= (PU_BONUS);
38743802
38753803 /* Combine / Reorder the pack (later) */
@@ -4684,8 +4612,6 @@ bool set_ultimate_res(TIME_EFFECT v, bool do_dec)
46844612 if (!notice) return (FALSE);
46854613
46864614 if (disturb_state) disturb(FALSE, FALSE);
4687-
4688- /* Recalculate bonuses */
46894615 p_ptr->update |= (PU_BONUS);
46904616 handle_stuff();
46914617 return (TRUE);
@@ -4734,8 +4660,6 @@ bool set_tim_res_nether(TIME_EFFECT v, bool do_dec)
47344660 if (!notice) return (FALSE);
47354661
47364662 if (disturb_state) disturb(FALSE, FALSE);
4737-
4738- /* Recalculate bonuses */
47394663 p_ptr->update |= (PU_BONUS);
47404664 handle_stuff();
47414665 return (TRUE);
@@ -4784,8 +4708,6 @@ bool set_tim_res_time(TIME_EFFECT v, bool do_dec)
47844708 if (!notice) return (FALSE);
47854709
47864710 if (disturb_state) disturb(FALSE, FALSE);
4787-
4788- /* Recalculate bonuses */
47894711 p_ptr->update |= (PU_BONUS);
47904712 handle_stuff();
47914713 return (TRUE);
--- a/src/object2.c
+++ b/src/object2.c
@@ -5653,8 +5653,6 @@ void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num)
56535653
56545654 /* Add the weight */
56555655 p_ptr->total_weight += (num * o_ptr->weight);
5656-
5657- /* Recalculate bonuses */
56585656 p_ptr->update |= (PU_BONUS);
56595657
56605658 /* Recalculate mana XXX */
@@ -5725,8 +5723,6 @@ void inven_item_optimize(INVENTORY_IDX item)
57255723
57265724 /* Erase the empty slot */
57275725 object_wipe(&inventory[item]);
5728-
5729- /* Recalculate bonuses */
57305726 p_ptr->update |= (PU_BONUS);
57315727
57325728 /* Recalculate torch */
@@ -6022,8 +6018,6 @@ s16b inven_carry(object_type *o_ptr)
60226018
60236019 /* Increase the weight */
60246020 p_ptr->total_weight += (o_ptr->number * o_ptr->weight);
6025-
6026- /* Recalculate bonuses */
60276021 p_ptr->update |= (PU_BONUS);
60286022
60296023 p_ptr->window |= (PW_INVEN);
@@ -6100,8 +6094,6 @@ s16b inven_carry(object_type *o_ptr)
61006094
61016095 /* Count the items */
61026096 inven_cnt++;
6103-
6104- /* Recalculate bonuses */
61056097 p_ptr->update |= (PU_BONUS);
61066098
61076099 /* Combine and Reorder pack */
--- a/src/realm-hex.c
+++ b/src/realm-hex.c
@@ -884,8 +884,6 @@ cptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
884884
885885 if (p_ptr->stat_cur[i] > p_ptr->stat_max[i])
886886 p_ptr->stat_cur[i] = p_ptr->stat_max[i];
887-
888- /* Recalculate bonuses */
889887 p_ptr->update |= (PU_BONUS);
890888
891889 flag = TRUE;
--- a/src/realm-song.c
+++ b/src/realm-song.c
@@ -19,8 +19,6 @@ static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
1919 /* Now the player is singing */
2020 set_action(ACTION_SING);
2121
22-
23- /* Recalculate bonuses */
2422 p_ptr->update |= (PU_BONUS);
2523
2624 /* Redraw status bar */
@@ -54,8 +52,6 @@ void stop_singing(void)
5452
5553 SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
5654 SINGING_SONG_ID(p_ptr) = 0;
57-
58- /* Recalculate bonuses */
5955 p_ptr->update |= (PU_BONUS);
6056
6157 /* Redraw status bar */
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -1037,8 +1037,6 @@ msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
10371037
10381038 chg_virtue(V_HARMONY, 1);
10391039 chg_virtue(V_ENCHANT, -2);
1040-
1041- /* Recalculate bonuses */
10421040 p_ptr->update |= (PU_BONUS);
10431041
10441042 p_ptr->window |= (PW_EQUIP | PW_PLAYER);
@@ -2127,8 +2125,6 @@ bool enchant(object_type *o_ptr, int n, int eflag)
21272125
21282126 /* Failure */
21292127 if (!res) return (FALSE);
2130-
2131- /* Recalculate bonuses */
21322128 p_ptr->update |= (PU_BONUS);
21332129
21342130 /* Combine / Reorder the pack (later) */
@@ -2281,8 +2277,7 @@ bool artifact_scroll(void)
22812277 #ifdef JP
22822278 msg_format("%sは既に強化されています!", o_name );
22832279 #else
2284- msg_format("The %s %s already %s!",
2285- o_name, ((o_ptr->number > 1) ? "are" : "is"),
2280+ msg_format("The %s %s already %s!", o_name, ((o_ptr->number > 1) ? "are" : "is"),
22862281 ((o_ptr->number > 1) ? "customized items" : "a customized item"));
22872282 #endif
22882283 }
@@ -2291,7 +2286,7 @@ bool artifact_scroll(void)
22912286 {
22922287 if (o_ptr->number > 1)
22932288 {
2294- msg_print(_("複数のアイテムに魔法をかけるだけのエネルギーはありません!", "Not enough enough energy to enchant more than one object!"));
2289+ msg_print(_("複数のアイテムに魔法をかけるだけのエネルギーはありません!", "Not enough energy to enchant more than one object!"));
22952290 #ifdef JP
22962291 msg_format("%d 個の%sが壊れた!",(o_ptr->number)-1, o_name);
22972292 #else
@@ -2362,8 +2357,6 @@ bool identify_item(object_type *o_ptr)
23622357
23632358 /* Player touches it */
23642359 o_ptr->marked |= OM_TOUCHED;
2365-
2366- /* Recalculate bonuses */
23672360 p_ptr->update |= (PU_BONUS);
23682361
23692362 /* Combine / Reorder the pack (later) */
@@ -3069,8 +3062,6 @@ msg_format("%s は劣化した!",
30693062
30703063 }
30713064 }
3072-
3073- /* Recalculate bonuses */
30743065 p_ptr->update |= (PU_BONUS);
30753066
30763067 p_ptr->window |= (PW_EQUIP | PW_PLAYER);
@@ -4086,8 +4077,6 @@ msg_format("%sが%sを包み込もうとしたが、%sはそれを跳ね返し
40864077
40874078 /* Break it */
40884079 o_ptr->ident |= (IDENT_BROKEN);
4089-
4090- /* Recalculate bonuses */
40914080 p_ptr->update |= (PU_BONUS);
40924081
40934082 /* Recalculate mana */
@@ -4152,8 +4141,6 @@ bool curse_weapon_object(bool force, object_type *o_ptr)
41524141
41534142 /* Break it */
41544143 o_ptr->ident |= (IDENT_BROKEN);
4155-
4156- /* Recalculate bonuses */
41574144 p_ptr->update |= (PU_BONUS);
41584145
41594146 /* Recalculate mana */
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -985,8 +985,6 @@ static void wiz_reroll_item(object_type *o_ptr)
985985 {
986986 /* Apply changes */
987987 object_copy(o_ptr, q_ptr);
988-
989- /* Recalculate bonuses */
990988 p_ptr->update |= (PU_BONUS);
991989
992990 /* Combine / Reorder the pack (later) */
@@ -1341,8 +1339,6 @@ static void do_cmd_wiz_play(void)
13411339 /* Change */
13421340 object_copy(o_ptr, q_ptr);
13431341
1344-
1345- /* Recalculate bonuses */
13461342 p_ptr->update |= (PU_BONUS);
13471343
13481344 /* Combine / Reorder the pack (later) */
Show on old repository browser