• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

変愚蛮怒のメインリポジトリです


コミットメタ情報

リビジョン1c750bbc037ebf3dfd1f1ff6f3f511530070c241 (tree)
日時2017-12-11 22:35:16
作者Deskull <desull@user...>
コミッターDeskull

ログメッセージ

#37287 #37353 (2.2.0.89) PET_COMMAND_IDX, FF_FLAGS_IDX型を定義し、型の置換を継続中。 / Define PET_COMMAND_IDX, FF_FLAGS_IDX ongoing type replacement.

変更サマリ

差分

--- a/src/cmd5.c
+++ b/src/cmd5.c
@@ -2217,7 +2217,7 @@ void do_cmd_pet(void)
22172217 int pet_ctr;
22182218 monster_type *m_ptr;
22192219
2220- BIT_FLAGS mode = 0;
2220+ PET_COMMAND_IDX mode = 0;
22212221
22222222 char buf[160];
22232223 char target_buf[160];
@@ -2474,7 +2474,7 @@ void do_cmd_pet(void)
24742474 if (!redraw || use_menu)
24752475 {
24762476 byte y = 1, x = 0;
2477- int ctr = 0;
2477+ PET_COMMAND_IDX ctr = 0;
24782478
24792479 /* Show list */
24802480 redraw = TRUE;
--- a/src/h-type.h
+++ b/src/h-type.h
@@ -235,8 +235,10 @@ typedef int EFFECT_ID; /*!< 効果属性ID */
235235 typedef s16b QUEST_TYPE; /*!< クエストの種別ID */
236236 typedef s16b QUEST_STATUS; /*!< クエストの状態ID */
237237
238-typedef s16b ACTION_SKILL_POWER; /*!< 行動技能値 */
238+typedef s16b ACTION_SKILL_POWER; /*!< 行動技能値 */
239239
240+typedef int PET_COMMAND_IDX; /*!< ペットへの指示ID */
241+typedef byte FF_FLAGS_IDX; /*!< 地形特性ID */
240242
241243 /*** Pointers to all the basic types defined above ***/
242244
--- a/src/init1.c
+++ b/src/init1.c
@@ -1603,7 +1603,7 @@ static errr grab_one_feat_flag(feature_type *f_ptr, cptr what)
16031603 */
16041604 static errr grab_one_feat_action(feature_type *f_ptr, cptr what, int count)
16051605 {
1606- int i;
1606+ FF_FLAGS_IDX i;
16071607
16081608 /* Check flags */
16091609 for (i = 0; i < FF_FLAG_MAX; i++)
--- a/src/main-win.c
+++ b/src/main-win.c
@@ -1314,7 +1314,7 @@ static void load_prefs_aux(int i)
13141314 /* Window size */
13151315 if (i == 0)
13161316 {
1317- win_maximized = GetPrivateProfileInt(sec_name, "Maximized", win_maximized, ini_file);
1317+ win_maximized = (GetPrivateProfileInt(sec_name, "Maximized", win_maximized, ini_file) != 0);
13181318 }
13191319
13201320 /* Window position */
@@ -1326,7 +1326,7 @@ static void load_prefs_aux(int i)
13261326 /* Window Z position */
13271327 if (i > 0)
13281328 {
1329- td->posfix = GetPrivateProfileInt(sec_name, "PositionFix", td->posfix, ini_file);
1329+ td->posfix = (GetPrivateProfileInt(sec_name, "PositionFix", td->posfix, ini_file) != 0);
13301330 }
13311331 }
13321332
@@ -1339,10 +1339,10 @@ static void load_prefs(void)
13391339 int i;
13401340
13411341 /* Extract the "arg_graphics" flag */
1342- arg_graphics = GetPrivateProfileInt("Angband", "Graphics", GRAPHICS_NONE, ini_file);
1342+ arg_graphics = (byte_hack)GetPrivateProfileInt("Angband", "Graphics", GRAPHICS_NONE, ini_file);
13431343
13441344 /* Extract the "arg_bigtile" flag */
1345- arg_bigtile = GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file);
1345+ arg_bigtile = (GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file) != 0);
13461346 use_bigtile = arg_bigtile;
13471347
13481348 /* Extract the "arg_sound" flag */
--- a/src/types.h
+++ b/src/types.h
@@ -52,7 +52,7 @@ typedef struct feature_state feature_state;
5252
5353 struct feature_state
5454 {
55- byte action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */
55+ FF_FLAGS_IDX action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */
5656 STR_OFFSET result_tag; /*!< 変化先ID / Result (f_info ID) */
5757 FEAT_IDX result; /*!< 変化先ID / Result (f_info ID) */
5858 };
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -2722,8 +2722,7 @@ static void ang_sort_swap_distance(vptr u, vptr v, int a, int b)
27222722 */
27232723 static POSITION_IDX target_pick(POSITION y1, POSITION x1, POSITION dy, POSITION dx)
27242724 {
2725- POSITION_IDX i;
2726- int v;
2725+ POSITION_IDX i, v;
27272726 POSITION x2, y2, x3, y3, x4, y4;
27282727 POSITION_IDX b_i = -1, b_v = 9999;
27292728
@@ -2997,7 +2996,7 @@ bool show_gold_on_floor = FALSE;
29972996 *
29982997 * This function must handle blindness/hallucination.
29992998 */
3000-static int target_set_aux(int y, int x, BIT_FLAGS mode, cptr info)
2999+static char target_set_aux(POSITION y, POSITION x, BIT_FLAGS mode, cptr info)
30013000 {
30023001 cave_type *c_ptr = &cave[y][x];
30033002 s16b this_o_idx, next_o_idx = 0;
@@ -3005,7 +3004,7 @@ static int target_set_aux(int y, int x, BIT_FLAGS mode, cptr info)
30053004 bool boring = TRUE;
30063005 s16b feat;
30073006 feature_type *f_ptr;
3008- int query = '\001';
3007+ char query = '\001';
30093008 char out_val[MAX_NLEN+80];
30103009
30113010 #ifdef ALLOW_EASY_FLOOR
旧リポジトリブラウザで表示