• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision1dd2bde77d793084e7aa25f9c8e492611babefd8 (tree)
Time2018-12-06 23:24:13
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/spells3.c
+++ b/src/spells3.c
@@ -2217,18 +2217,13 @@ bool enchant_spell(HIT_PROB num_hit, HIT_POINT num_dam, ARMOUR_CLASS num_ac)
22172217 o_ptr = &o_list[0 - item];
22182218 }
22192219
2220-
2221- /* Description */
22222220 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
22232221 #ifdef JP
22242222 msg_format("%s は明るく輝いた!", o_name);
22252223 #else
2226- msg_format("%s %s glow%s brightly!",
2227- ((item >= 0) ? "Your" : "The"), o_name,
2228- ((o_ptr->number > 1) ? "" : "s"));
2224+ msg_format("%s %s glow%s brightly!", ((item >= 0) ? "Your" : "The"), o_name, ((o_ptr->number > 1) ? "" : "s"));
22292225 #endif
22302226
2231-
22322227 /* Enchant */
22332228 if (enchant(o_ptr, num_hit, ENCH_TOHIT)) okay = TRUE;
22342229 if (enchant(o_ptr, num_dam, ENCH_TODAM)) okay = TRUE;
@@ -2279,22 +2274,17 @@ bool artifact_scroll(void)
22792274 {
22802275 o_ptr = &inventory[item];
22812276 }
2282-
22832277 /* Get the item (on the floor) */
22842278 else
22852279 {
22862280 o_ptr = &o_list[0 - item];
22872281 }
22882282
2289-
2290- /* Description */
22912283 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
22922284 #ifdef JP
22932285 msg_format("%s は眩い光を発した!",o_name);
22942286 #else
2295- msg_format("%s %s radiate%s a blinding light!",
2296- ((item >= 0) ? "Your" : "The"), o_name,
2297- ((o_ptr->number > 1) ? "" : "s"));
2287+ msg_format("%s %s radiate%s a blinding light!", ((item >= 0) ? "Your" : "The"), o_name, ((o_ptr->number > 1) ? "" : "s"));
22982288 #endif
22992289
23002290 if (object_is_artifact(o_ptr))
@@ -2302,9 +2292,7 @@ bool artifact_scroll(void)
23022292 #ifdef JP
23032293 msg_format("%sは既に伝説のアイテムです!", o_name );
23042294 #else
2305- msg_format("The %s %s already %s!",
2306- o_name, ((o_ptr->number > 1) ? "are" : "is"),
2307- ((o_ptr->number > 1) ? "artifacts" : "an artifact"));
2295+ msg_format("The %s %s already %s!", o_name, ((o_ptr->number > 1) ? "are" : "is"), ((o_ptr->number > 1) ? "artifacts" : "an artifact"));
23082296 #endif
23092297
23102298 okay = FALSE;
@@ -2393,7 +2381,6 @@ bool identify_item(object_type *o_ptr)
23932381 bool old_known = FALSE;
23942382 char o_name[MAX_NLEN];
23952383
2396- /* Description */
23972384 object_desc(o_name, o_ptr, 0);
23982385
23992386 if (o_ptr->ident & IDENT_KNOWN)
@@ -2423,7 +2410,6 @@ bool identify_item(object_type *o_ptr)
24232410 strcpy(record_o_name, o_name);
24242411 record_turn = turn;
24252412
2426- /* Description */
24272413 object_desc(o_name, o_ptr, OD_NAME_ONLY);
24282414
24292415 if(record_fix_art && !old_known && object_is_fixed_artifact(o_ptr))
@@ -2491,7 +2477,6 @@ bool ident_spell(bool only_equip)
24912477 /* Identify it */
24922478 old_known = identify_item(o_ptr);
24932479
2494- /* Description */
24952480 object_desc(o_name, o_ptr, 0);
24962481 if (item >= INVEN_RARM)
24972482 {
@@ -2639,7 +2624,6 @@ bool identify_fully(bool only_equip)
26392624 /* Handle stuff */
26402625 handle_stuff();
26412626
2642- /* Description */
26432627 object_desc(o_name, o_ptr, 0);
26442628 if (item >= INVEN_RARM)
26452629 {
@@ -3008,8 +2992,6 @@ bool bless_weapon(void)
30082992 o_ptr = &o_list[0 - item];
30092993 }
30102994
3011-
3012- /* Description */
30132995 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
30142996
30152997 /* Extract the flags */
@@ -3023,22 +3005,18 @@ bool bless_weapon(void)
30233005 (o_ptr->curse_flags & TRC_PERMA_CURSE))
30243006 {
30253007 #ifdef JP
3026-msg_format("%sを覆う黒いオーラは祝福を跳ね返した!",
3027- o_name);
3008+ msg_format("%sを覆う黒いオーラは祝福を跳ね返した!", o_name);
30283009 #else
3029- msg_format("The black aura on %s %s disrupts the blessing!",
3030- ((item >= 0) ? "your" : "the"), o_name);
3010+ msg_format("The black aura on %s %s disrupts the blessing!", ((item >= 0) ? "your" : "the"), o_name);
30313011 #endif
30323012
30333013 return TRUE;
30343014 }
30353015
30363016 #ifdef JP
3037-msg_format("%s から邪悪なオーラが消えた。",
3038- o_name);
3017+ msg_format("%s から邪悪なオーラが消えた。", o_name);
30393018 #else
3040- msg_format("A malignant aura leaves %s %s.",
3041- ((item >= 0) ? "your" : "the"), o_name);
3019+ msg_format("A malignant aura leaves %s %s.", ((item >= 0) ? "your" : "the"), o_name);
30423020 #endif
30433021
30443022
@@ -3186,8 +3164,6 @@ bool pulish_shield(void)
31863164 o_ptr = &o_list[0 - item];
31873165 }
31883166
3189-
3190- /* Description */
31913167 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
31923168
31933169 /* Extract the flags */
@@ -3197,11 +3173,9 @@ bool pulish_shield(void)
31973173 !object_is_cursed(o_ptr) && (o_ptr->sval != SV_MIRROR_SHIELD))
31983174 {
31993175 #ifdef JP
3200-msg_format("%sは輝いた!", o_name);
3176+ msg_format("%sは輝いた!", o_name);
32013177 #else
3202- msg_format("%s %s shine%s!",
3203- ((item >= 0) ? "Your" : "The"), o_name,
3204- ((o_ptr->number > 1) ? "" : "s"));
3178+ msg_format("%s %s shine%s!", ((item >= 0) ? "Your" : "The"), o_name, ((o_ptr->number > 1) ? "" : "s"));
32053179 #endif
32063180 o_ptr->name2 = EGO_REFLECTION;
32073181 enchant(o_ptr, randint0(3) + 4, ENCH_TOAC);
@@ -4077,8 +4051,6 @@ bool rustproof(void)
40774051 o_ptr = &o_list[0 - item];
40784052 }
40794053
4080-
4081- /* Description */
40824054 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
40834055
40844056 add_flag(o_ptr->art_flags, TR_IGNORE_ACID);
--- a/src/wizard1.c
+++ b/src/wizard1.c
@@ -204,22 +204,15 @@ static void kind_info(char *buf, char *dam, char *wgt, char *chance, DEPTH *lev,
204204 q_ptr->to_h = 0;
205205 q_ptr->to_d = 0;
206206
207-
208- /* Level */
209207 (*lev) = k_info[q_ptr->k_idx].level;
210-
211- /* Value */
212208 (*val) = object_value(q_ptr);
213209
214-
215210 /* Hack */
216211 if (!buf || !dam || !chance || !wgt) return;
217212
218-
219213 /* Description (too brief) */
220214 object_desc(buf, q_ptr, (OD_NAME_ONLY | OD_STORE));
221215
222-
223216 /* Misc info */
224217 strcpy(dam, "");
225218
Show on old repository browser