From: Deskull Date: Tue, 12 Dec 2017 16:02:50 +0000 (+0900) Subject: #37287 #37353 (2.2.0.89) BACT_IDX, BACT_RESTRICT_IDX 型を定義し、型の置換を継続中。LNK4075を修正。 ... X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=6cf96c6b1c3341ee94382b482f969b4b7f9d5858 #37287 #37353 (2.2.0.89) BACT_IDX, BACT_RESTRICT_IDX 型を定義し、型の置換を継続中。LNK4075を修正。 / Define BACT_IDX, BACT_RESTRICT_IDX ongoing type replacement. Fix LNK4075. --- diff --git a/Hengband_vcs2015/Hengband/Hengband.vcxproj b/Hengband_vcs2015/Hengband/Hengband.vcxproj index 3b2598e9b..54bb81811 100644 --- a/Hengband_vcs2015/Hengband/Hengband.vcxproj +++ b/Hengband_vcs2015/Hengband/Hengband.vcxproj @@ -1,5 +1,17 @@  - + + + StaticLibrary + true + v120 + Unicode + + + StaticLibrary + false + v120 + Unicode + Debug diff --git a/src/bldg.c b/src/bldg.c index 094b425cb..c5bc79bab 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -4293,8 +4293,8 @@ static bool research_mon(void) */ static void bldg_process_command(building_type *bldg, int i) { - int bact = bldg->actions[i]; - int bcost; + BACT_IDX bact = bldg->actions[i]; + PRICE bcost; bool paid = FALSE; int amt; diff --git a/src/h-type.h b/src/h-type.h index f5139dbb1..4dd057604 100644 --- a/src/h-type.h +++ b/src/h-type.h @@ -113,6 +113,8 @@ typedef s16b CLASS_IDX; /*!< ゲーム中のプレイヤー職業ID型を定 typedef s16b MIMIC_RACE_IDX; /*!< ゲーム中のプレイヤー変身種族ID型を定義 */ typedef s16b PATRON_IDX; /*!< ゲーム中のプレイヤーパトロンID型を定義 */ typedef s32b ACTION_IDX; /*!< プレイヤーが現在取っている常時行動のID定義 */ +typedef s16b BACT_IDX; /*!< 町の施設処理のID定義 */ +typedef s16b BACT_RESTRICT_IDX; /*!< 町の施設処理の規制処理ID定義 */ typedef s16b MONRACE_IDX; /*!< ゲーム中のモンスター種族ID型を定義 */ typedef s16b MONSTER_IDX; /*!< ゲーム中のモンスター個体ID型を定義 */ diff --git a/src/init1.c b/src/init1.c index 306068dde..998e18845 100644 --- a/src/init1.c +++ b/src/init1.c @@ -3864,10 +3864,10 @@ static errr parse_line_building(char *buf) building[index].letters[action_index] = zz[4][0]; /* Action code */ - building[index].actions[action_index] = atoi(zz[5]); + building[index].actions[action_index] = (BACT_IDX)atoi(zz[5]); /* Action restriction */ - building[index].action_restr[action_index] = atoi(zz[6]); + building[index].action_restr[action_index] = (BACT_RESTRICT_IDX)atoi(zz[6]); break; } diff --git a/src/types.h b/src/types.h index 54b18de33..4fa714c63 100644 --- a/src/types.h +++ b/src/types.h @@ -1463,8 +1463,8 @@ struct building_type PRICE member_costs[8]; /* Costs for class members of building */ PRICE other_costs[8]; /* Costs for nonguild members */ char letters[8]; /* action letters */ - s16b actions[8]; /* action codes */ - s16b action_restr[8]; /* action restrictions */ + BACT_IDX actions[8]; /* action codes */ + BACT_RESTRICT_IDX action_restr[8]; /* action restrictions */ CLASS_IDX member_class[MAX_CLASS]; /* which classes are part of guild */ RACE_IDX member_race[MAX_RACES]; /* which classes are part of guild */ diff --git a/src/wizard2.c b/src/wizard2.c index 3068fed6c..df0595fca 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -1539,9 +1539,8 @@ static void do_cmd_wiz_jump(void) if (command_arg <= 0) { char ppp[80]; - char tmp_val[160]; - int tmp_dungeon_type; + DUNGEON_IDX tmp_dungeon_type; /* Prompt */ sprintf(ppp, "Jump which dungeon : "); @@ -1552,7 +1551,7 @@ static void do_cmd_wiz_jump(void) /* Ask for a level */ if (!get_string(ppp, tmp_val, 2)) return; - tmp_dungeon_type = atoi(tmp_val); + tmp_dungeon_type = (DUNGEON_IDX)atoi(tmp_val); if (!d_info[tmp_dungeon_type].maxdepth || (tmp_dungeon_type > max_d_idx)) tmp_dungeon_type = DUNGEON_ANGBAND; /* Prompt */ @@ -1566,9 +1565,9 @@ static void do_cmd_wiz_jump(void) if (!get_string(ppp, tmp_val, 10)) return; /* Extract request */ - command_arg = (s16b)atoi(tmp_val); + command_arg = (COMMAND_ARG)atoi(tmp_val); - dungeon_type = (byte_hack)tmp_dungeon_type; + dungeon_type = tmp_dungeon_type; } /* Paranoia */