From: Deskull Date: Tue, 3 Oct 2017 12:42:55 +0000 (+0900) Subject: #37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=df8c3bce46b4a0a765cbcc45be90a578fe2f666d;p=hengband%2Fhengband.git #37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement. --- diff --git a/src/cmd4.c b/src/cmd4.c index c53358db8..4bd96bbd5 100644 --- a/src/cmd4.c +++ b/src/cmd4.c @@ -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; diff --git a/src/cmd5.c b/src/cmd5.c index 18e30e150..43273631d 100644 --- a/src/cmd5.c +++ b/src/cmd5.c @@ -64,7 +64,7 @@ bool select_the_force = FALSE; * The "known" should be TRUE for cast/pray, FALSE for study * */ -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); diff --git a/src/externs.h b/src/externs.h index 08ae248c0..33c92fe15 100644 --- a/src/externs.h +++ b/src/externs.h @@ -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); diff --git a/src/h-type.h b/src/h-type.h index 7a5f89bec..839bebdf5 100644 --- a/src/h-type.h +++ b/src/h-type.h @@ -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 ***/ diff --git a/src/spells3.c b/src/spells3.c index a7485d938..491b42880 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -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; diff --git a/src/types.h b/src/types.h index 91d1c322d..aa643c885 100644 --- a/src/types.h +++ b/src/types.h @@ -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 */