OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
authorDeskull <desull@users.sourceforge.jp>
Tue, 3 Oct 2017 12:42:55 +0000 (21:42 +0900)
committerDeskull <desull@users.sourceforge.jp>
Tue, 3 Oct 2017 12:42:55 +0000 (21:42 +0900)
src/cmd4.c
src/cmd5.c
src/externs.h
src/h-type.h
src/spells3.c
src/types.h

index c53358d..4bd96bb 100644 (file)
@@ -3144,7 +3144,7 @@ static void print_visuals_menu(cptr choice_msg)
 
 static void do_cmd_knowledge_monsters(bool *need_redraw, bool visual_only, IDX direct_r_idx);
 static void do_cmd_knowledge_objects(bool *need_redraw, bool visual_only, IDX direct_k_idx);
-static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f_idx, int *lighting_level);
+static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f_idx, IDX *lighting_level);
 
 /*
  * Interact with "visuals"
@@ -3691,7 +3691,7 @@ void do_cmd_visuals(void)
                /* Modify feature attr/chars (visual mode) */
                case '9':
                {
-                       int lighting_level = F_LIT_STANDARD;
+                       IDX lighting_level = F_LIT_STANDARD;
                        do_cmd_knowledge_features(&need_redraw, TRUE, -1, &lighting_level);
                        break;
                }
@@ -4314,10 +4314,10 @@ static bool ang_sort_comp_monster_level(vptr u, vptr v, int a, int b)
  * mode & 0x01 : check for non-empty group
  * mode & 0x02 : visual operation only
  */
-static int collect_monsters(IDX grp_cur, IDX mon_idx[], BIT_FLAGS8 mode)
+static IDX collect_monsters(IDX grp_cur, IDX mon_idx[], BIT_FLAGS8 mode)
 {
        IDX i;
-       int mon_cnt = 0;
+       IDX mon_cnt = 0;
        int dummy_why;
 
        /* Get a list of x_char in this group */
@@ -7457,7 +7457,7 @@ static void display_feature_list(int col, int row, int per_page, IDX *feat_idx,
 /*
  * Interact with feature visuals.
  */
-static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f_idx, int *lighting_level)
+static void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f_idx, IDX *lighting_level)
 {
        IDX i;
        int len, max;
@@ -8678,7 +8678,7 @@ void do_cmd_knowledge(void)
                        break;
                case '0': /* Feature list */
                        {
-                               int lighting_level = F_LIT_STANDARD;
+                               IDX lighting_level = F_LIT_STANDARD;
                                do_cmd_knowledge_features(&need_redraw, FALSE, -1, &lighting_level);
                        }
                        break;
index 18e30e1..4327363 100644 (file)
@@ -64,7 +64,7 @@ bool select_the_force = FALSE;
  * The "known" should be TRUE for cast/pray, FALSE for study
  * </pre>
  */
-static int get_spell(int *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, int use_realm)
+static int get_spell(SPELL_IDX *sn, cptr prompt, OBJECT_SUBTYPE_VALUE sval, bool learned, int use_realm)
 {
        int         i;
        int         spell = -1;
@@ -470,8 +470,8 @@ void do_cmd_browse(void)
        int             spell = -1;
        int             num = 0;
 
-       byte            spells[64];
-       char            temp[62*4];
+       int             spells[64];
+       char    temp[62*4];
 
        object_type     *o_ptr;
 
@@ -654,12 +654,13 @@ static void change_realm2(CHARACTER_IDX next_realm)
  */
 void do_cmd_study(void)
 {
-       int     i, item, sval;
+       int     i, item;
+       OBJECT_SUBTYPE_VALUE sval;
        int     increment = 0;
        bool    learned = FALSE;
 
        /* Spells of realm2 will have an increment of +32 */
-       int     spell = -1;
+       SPELL_IDX spell = -1;
 
        cptr p = spell_category_name(mp_ptr->spell_book);
 
index 08ae248..33c92fe 100644 (file)
@@ -1259,7 +1259,7 @@ extern int mod_spell_chance_1(int chance);
 extern int mod_spell_chance_2(int chance);
 extern s16b spell_chance(int spell,int realm);
 extern bool spell_okay(int spell, bool learned, bool study_pray, int realm);
-extern void print_spells(int target_spell, byte *spells, int num, int y, int x, int realm);
+extern void print_spells(int target_spell, int *spells, int num, TERM_POSITION y, TERM_POSITION x, int realm);
 extern bool hates_acid(object_type *o_ptr);
 extern bool hates_elec(object_type *o_ptr);
 extern bool hates_fire(object_type *o_ptr);
index 7a5f89b..839bebd 100644 (file)
@@ -150,8 +150,10 @@ typedef int TERM_POSITION;   /*!< コンソール表示座標の型定義 */
 typedef byte SYMBOL_COLOR;    /*!< キャラの色の型定義 */
 typedef byte SYMBOL_CODE;     /*!< キャラの文字の型定義 */
 
-typedef s32b MAGIC_NUM1; /*!< プレイヤーの汎用魔法情報配列1の型定義*/
-typedef byte MAGIC_NUM2; /*!< プレイヤーの汎用魔法情報配列2の型定義*/
+typedef s32b MAGIC_NUM1;   /*!< プレイヤーの汎用魔法情報配列1の型定義*/
+typedef byte MAGIC_NUM2;   /*!< プレイヤーの汎用魔法情報配列2の型定義*/
+
+typedef s32b SPELL_IDX;    /*!< 各魔法領域/職業能力ごとの呪文ID型定義 */
 
 /*** Pointers to all the basic types defined above ***/
 
index a7485d9..491b428 100644 (file)
@@ -4113,7 +4113,7 @@ bool spell_okay(int spell, bool learned, bool study_pray, int use_realm)
  * @param use_realm 魔法領域ID
  * @return なし
  */
-void print_spells(int target_spell, int *spells, int num, int y, int x, int use_realm)
+void print_spells(int target_spell, int *spells, int num, TERM_POSITION y, TERM_POSITION x, int use_realm)
 {
        int             i, spell, exp_level, increment = 64;
        const magic_type *s_ptr;
index 91d1c32..aa643c8 100644 (file)
@@ -1099,7 +1099,7 @@ struct player_type
        BIT_FLAGS spell_worked2;          /* bit mask of spells tried and worked */
        BIT_FLAGS spell_forgotten1;       /* bit mask of spells learned but forgotten */
        BIT_FLAGS spell_forgotten2;       /* bit mask of spells learned but forgotten */
-       byte spell_order[64];     /* order spells learned/remembered/forgotten */
+       SPELL_IDX spell_order[64];  /* order spells learned/remembered/forgotten */
 
        SUB_EXP spell_exp[64];        /* Proficiency of spells */
        SUB_EXP weapon_exp[5][64];    /* Proficiency of weapons */