• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision8a938250bb7f82c041ee557e9b3276b8b706313f (tree)
Time2019-01-10 21:31:40
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement.

Change Summary

Incremental Difference

--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -964,18 +964,14 @@ void do_cmd_nikki(void)
964964 void do_cmd_redraw(void)
965965 {
966966 int j;
967-
968967 term *old = Term;
969968
970969
971970 /* Hack -- react to changes */
972971 Term_xtra(TERM_XTRA_REACT, 0);
973972
974-
975973 /* Combine and Reorder the pack (later) */
976974 p_ptr->update |= (PU_COMBINE | PU_REORDER);
977-
978-
979975 p_ptr->update |= (PU_TORCH);
980976 p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
981977 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
@@ -3788,8 +3784,6 @@ void do_cmd_note(void)
37883784 */
37893785 void do_cmd_version(void)
37903786 {
3791- /* Silly message */
3792-
37933787 #if FAKE_VER_EXTRA > 0
37943788 msg_format(_("変愚蛮怒(Hengband) %d.%d.%d.%d", "You are playing Hengband %d.%d.%d.%d."),
37953789 FAKE_VER_MAJOR-10, FAKE_VER_MINOR, FAKE_VER_PATCH, FAKE_VER_EXTRA);
@@ -3856,6 +3850,8 @@ static cptr do_cmd_feeling_text_lucky[11] =
38563850 */
38573851 void do_cmd_feeling(void)
38583852 {
3853+ if (p_ptr->wild_mode) return;
3854+
38593855 /* No useful feeling in quests */
38603856 if (p_ptr->inside_quest && !random_quest_number(dun_level))
38613857 {
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -4499,7 +4499,7 @@ static void process_command(void)
44994499 /* Repeat level feeling */
45004500 case KTRL('F'):
45014501 {
4502- if (!p_ptr->wild_mode) do_cmd_feeling();
4502+ do_cmd_feeling();
45034503 break;
45044504 }
45054505
--- a/src/object2.c
+++ b/src/object2.c
@@ -1897,11 +1897,11 @@ void object_absorb(object_type *o_ptr, object_type *j_ptr)
18971897 * @param sval 検索したいベースアイテムのsval
18981898 * @return なし
18991899 */
1900-IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval)
1900+KIND_OBJECT_IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval)
19011901 {
1902- IDX k;
1902+ KIND_OBJECT_IDX k;
19031903 int num = 0;
1904- IDX bk = 0;
1904+ KIND_OBJECT_IDX bk = 0;
19051905
19061906 /* Look for it */
19071907 for (k = 1; k < max_k_idx; k++)
@@ -2208,8 +2208,7 @@ static bool make_artifact_special(object_type *o_ptr)
22082208 */
22092209 static bool make_artifact(object_type *o_ptr)
22102210 {
2211- IDX i;
2212-
2211+ ARTIFACT_IDX i;
22132212
22142213 /* No artifacts in the town */
22152214 if (!dun_level) return (FALSE);
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -924,7 +924,7 @@ bool reset_recall(void)
924924 do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, _("フロア・リセットで", "using a scroll of reset recall"));
925925 /* Accept request */
926926 #ifdef JP
927-msg_format("%sの帰還レベルを %d 階にセット。", d_name+d_info[select_dungeon].name, dummy, dummy * 50);
927+ msg_format("%sの帰還レベルを %d 階にセット。", d_name+d_info[select_dungeon].name, dummy, dummy * 50);
928928 #else
929929 msg_format("Recall depth set to level %d (%d').", dummy, dummy * 50);
930930 #endif
@@ -1641,8 +1641,8 @@ void fetch(DIRECTION dir, WEIGHT wgt, bool require_los)
16411641 cave[p_ptr->y][p_ptr->x].o_idx = i; /* 'move' it */
16421642
16431643 o_ptr->next_o_idx = 0;
1644- o_ptr->iy = (byte)p_ptr->y;
1645- o_ptr->ix = (byte)p_ptr->x;
1644+ o_ptr->iy = p_ptr->y;
1645+ o_ptr->ix = p_ptr->x;
16461646
16471647 object_desc(o_name, o_ptr, OD_NAME_ONLY);
16481648 msg_format(_("%^sがあなたの足元に飛んできた。", "%^s flies through the air to your feet."), o_name);
@@ -1922,7 +1922,6 @@ bool alchemy(void)
19221922 o_ptr = &o_list[0 - item];
19231923 }
19241924
1925-
19261925 /* See how many items */
19271926 if (o_ptr->number > 1)
19281927 {
@@ -1933,7 +1932,6 @@ bool alchemy(void)
19331932 if (amt <= 0) return FALSE;
19341933 }
19351934
1936-
19371935 old_number = o_ptr->number;
19381936 o_ptr->number = amt;
19391937 object_desc(o_name, o_ptr, 0);
@@ -2050,7 +2048,6 @@ bool enchant(object_type *o_ptr, int n, int eflag)
20502048 bool a = object_is_artifact(o_ptr);
20512049 bool force = (eflag & ENCH_FORCE);
20522050
2053-
20542051 /* Large piles resist enchantment */
20552052 prob = o_ptr->number * 100;
20562053
@@ -2125,11 +2122,9 @@ bool enchant(object_type *o_ptr, int n, int eflag)
21252122
21262123 /* Failure */
21272124 if (!res) return (FALSE);
2128- p_ptr->update |= (PU_BONUS);
21292125
21302126 /* Combine / Reorder the pack (later) */
2131- p_ptr->update |= (PU_COMBINE | PU_REORDER);
2132-
2127+ p_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER);
21332128 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
21342129
21352130 calc_android_exp();
@@ -2357,11 +2352,8 @@ bool identify_item(object_type *o_ptr)
23572352
23582353 /* Player touches it */
23592354 o_ptr->marked |= OM_TOUCHED;
2360- p_ptr->update |= (PU_BONUS);
2361-
2362- /* Combine / Reorder the pack (later) */
2363- p_ptr->update |= (PU_COMBINE | PU_REORDER);
23642355
2356+ p_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER);
23652357 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
23662358
23672359 strcpy(record_o_name, o_name);
@@ -2897,7 +2889,6 @@ bool recharge(int power)
28972889
28982890 /* Combine / Reorder the pack (later) */
28992891 p_ptr->update |= (PU_COMBINE | PU_REORDER);
2900-
29012892 p_ptr->window |= (PW_INVEN);
29022893
29032894 /* Something was done */
@@ -2991,8 +2982,7 @@ bool bless_weapon(void)
29912982 if (have_flag(flgs, TR_BLESSED))
29922983 {
29932984 #ifdef JP
2994-msg_format("%s は既に祝福されている。",
2995- o_name );
2985+ msg_format("%s は既に祝福されている。", o_name);
29962986 #else
29972987 msg_format("%s %s %s blessed already.",
29982988 ((item >= 0) ? "Your" : "The"), o_name,
@@ -3052,20 +3042,17 @@ msg_format("%s は既に祝福されている。",
30523042 msg_print(_("周囲が凡庸な雰囲気で満ちた...", "There is a static feeling in the air..."));
30533043
30543044 #ifdef JP
3055-msg_format("%s は劣化した!",
3056- o_name );
3045+ msg_format("%s は劣化した!", o_name);
30573046 #else
3058- msg_format("%s %s %s disenchanted!",
3059- ((item >= 0) ? "Your" : "The"), o_name,
3060- ((o_ptr->number > 1) ? "were" : "was"));
3047+ msg_format("%s %s %s disenchanted!", ((item >= 0) ? "Your" : "The"), o_name,
3048+ ((o_ptr->number > 1) ? "were" : "was"));
30613049 #endif
30623050
30633051 }
30643052 }
3065- p_ptr->update |= (PU_BONUS);
30663053
3054+ p_ptr->update |= (PU_BONUS);
30673055 p_ptr->window |= (PW_EQUIP | PW_PLAYER);
3068-
30693056 calc_android_exp();
30703057
30713058 return TRUE;
Show on old repository browser