From 5da531c9e8ff2b02990774efc0cfa487c1545121 Mon Sep 17 00:00:00 2001 From: Deskull Date: Thu, 24 Jan 2019 23:55:02 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20=E7=A9=BA=E7=99=BD?= =?utf8?q?=E6=95=B4=E7=90=86=E3=80=82=20/=20Refactor=20spaces.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/artifact.c | 1 - src/bldg.c | 1 - src/cmd-item.c | 1 - src/cmd5.c | 4 ++-- src/dungeon.c | 1 - src/files.c | 4 ++-- src/load.c | 4 ---- src/object1.c | 4 ++-- src/object2.c | 6 ++---- src/player-status.c | 2 +- src/spells2.c | 9 ++------- src/spells3.c | 22 ++++++---------------- src/store.c | 2 +- 13 files changed, 18 insertions(+), 43 deletions(-) diff --git a/src/artifact.c b/src/artifact.c index c5ee5fcdb..78fb9ee3d 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -2020,7 +2020,6 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) GAME_TEXT dummy_name[MAX_NLEN] = ""; concptr ask_msg = _("このアーティファクトを何と名付けますか?", "What do you want to call the artifact? "); - /* Identify it fully */ object_aware(o_ptr); object_known(o_ptr); diff --git a/src/bldg.c b/src/bldg.c index 557f9b2f9..b3338bf49 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -1868,7 +1868,6 @@ static bool kankin(void) object_prep(&forge, lookup_kind(prize_list[num-1].tval, prize_list[num-1].sval)); apply_magic(&forge, object_level, AM_NO_FIXED_ART); - /* Identify it fully */ object_aware(&forge); object_known(&forge); diff --git a/src/cmd-item.c b/src/cmd-item.c index fc9baba8b..0f06ca41b 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -378,7 +378,6 @@ void do_cmd_wield(void) /* Wear the new stuff */ object_copy(o_ptr, q_ptr); - /* Player touches it */ o_ptr->marked |= OM_TOUCHED; p_ptr->total_weight += q_ptr->weight; diff --git a/src/cmd5.c b/src/cmd5.c index dff8199b1..6831a8d51 100644 --- a/src/cmd5.c +++ b/src/cmd5.c @@ -434,7 +434,7 @@ void do_cmd_browse(void) SPELL_IDX spells[64]; char temp[62*4]; - object_type *o_ptr; + object_type *o_ptr; concptr q, s; @@ -852,7 +852,7 @@ void do_cmd_cast(void) MANA_POINT need_mana; concptr prayer; - object_type *o_ptr; + object_type *o_ptr; const magic_type *s_ptr; concptr q, s; diff --git a/src/dungeon.c b/src/dungeon.c index b70e1a962..a6c5250ef 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -147,7 +147,6 @@ static void sense_inventory_aux(INVENTORY_IDX slot, bool heavy) } - /* We have "felt" it */ o_ptr->ident |= (IDENT_SENSE); /* Set the "inscription" */ diff --git a/src/files.c b/src/files.c index 92681678c..e75b3173e 100644 --- a/src/files.c +++ b/src/files.c @@ -2030,7 +2030,7 @@ static void display_player_various(void) int shots, shot_frac; bool dokubari; - object_type *o_ptr; + object_type *o_ptr; if (p_ptr->muta2 & MUT2_HORNS) muta_att++; if (p_ptr->muta2 & MUT2_SCOR_TAIL) muta_att++; @@ -6527,7 +6527,7 @@ static void print_tomb(void) static void show_info(void) { int i, j, k, l; - object_type *o_ptr; + object_type *o_ptr; store_type *st_ptr; /* Hack -- Know everything in the inven/equip */ diff --git a/src/load.c b/src/load.c index 805894ffe..d57c92dea 100644 --- a/src/load.c +++ b/src/load.c @@ -2423,9 +2423,7 @@ static errr rd_inventory(void) /* Wield equipment */ if (n >= INVEN_RARM) { - /* Player touches it */ q_ptr->marked |= OM_TOUCHED; - object_copy(&inventory[n], q_ptr); /* Add the weight */ @@ -2450,9 +2448,7 @@ static errr rd_inventory(void) /* Get a slot */ n = slot++; - /* Player touches it */ q_ptr->marked |= OM_TOUCHED; - object_copy(&inventory[n], q_ptr); /* Add the weight */ diff --git a/src/object1.c b/src/object1.c index 719b0b47f..9de2810dc 100644 --- a/src/object1.c +++ b/src/object1.c @@ -2105,7 +2105,7 @@ COMMAND_CODE show_inven(int target_item, BIT_FLAGS mode) COMMAND_CODE i; int j, k, l, z = 0; int col, cur_col, len; - object_type *o_ptr; + object_type *o_ptr; GAME_TEXT o_name[MAX_NLEN]; char tmp_val[80]; COMMAND_CODE out_index[23]; @@ -2269,7 +2269,7 @@ COMMAND_CODE show_equip(int target_item, BIT_FLAGS mode) COMMAND_CODE i; int j, k, l; int col, cur_col, len; - object_type *o_ptr; + object_type *o_ptr; char tmp_val[80]; GAME_TEXT o_name[MAX_NLEN]; COMMAND_CODE out_index[23]; diff --git a/src/object2.c b/src/object2.c index eb3c238e8..99232bb74 100644 --- a/src/object2.c +++ b/src/object2.c @@ -3621,7 +3621,6 @@ static void a_m_aux_3(object_type *o_ptr, DEPTH level, int power) break; } } - /* Uncurse it */ o_ptr->curse_flags = 0L; } else if ((power == -2) && one_in_(2)) @@ -3904,7 +3903,6 @@ static void a_m_aux_3(object_type *o_ptr, DEPTH level, int power) } } } - /* Uncurse it */ o_ptr->curse_flags = 0L; } else if ((power == -2) && one_in_(2)) @@ -6247,7 +6245,7 @@ void inven_drop(INVENTORY_IDX item, ITEM_NUMBER amt) void combine_pack(void) { int i, j, k; - object_type *o_ptr; + object_type *o_ptr; object_type *j_ptr; bool flag = FALSE, combined; @@ -6357,7 +6355,7 @@ void reorder_pack(void) s32b o_value; object_type forge; object_type *q_ptr; - object_type *o_ptr; + object_type *o_ptr; bool flag = FALSE; diff --git a/src/player-status.c b/src/player-status.c index 3ec8a2828..6326dcb23 100644 --- a/src/player-status.c +++ b/src/player-status.c @@ -3228,7 +3228,7 @@ static void calc_mana(void) { int msp, levels, cur_wgt, max_wgt; - object_type *o_ptr; + object_type *o_ptr; /* Hack -- Must be literate */ diff --git a/src/spells2.c b/src/spells2.c index bff061b39..908f118fb 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -4894,7 +4894,7 @@ bool panic_hit(void) bool psychometry(void) { OBJECT_IDX item; - object_type *o_ptr; + object_type *o_ptr; GAME_TEXT o_name[MAX_NLEN]; byte feel; concptr q, s; @@ -4934,16 +4934,11 @@ bool psychometry(void) #endif - /* We have "felt" it */ o_ptr->ident |= (IDENT_SENSE); - - /* "Inscribe" it */ o_ptr->feeling = feel; - - /* Player touches it */ o_ptr->marked |= OM_TOUCHED; - p_ptr->update |= (PU_COMBINE | PU_REORDER); + p_ptr->update |= (PU_COMBINE | PU_REORDER); p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER); /* Valid "tval" codes */ diff --git a/src/spells3.c b/src/spells3.c index dc86d6982..1bb37b7eb 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -984,7 +984,7 @@ bool reset_recall(void) bool apply_disenchant(BIT_FLAGS mode) { int t = 0; - object_type *o_ptr; + object_type *o_ptr; GAME_TEXT o_name[MAX_NLEN]; int to_h, to_d, to_a, pval; @@ -1850,17 +1850,12 @@ static int remove_curse_aux(int all) /* Perma-Cursed Items can NEVER be uncursed */ if (o_ptr->curse_flags & TRC_PERMA_CURSE) { - /* Uncurse it */ o_ptr->curse_flags &= (TRC_CURSED | TRC_HEAVY_CURSE | TRC_PERMA_CURSE); continue; } - /* Uncurse it */ o_ptr->curse_flags = 0L; - - /* Hack -- Assume felt */ o_ptr->ident |= (IDENT_SENSE); - o_ptr->feeling = FEEL_NONE; p_ptr->update |= (PU_BONUS); @@ -2324,12 +2319,10 @@ bool identify_item(object_type *o_ptr) chg_virtue(V_KNOWLEDGE, 1); } - /* Identify it fully */ object_aware(o_ptr); object_known(o_ptr); - - /* Player touches it */ o_ptr->marked |= OM_TOUCHED; + p_ptr->update |= (PU_BONUS | PU_COMBINE | PU_REORDER); p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER); @@ -2358,7 +2351,7 @@ bool identify_item(object_type *o_ptr) bool ident_spell(bool only_equip) { OBJECT_IDX item; - object_type *o_ptr; + object_type *o_ptr; GAME_TEXT o_name[MAX_NLEN]; concptr q, s; bool old_known; @@ -2426,8 +2419,8 @@ bool ident_spell(bool only_equip) bool mundane_spell(bool only_equip) { OBJECT_IDX item; - object_type *o_ptr; - concptr q, s; + object_type *o_ptr; + concptr q, s; if (only_equip) item_tester_hook = object_is_weapon_armour_ammo; @@ -2875,12 +2868,9 @@ bool bless_weapon(void) #endif - /* Uncurse it */ o_ptr->curse_flags = 0L; - /* Hack -- Assume felt */ o_ptr->ident |= (IDENT_SENSE); - o_ptr->feeling = FEEL_NONE; /* Recalculate the bonuses */ @@ -2984,7 +2974,7 @@ bool bless_weapon(void) bool pulish_shield(void) { OBJECT_IDX item; - object_type *o_ptr; + object_type *o_ptr; BIT_FLAGS flgs[TR_FLAG_SIZE]; GAME_TEXT o_name[MAX_NLEN]; concptr q, s; diff --git a/src/store.c b/src/store.c index 90df83429..b6268b674 100644 --- a/src/store.c +++ b/src/store.c @@ -3523,7 +3523,7 @@ static void updatebargain(PRICE price, PRICE minprice, int num) static void display_entry(int pos) { int i, cur_col; - object_type *o_ptr; + object_type *o_ptr; s32b x; GAME_TEXT o_name[MAX_NLEN]; -- 2.11.0