OSDN Git Service

[Refactor] #37353 型の置換(QUEST_IDX) / Type replacement.
[hengband/hengband.git] / src / cmd4.c
index 2042419..9d67df2 100644 (file)
@@ -44,6 +44,7 @@
 #include "world.h"
 #include "player-status.h"
 #include "sort.h"
+#include "mutation.h"
 
 
 /*
@@ -386,7 +387,7 @@ errr do_cmd_write_nikki(int type, int num, concptr note)
            type == NIKKI_RAND_QUEST_F ||
            type == NIKKI_TO_QUEST)
        {
-               IDX old_quest;
+               QUEST_IDX old_quest;
 
                old_quest = p_ptr->inside_quest;
                p_ptr->inside_quest = (quest[num].type == QUEST_TYPE_RANDOM) ? 0 : num;
@@ -3218,7 +3219,7 @@ void do_cmd_visuals(void)
                case '4':
                {
                        static concptr choice_msg = _("モンスターの[色/文字]を変更します", "Change monster attr/chars");
-                       static IDX r = 0;
+                       static MONRACE_IDX r = 0;
 
                        prt(format(_("コマンド: %s", "Command: %s"), choice_msg), 15, 0);
 
@@ -4372,10 +4373,10 @@ static byte object_group_tval[] =
  * mode & 0x01 : check for non-empty group
  * mode & 0x02 : visual operation only
  */
-static int collect_objects(int grp_cur, IDX object_idx[], BIT_FLAGS8 mode)
+static KIND_OBJECT_IDX collect_objects(int grp_cur, KIND_OBJECT_IDX object_idx[], BIT_FLAGS8 mode)
 {
-       IDX i;
-       int j, k, object_cnt = 0;
+       KIND_OBJECT_IDX i, object_cnt = 0;
+       int j, k;
 
        /* Get a list of x_char in this group */
        byte group_tval = object_group_tval[grp_cur];
@@ -4455,10 +4456,10 @@ static concptr feature_group_text[] =
  *
  * mode & 0x01 : check for non-empty group
  */
-static int collect_features(int grp_cur, IDX *feat_idx, BIT_FLAGS8 mode)
+static FEAT_IDX collect_features(int grp_cur, FEAT_IDX *feat_idx, BIT_FLAGS8 mode)
 {
-       IDX i;
-       int feat_cnt = 0;
+       FEAT_IDX i;
+       FEAT_IDX feat_cnt = 0;
 
        /* Unused;  There is a single group. */
        (void)grp_cur;
@@ -5503,7 +5504,8 @@ static void do_cmd_knowledge_uniques(void)
  */
 static void do_cmd_knowledge_weapon_exp(void)
 {
-       int i, num, weapon_exp;
+       int i, num;
+       SUB_EXP weapon_exp;
        KIND_OBJECT_IDX j;
 
        FILE *fff;
@@ -5562,7 +5564,8 @@ static void do_cmd_knowledge_weapon_exp(void)
 static void do_cmd_knowledge_spell_exp(void)
 {
        SPELL_IDX i = 0;
-       int spell_exp, exp_level;
+       SUB_EXP spell_exp;
+       int exp_level;
 
        FILE *fff;
        const magic_type *s_ptr;
@@ -6361,8 +6364,8 @@ static bool visual_mode_command(char ch, bool *visual_list_ptr,
                {
                        int eff_width;
                        int d = get_keymap_dir(ch);
-                       byte a = (*cur_attr_ptr & 0x7f);
-                       byte c = *cur_char_ptr;
+                       TERM_COLOR a = (*cur_attr_ptr & 0x7f);
+                       SYMBOL_CODE c = *cur_char_ptr;
 
                        if (use_bigtile) eff_width = width / 2;
                        else eff_width = width;
@@ -7581,9 +7584,8 @@ static void do_cmd_knowledge_virtues(void)
 }
 
 /*
-* Dungeon
-*
-*/
+ * Dungeon
+ */
 static void do_cmd_knowledge_dungeon(void)
 {
        FILE *fff;
@@ -7682,7 +7684,7 @@ static void do_cmd_knowledge_quests_current(FILE *fff)
        char rand_tmp_str[120] = "\0";
        GAME_TEXT name[MAX_NLEN];
        monster_race *r_ptr;
-       IDX i;
+       QUEST_IDX i;
        int rand_level = 100;
        int total = 0;
 
@@ -7695,7 +7697,7 @@ static void do_cmd_knowledge_quests_current(FILE *fff)
                        (quest[i].status == QUEST_STATUS_COMPLETED))
                {
                        /* Set the quest number temporary */
-                       IDX old_quest = p_ptr->inside_quest;
+                       QUEST_IDX old_quest = p_ptr->inside_quest;
                        int j;
 
                        /* Clear the text */
@@ -8060,7 +8062,7 @@ static void do_cmd_knowledge_quests(void)
        fd_kill(file_name);
 
        /* Free Memory */
-       C_KILL(quest_num, max_q_idx, IDX);
+       C_KILL(quest_num, max_q_idx, QUEST_IDX);
 }