From 4d064e2e99a78cea8bed8feafb346c82b2bb9bb3 Mon Sep 17 00:00:00 2001 From: Deskull Date: Sun, 15 Oct 2017 21:46:28 +0900 Subject: [PATCH] =?utf8?q?#37287=20#37353=20(2.2.0.89)=20=E5=9E=8B?= =?utf8?q?=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=82=92=E7=B6=99=E7=B6=9A=E4=B8=AD?= =?utf8?q?=E3=80=82=20/=20Ongoing=20type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/externs.h | 10 +++++----- src/mind.c | 2 +- src/mspells2.c | 4 ++-- src/object1.c | 10 ++++++---- src/object2.c | 4 ++-- src/snipe.c | 2 +- src/spells1.c | 2 +- src/spells2.c | 12 +++++++----- src/spells3.c | 13 +++++++------ src/store.c | 12 +++++++----- src/wizard1.c | 16 ++++++++-------- 11 files changed, 47 insertions(+), 40 deletions(-) diff --git a/src/externs.h b/src/externs.h index 35f257686..38fcd8871 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1041,7 +1041,7 @@ extern bool object_similar(object_type *o_ptr, object_type *j_ptr); extern void object_absorb(object_type *o_ptr, object_type *j_ptr); extern IDX lookup_kind(OBJECT_TYPE_VALUE tval, OBJECT_SUBTYPE_VALUE sval); extern void object_wipe(object_type *o_ptr); -extern void object_prep(object_type *o_ptr, IDX k_idx); +extern void object_prep(object_type *o_ptr, OBJECT_IDX k_idx); extern void object_copy(object_type *o_ptr, object_type *j_ptr); extern void apply_magic(object_type *o_ptr, DEPTH lev, BIT_FLAGS mode); extern bool make_object(object_type *j_ptr, BIT_FLAGS mode); @@ -1182,8 +1182,8 @@ extern bool disarm_traps_touch(void); extern bool animate_dead(int who, int y, int x); extern bool sleep_monsters_touch(void); extern bool activate_ty_curse(bool stop_ty, int *count); -extern int activate_hi_summon(int y, int x, bool can_pet); -extern int summon_cyber(int who, int y, int x); +extern int activate_hi_summon(POSITION y, POSITION x, bool can_pet); +extern int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x); extern void wall_breaker(void); extern bool confuse_monsters(int dam); extern bool charm_monsters(int dam); @@ -1222,8 +1222,8 @@ extern void teleport_player_away(MONSTER_IDX m_idx, int dis); extern void teleport_player_to(POSITION ny, POSITION nx, u32b mode); extern void teleport_away_followable(MONSTER_IDX m_idx); extern void teleport_level(MONSTER_IDX m_idx); -extern IDX choose_dungeon(cptr note, int y, int x); -extern bool recall_player(int turns); +extern DUNGEON_IDX choose_dungeon(cptr note, POSITION y, POSITION x); +extern bool recall_player(TIME_EFFECT turns); extern bool word_of_recall(void); extern bool reset_recall(void); extern bool apply_disenchant(int mode); diff --git a/src/mind.c b/src/mind.c index 8ff9759c7..a249ee80a 100644 --- a/src/mind.c +++ b/src/mind.c @@ -677,7 +677,7 @@ void mindcraft_info(char *p, int use_mind, int power) */ static int get_mind_power(COMMAND_CODE *sn, bool only_browse) { - int i; + COMMAND_CODE i; int num = 0; int y = 1; int x = 10; diff --git a/src/mspells2.c b/src/mspells2.c index a404004cd..bdd6f8a46 100644 --- a/src/mspells2.c +++ b/src/mspells2.c @@ -88,8 +88,8 @@ static bool breath_direct(int y1, int x1, int y2, int x2, int rad, int typ, bool int grids = 0; POSITION gx[1024], gy[1024]; - byte gm[32]; - int gm_rad = rad; + POSITION gm[32]; + POSITION gm_rad = rad; bool hit2 = FALSE; bool hityou = FALSE; diff --git a/src/object1.c b/src/object1.c index 2e52f974e..a05a4e7a4 100644 --- a/src/object1.c +++ b/src/object1.c @@ -1858,7 +1858,8 @@ void display_equip(void) */ static bool get_tag(COMMAND_CODE *cp, char tag, int mode) { - int i, start, end; + COMMAND_CODE i; + int start, end; cptr s; /* Extract index from mode */ @@ -1983,7 +1984,7 @@ static bool get_tag(COMMAND_CODE *cp, char tag, int mode) */ static bool get_tag_floor(COMMAND_CODE *cp, char tag, int floor_list[], int floor_num) { - int i; + COMMAND_CODE i; cptr s; /**** Find a tag in the form of {@x#} (allow alphabet tag) ***/ @@ -2117,7 +2118,7 @@ static void prepare_label_string_floor(char *label, int floor_list[], int floor_ /* Move each label */ for (i = 0; i < 52; i++) { - int index; + COMMAND_CODE index; char c = alphabet_chars[i]; /* Find a tag with this label */ @@ -3766,7 +3767,8 @@ bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode) { char n1 = ' ', n2 = ' ', which = ' '; - int j, i1, i2; + int j; + COMMAND_CODE i1, i2; COMMAND_CODE e1, e2; COMMAND_CODE k; diff --git a/src/object2.c b/src/object2.c index 770a82388..74ee35d21 100644 --- a/src/object2.c +++ b/src/object2.c @@ -1933,7 +1933,7 @@ void object_copy(object_type *o_ptr, object_type *j_ptr) * @param k_idx 新たに作成したいベースアイテム情報のID * @return なし */ -void object_prep(object_type *o_ptr, IDX k_idx) +void object_prep(object_type *o_ptr, OBJECT_IDX k_idx) { object_kind *k_ptr = &k_info[k_idx]; @@ -7961,7 +7961,7 @@ static int choose_essence(void) { COMMAND_CODE mode = 0; char choice; - int menu_line = (use_menu ? 1 : 0); + COMMAND_CODE menu_line = (use_menu ? 1 : 0); #ifdef JP cptr menu_name[] = { diff --git a/src/snipe.c b/src/snipe.c index 462da5add..a5571707c 100644 --- a/src/snipe.c +++ b/src/snipe.c @@ -220,7 +220,7 @@ void display_snipe_list(void) * when you run it. It's probably easy to fix but I haven't tried,\n * sorry.\n */ -static int get_snipe_power(int *sn, bool only_browse) +static int get_snipe_power(COMMAND_CODE *sn, bool only_browse) { int i; int num = 0; diff --git a/src/spells1.c b/src/spells1.c index 513805c16..c1d1b49a7 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -7586,7 +7586,7 @@ bool project(int who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, int t ((cave[y][x].m_idx != p_ptr->riding) || !(flg & PROJECT_PLAYER)) && (!who || dist_hack > 1) && !one_in_(10)) { - byte t_y, t_x; + POSITION t_y, t_x; int max_attempts = 10; /* Choose 'new' target */ diff --git a/src/spells2.c b/src/spells2.c index 735322ffb..3277ab704 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -2194,7 +2194,8 @@ bool detect_objects_magic(POSITION range) */ bool detect_monsters_normal(POSITION range) { - int i, y, x; + MONSTER_IDX i; + POSITION y, x; bool flag = FALSE; @@ -2254,7 +2255,8 @@ bool detect_monsters_normal(POSITION range) */ bool detect_monsters_invis(POSITION range) { - int i, y, x; + MONSTER_IDX i; + POSITION y, x; bool flag = FALSE; if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3; @@ -5520,11 +5522,11 @@ bool activate_ty_curse(bool stop_ty, int *count) * @param can_pet プレイヤーのペットとなる可能性があるならばTRUEにする * @return 作用が実際にあった場合TRUEを返す */ -int activate_hi_summon(int y, int x, bool can_pet) +int activate_hi_summon(POSITION y, POSITION x, bool can_pet) { int i; int count = 0; - int summon_lev; + DEPTH summon_lev; u32b mode = PM_ALLOW_GROUP; bool pet = FALSE; @@ -5609,7 +5611,7 @@ int activate_hi_summon(int y, int x, bool can_pet) * @param x 召喚位置X座標 * @return 作用が実際にあった場合TRUEを返す */ -int summon_cyber(int who, int y, int x) +int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x) { int i; int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2)); diff --git a/src/spells3.c b/src/spells3.c index 05cb37b0c..9cac60482 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -833,15 +833,15 @@ void teleport_level(MONSTER_IDX m_idx) /*! - * @brief これまでに入ったダンジョンの一覧を表示する + * @brief これまでに入ったダンジョンの一覧を表示し、選択させる。 * @param note ダンジョンに施す処理記述 * @param y コンソールY座標 * @param x コンソールX座標 - * @return なし + * @return 選択されたダンジョンID */ -IDX choose_dungeon(cptr note, int y, int x) +DUNGEON_IDX choose_dungeon(cptr note, POSITION y, POSITION x) { - int select_dungeon; + DUNGEON_IDX select_dungeon; int i, num = 0; s16b *dun; @@ -919,7 +919,7 @@ IDX choose_dungeon(cptr note, int y, int x) * @param turns 発動までのターン数 * @return 常にTRUEを返す */ -bool recall_player(int turns) +bool recall_player(TIME_EFFECT turns) { /* * TODO: Recall the player to the last @@ -5159,7 +5159,8 @@ static IDX poly_r_idx(MONRACE_IDX r_idx) { monster_race *r_ptr = &r_info[r_idx]; - int i, r; + int i; + MONRACE_IDX r; DEPTH lev1, lev2; /* Hack -- Uniques/Questors never polymorph */ diff --git a/src/store.c b/src/store.c index 54007ab00..6784e9088 100644 --- a/src/store.c +++ b/src/store.c @@ -2081,7 +2081,9 @@ static void store_delete(void) */ static void store_create(void) { - int i, tries, level; + OBJECT_IDX i; + int tries; + DEPTH level; object_type forge; object_type *q_ptr; @@ -2654,7 +2656,7 @@ static int get_stock(COMMAND_CODE *com_val, cptr pmt, int i, int j) /* Ask until done */ while (TRUE) { - int k; + COMMAND_CODE k; /* Escape */ if (!get_com(out_val, &command, FALSE)) break; @@ -3431,7 +3433,7 @@ static bool sell_haggle(object_type *o_ptr, s32b *price) static void store_purchase(void) { int i, choice; - int item, item_new; + COMMAND_CODE item, item_new; ITEM_NUMBER amt; @@ -4289,7 +4291,7 @@ msg_format("%sを $%ldで売却しました。", o_name, (long)price); static void store_examine(void) { int i; - int item; + COMMAND_CODE item; object_type *o_ptr; char o_name[MAX_NLEN]; char out_val[160]; @@ -4391,7 +4393,7 @@ msg_print("特に変わったところはないようだ。"); static void museum_remove_object(void) { int i; - int item; + COMMAND_CODE item; object_type *o_ptr; char o_name[MAX_NLEN]; char out_val[160]; diff --git a/src/wizard1.c b/src/wizard1.c index 9a4ec04e2..8a0030905 100644 --- a/src/wizard1.c +++ b/src/wizard1.c @@ -234,7 +234,7 @@ static grouper group_item[] = * @param k ベースアイテムID * @return なし */ -static void kind_info(char *buf, char *dam, char *wgt, char *chance, DEPTH *lev, s32b *val, IDX k) +static void kind_info(char *buf, char *dam, char *wgt, char *chance, DEPTH *lev, PRICE *val, OBJECT_IDX k) { object_type forge; object_type *q_ptr; @@ -346,7 +346,7 @@ static void spoil_obj_desc(cptr fname) { int i, k, s, t, n = 0, group_start = 0; - u16b who[200]; + OBJECT_IDX who[200]; char buf[1024]; @@ -398,11 +398,11 @@ static void spoil_obj_desc(cptr fname) int i1 = t; int i2 = t + 1; - int e1; - int e2; + DEPTH e1; + DEPTH e2; - DEPTH t1; - DEPTH t2; + PRICE t1; + PRICE t2; kind_info(NULL, NULL, NULL, NULL, &e1, &t1, who[i1]); kind_info(NULL, NULL, NULL, NULL, &e2, &t2, who[i2]); @@ -421,8 +421,8 @@ static void spoil_obj_desc(cptr fname) /* Spoil each item */ for (s = 0; s < n; s++) { - int e; - DEPTH v; + DEPTH e; + PRICE v; /* Describe the kind */ kind_info(buf, dam, wgt, chance, &e, &v, who[s]); -- 2.11.0