リビジョン | 1c750bbc037ebf3dfd1f1ff6f3f511530070c241 (tree) |
---|---|
日時 | 2017-12-11 22:35:16 |
作者 | Deskull <desull@user...> |
コミッター | Deskull |
@@ -2217,7 +2217,7 @@ void do_cmd_pet(void) | ||
2217 | 2217 | int pet_ctr; |
2218 | 2218 | monster_type *m_ptr; |
2219 | 2219 | |
2220 | - BIT_FLAGS mode = 0; | |
2220 | + PET_COMMAND_IDX mode = 0; | |
2221 | 2221 | |
2222 | 2222 | char buf[160]; |
2223 | 2223 | char target_buf[160]; |
@@ -2474,7 +2474,7 @@ void do_cmd_pet(void) | ||
2474 | 2474 | if (!redraw || use_menu) |
2475 | 2475 | { |
2476 | 2476 | byte y = 1, x = 0; |
2477 | - int ctr = 0; | |
2477 | + PET_COMMAND_IDX ctr = 0; | |
2478 | 2478 | |
2479 | 2479 | /* Show list */ |
2480 | 2480 | redraw = TRUE; |
@@ -235,8 +235,10 @@ typedef int EFFECT_ID; /*!< 効果属性ID */ | ||
235 | 235 | typedef s16b QUEST_TYPE; /*!< クエストの種別ID */ |
236 | 236 | typedef s16b QUEST_STATUS; /*!< クエストの状態ID */ |
237 | 237 | |
238 | -typedef s16b ACTION_SKILL_POWER; /*!< 行動技能値 */ | |
238 | +typedef s16b ACTION_SKILL_POWER; /*!< 行動技能値 */ | |
239 | 239 | |
240 | +typedef int PET_COMMAND_IDX; /*!< ペットへの指示ID */ | |
241 | +typedef byte FF_FLAGS_IDX; /*!< 地形特性ID */ | |
240 | 242 | |
241 | 243 | /*** Pointers to all the basic types defined above ***/ |
242 | 244 |
@@ -1603,7 +1603,7 @@ static errr grab_one_feat_flag(feature_type *f_ptr, cptr what) | ||
1603 | 1603 | */ |
1604 | 1604 | static errr grab_one_feat_action(feature_type *f_ptr, cptr what, int count) |
1605 | 1605 | { |
1606 | - int i; | |
1606 | + FF_FLAGS_IDX i; | |
1607 | 1607 | |
1608 | 1608 | /* Check flags */ |
1609 | 1609 | for (i = 0; i < FF_FLAG_MAX; i++) |
@@ -1314,7 +1314,7 @@ static void load_prefs_aux(int i) | ||
1314 | 1314 | /* Window size */ |
1315 | 1315 | if (i == 0) |
1316 | 1316 | { |
1317 | - win_maximized = GetPrivateProfileInt(sec_name, "Maximized", win_maximized, ini_file); | |
1317 | + win_maximized = (GetPrivateProfileInt(sec_name, "Maximized", win_maximized, ini_file) != 0); | |
1318 | 1318 | } |
1319 | 1319 | |
1320 | 1320 | /* Window position */ |
@@ -1326,7 +1326,7 @@ static void load_prefs_aux(int i) | ||
1326 | 1326 | /* Window Z position */ |
1327 | 1327 | if (i > 0) |
1328 | 1328 | { |
1329 | - td->posfix = GetPrivateProfileInt(sec_name, "PositionFix", td->posfix, ini_file); | |
1329 | + td->posfix = (GetPrivateProfileInt(sec_name, "PositionFix", td->posfix, ini_file) != 0); | |
1330 | 1330 | } |
1331 | 1331 | } |
1332 | 1332 |
@@ -1339,10 +1339,10 @@ static void load_prefs(void) | ||
1339 | 1339 | int i; |
1340 | 1340 | |
1341 | 1341 | /* 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); | |
1343 | 1343 | |
1344 | 1344 | /* Extract the "arg_bigtile" flag */ |
1345 | - arg_bigtile = GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file); | |
1345 | + arg_bigtile = (GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file) != 0); | |
1346 | 1346 | use_bigtile = arg_bigtile; |
1347 | 1347 | |
1348 | 1348 | /* Extract the "arg_sound" flag */ |
@@ -52,7 +52,7 @@ typedef struct feature_state feature_state; | ||
52 | 52 | |
53 | 53 | struct feature_state |
54 | 54 | { |
55 | - byte action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */ | |
55 | + FF_FLAGS_IDX action; /*!< 変化条件をFF_*のIDで指定 / Action (FF_*) */ | |
56 | 56 | STR_OFFSET result_tag; /*!< 変化先ID / Result (f_info ID) */ |
57 | 57 | FEAT_IDX result; /*!< 変化先ID / Result (f_info ID) */ |
58 | 58 | }; |
@@ -2722,8 +2722,7 @@ static void ang_sort_swap_distance(vptr u, vptr v, int a, int b) | ||
2722 | 2722 | */ |
2723 | 2723 | static POSITION_IDX target_pick(POSITION y1, POSITION x1, POSITION dy, POSITION dx) |
2724 | 2724 | { |
2725 | - POSITION_IDX i; | |
2726 | - int v; | |
2725 | + POSITION_IDX i, v; | |
2727 | 2726 | POSITION x2, y2, x3, y3, x4, y4; |
2728 | 2727 | POSITION_IDX b_i = -1, b_v = 9999; |
2729 | 2728 |
@@ -2997,7 +2996,7 @@ bool show_gold_on_floor = FALSE; | ||
2997 | 2996 | * |
2998 | 2997 | * This function must handle blindness/hallucination. |
2999 | 2998 | */ |
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) | |
3001 | 3000 | { |
3002 | 3001 | cave_type *c_ptr = &cave[y][x]; |
3003 | 3002 | 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) | ||
3005 | 3004 | bool boring = TRUE; |
3006 | 3005 | s16b feat; |
3007 | 3006 | feature_type *f_ptr; |
3008 | - int query = '\001'; | |
3007 | + char query = '\001'; | |
3009 | 3008 | char out_val[MAX_NLEN+80]; |
3010 | 3009 | |
3011 | 3010 | #ifdef ALLOW_EASY_FLOOR |