OSDN Git Service

[Refactor] #37353 'kubi'/'shoukinkubi'を'bounty'に変更 / Changed 'kubi' and 'shoukinkubi...
authorHourier <hourier@users.sourceforge.jp>
Sun, 5 Jan 2020 05:25:48 +0000 (14:25 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 5 Jan 2020 05:25:48 +0000 (14:25 +0900)
src/autopick.c
src/bldg.c
src/bldg.h
src/cmd/cmd-dump.c
src/load.c
src/monster-status.c
src/object-hook.c
src/object-hook.h
src/save.c
src/view-mainwindow.c
src/world.h

index 661a478..cf38250 100644 (file)
@@ -605,7 +605,7 @@ static void autopick_entry_from_object(autopick_type *entry, object_type *o_ptr)
        }
 
        /* Wanted monster's corpse */
-       if (object_is_shoukinkubi(o_ptr))
+       if (object_is_bounty(o_ptr))
        {
                REM_FLG(FLG_WORTHLESS);
                ADD_FLG(FLG_WANTED);
@@ -1265,7 +1265,7 @@ static bool is_autopick_aux(object_type *o_ptr, autopick_type *entry, concptr o_
                return FALSE;
 
        /*** Wanted monster's corpse/skeletons ***/
-       if (IS_FLG(FLG_WANTED) && !object_is_shoukinkubi(o_ptr))
+       if (IS_FLG(FLG_WANTED) && !object_is_bounty(o_ptr))
                return FALSE;
 
        /*** Unique monster's corpse/skeletons/statues ***/
@@ -1527,7 +1527,7 @@ static bool is_opt_confirm_destroy(object_type *o_ptr)
 
        if (leave_wanted)
        {
-               if (object_is_shoukinkubi(o_ptr)) return FALSE;
+               if (object_is_bounty(o_ptr)) return FALSE;
        }
 
        if (leave_corpse)
index 35fa000..320ee72 100644 (file)
@@ -1714,7 +1714,7 @@ static void tsuchinoko(void)
  * @brief 通常の賞金首情報を表示する。
  * @return なし
  */
-static void shoukinkubi(void)
+static void show_bounty(void)
 {
        int i;
        TERM_LEN y = 0;
@@ -1723,7 +1723,7 @@ static void shoukinkubi(void)
        prt(_("死体を持ち帰れば報酬を差し上げます。", "Offer a prize when you bring a wanted monster's corpse"),4 ,10);
        c_put_str(TERM_YELLOW, _("現在の賞金首", "Wanted monsters"), 6, 10);
 
-       for (i = 0; i < MAX_KUBI; i++)
+       for (i = 0; i < MAX_BOUNTY; i++)
        {
                byte color;
                concptr done_mark;
@@ -1743,7 +1743,7 @@ static void shoukinkubi(void)
                c_prt(color, format("%s %s", r_name + r_ptr->name, done_mark), y+7, 10);
 
                y = (y+1) % 10;
-               if (!y && (i < MAX_KUBI -1))
+               if (!y && (i < MAX_BOUNTY -1))
                {
                        prt(_("何かキーを押してください", "Hit any key."), 0, 0);
                        (void)inkey();
@@ -1761,7 +1761,7 @@ static void shoukinkubi(void)
 static struct {
        OBJECT_TYPE_VALUE tval; /*!< ベースアイテムのメイン種別ID */
        OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテムのサブ種別ID */
-} prize_list[MAX_KUBI] = 
+} prize_list[MAX_BOUNTY] = 
 {
        {TV_POTION, SV_POTION_CURING},
        {TV_POTION, SV_POTION_SPEED},
@@ -1903,7 +1903,7 @@ static bool kankin(void)
                }
        }
 
-       for (j = 0; j < MAX_KUBI; j++)
+       for (j = 0; j < MAX_BOUNTY; j++)
        {
                /* Need reverse order --- Positions will be changed in the loop */
                for (i = INVEN_PACK-1; i >= 0; i--)
@@ -1938,7 +1938,7 @@ static bool kankin(void)
                                current_world_ptr->bounty_r_idx[j] += 10000;
 
                                /* Count number of unique corpses already handed */
-                               for (num = 0, k = 0; k < MAX_KUBI; k++)
+                               for (num = 0, k = 0; k < MAX_BOUNTY; k++)
                                {
                                        if (current_world_ptr->bounty_r_idx[k] >= 10000) num++;
                                }
@@ -4001,8 +4001,8 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                tsuchinoko();
                break;
 
-       case BACT_KUBI:
-               shoukinkubi();
+       case BACT_BOUNTY:
+               show_bounty();
                break;
 
        case BACT_TARGET:
@@ -4256,7 +4256,7 @@ void determine_bounty_uniques(void)
        monster_race *r_ptr;
 
        get_mon_num_prep(NULL, NULL);
-       for (i = 0; i < MAX_KUBI; i++)
+       for (i = 0; i < MAX_BOUNTY; i++)
        {
                while (1)
                {
@@ -4279,9 +4279,9 @@ void determine_bounty_uniques(void)
        }
 
        /* Sort them */
-       for (i = 0; i < MAX_KUBI - 1; i++)
+       for (i = 0; i < MAX_BOUNTY - 1; i++)
        {
-               for (j = i; j < MAX_KUBI; j++)
+               for (j = i; j < MAX_BOUNTY; j++)
                {
                        if (r_info[current_world_ptr->bounty_r_idx[i]].level > r_info[current_world_ptr->bounty_r_idx[j]].level)
                        {
index d1aa679..8178ab9 100644 (file)
@@ -16,7 +16,7 @@
  */
 #define ARENA_DEFEATED_OLD_VER (-(MAX_SHORT)) /*<! 旧バージョンの闘技場敗北定義 */
 
-#define MAX_KUBI 20
+#define MAX_BOUNTY 20
 
 /*
  * A structure to describe a building.
@@ -88,7 +88,7 @@ extern MONRACE_IDX today_mon;
 #define BACT_BATTLE                 36
 #define BACT_TSUCHINOKO             37
 #define BACT_TARGET                 38
-#define BACT_KUBI                   39
+#define BACT_BOUNTY                 39
 #define BACT_KANKIN                 40
 #define BACT_HEIKOUKA               41
 #define BACT_TELE_TOWN              42
index 30077a5..23b4bf9 100644 (file)
@@ -3195,7 +3195,7 @@ static IDX collect_monsters(player_type *creature_ptr, IDX grp_cur, IDX mon_idx[
                {
                        bool wanted = FALSE;
                        int j;
-                       for (j = 0; j < MAX_KUBI; j++)
+                       for (j = 0; j < MAX_BOUNTY; j++)
                        {
                                if (current_world_ptr->bounty_r_idx[j] == i || current_world_ptr->bounty_r_idx[j] - 10000 == i ||
                                        (creature_ptr->today_mon && creature_ptr->today_mon == i))
@@ -6222,7 +6222,7 @@ static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX d
  * @param creature_ptr プレーヤーへの参照ポインタ
  * @return なし
  */
-static void do_cmd_knowledge_kubi(player_type *creature_ptr)
+static void do_cmd_knowledge_bounty(player_type *creature_ptr)
 {
        /* Open a new file */
        FILE *fff;
@@ -6245,7 +6245,7 @@ static void do_cmd_knowledge_kubi(player_type *creature_ptr)
                fprintf(fff, _("賞金首リスト\n", "List of wanted monsters\n"));
                fprintf(fff, "----------------------------------------------\n");
 
-               for (int i = 0; i < MAX_KUBI; i++)
+               for (int i = 0; i < MAX_BOUNTY; i++)
                {
                        if (current_world_ptr->bounty_r_idx[i] <= 10000)
                        {
@@ -6988,7 +6988,7 @@ void do_cmd_knowledge(player_type *creature_ptr)
                        do_cmd_knowledge_kill_count();
                        break;
                case '6': /* wanted */
-                       if (!vanilla_town) do_cmd_knowledge_kubi(creature_ptr);
+                       if (!vanilla_town) do_cmd_knowledge_bounty(creature_ptr);
                        break;
                case '7': /* Pets */
                        do_cmd_knowledge_pets(creature_ptr);
index 345195e..25b0902 100644 (file)
@@ -1918,7 +1918,7 @@ static void rd_extra(player_type *creature_ptr)
        {
                determine_bounty_uniques();
 
-               for (i = 0; i < MAX_KUBI; i++)
+               for (i = 0; i < MAX_BOUNTY; i++)
                {
                        /* Is this bounty unique already dead? */
                        if (!r_info[current_world_ptr->bounty_r_idx[i]].max_num) current_world_ptr->bounty_r_idx[i] += 10000;
@@ -1926,7 +1926,7 @@ static void rd_extra(player_type *creature_ptr)
        }
        else
        {
-               for (i = 0; i < MAX_KUBI; i++)
+               for (i = 0; i < MAX_BOUNTY; i++)
                {
                        rd_s16b(&current_world_ptr->bounty_r_idx[i]);
                }
index 14166d0..5e5c50c 100644 (file)
@@ -1321,7 +1321,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
                }
                if ((r_ptr->flags1 & RF1_UNIQUE) && !(m_ptr->smart & SM_CLONED) && !vanilla_town)
                {
-                       for (i = 0; i < MAX_KUBI; i++)
+                       for (i = 0; i < MAX_BOUNTY; i++)
                        {
                                if ((current_world_ptr->bounty_r_idx[i] == m_ptr->r_idx) && !(m_ptr->mflag2 & MFLAG2_CHAMELEON))
                                {
index 29b9413..4d8c5e9 100644 (file)
@@ -524,7 +524,7 @@ bool object_is_potion(object_type *o_ptr)
  * @param o_ptr 対象のオブジェクト構造体ポインタ
  * @return オブジェクトが報酬対象になるならTRUEを返す
  */
-bool object_is_shoukinkubi(object_type *o_ptr)
+bool object_is_bounty(object_type *o_ptr)
 {
        int i;
 
@@ -541,9 +541,9 @@ bool object_is_shoukinkubi(object_type *o_ptr)
        if (o_ptr->pval == MON_TSUCHINOKO) return TRUE;
 
        /* Unique monster */
-       for (i = 0; i < MAX_KUBI; i++)
+       for (i = 0; i < MAX_BOUNTY; i++)
                if (o_ptr->pval == current_world_ptr->bounty_r_idx[i]) break;
-       if (i < MAX_KUBI) return TRUE;
+       if (i < MAX_BOUNTY) return TRUE;
 
        /* Not wanted */
        return FALSE;
index a1eb27a..8a449ad 100644 (file)
@@ -28,7 +28,7 @@ extern bool item_tester_high_level_book(object_type *o_ptr);
 extern bool item_tester_refill_lantern(object_type *o_ptr);
 
 extern bool object_is_potion(object_type *o_ptr);
-extern bool object_is_shoukinkubi(object_type *o_ptr);
+extern bool object_is_bounty(object_type *o_ptr);
 extern bool object_is_favorite(object_type *o_ptr);
 extern bool object_is_rare(object_type *o_ptr);
 extern bool object_is_weapon(object_type *o_ptr);
index 7a362d3..8e96052 100644 (file)
@@ -677,7 +677,7 @@ static void wr_extra(player_type *creature_ptr)
        }
        wr_s16b(creature_ptr->mane_num);
 
-       for (i = 0; i < MAX_KUBI; i++)
+       for (i = 0; i < MAX_BOUNTY; i++)
        {
                wr_s16b(current_world_ptr->bounty_r_idx[i]);
        }
index 6da7da0..16fe2a3 100644 (file)
@@ -1606,14 +1606,14 @@ static void print_monster_line(TERM_LEN x, TERM_LEN y, monster_type* m_ptr, int
        if(!r_ptr)return;
        //Number of 'U'nique
        if(r_ptr->flags1&RF1_UNIQUE){//unique
-               bool is_kubi = FALSE;
-               for(i=0;i<MAX_KUBI;i++){
+               bool is_bounty = FALSE;
+               for(i=0;i<MAX_BOUNTY;i++){
                        if(current_world_ptr->bounty_r_idx[i] == r_idx){
-                               is_kubi = TRUE;
+                               is_bounty = TRUE;
                                break;
                        }
                }
-               Term_addstr(-1, TERM_WHITE, is_kubi?"  W":"  U");
+               Term_addstr(-1, TERM_WHITE, is_bounty?"  W":"  U");
        }else{
                sprintf(buf, "%3d", n_same);
                Term_addstr(-1, TERM_WHITE, buf);
index 70211e0..f434456 100644 (file)
@@ -16,7 +16,7 @@ typedef struct {
 
        MONSTER_IDX timewalk_m_idx;     /*!< 現在時間停止を行っているモンスターのID */
 
-       MONRACE_IDX bounty_r_idx[MAX_KUBI];
+       MONRACE_IDX bounty_r_idx[MAX_BOUNTY];
 
        u32b play_time; /*!< 実プレイ時間 */