変愚蛮怒のメインリポジトリです
Revision | 141b95346462d722bdeaaeee16533f3039b02f7d (tree) |
---|---|
Zeit | 2017-09-12 21:41:18 |
Autor | Deskull <desull@user...> |
Commiter | Deskull |
前回は(2.2.0.86)のミス。
#37287 (2.2.0.87) wizard1.c, wizard2.c 中のVCコンパイラ警告を修正。 / Fix warnings of VC compiler in wizard1.c and wizard2.c.
@@ -53,7 +53,7 @@ | ||
53 | 53 | #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */ |
54 | 54 | #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */ |
55 | 55 | #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */ |
56 | -#define FAKE_VER_EXTRA 86 /*!< ゲームのバージョン番号定義(エクストラ番号) */ | |
56 | +#define FAKE_VER_EXTRA 87 /*!< ゲームのバージョン番号定義(エクストラ番号) */ | |
57 | 57 | |
58 | 58 | |
59 | 59 | /*! |
@@ -409,7 +409,7 @@ static void spoil_obj_desc(cptr fname) | ||
409 | 409 | |
410 | 410 | if ((t1 > t2) || ((t1 == t2) && (e1 > e2))) |
411 | 411 | { |
412 | - int tmp = who[i1]; | |
412 | + u16b tmp = who[i1]; | |
413 | 413 | who[i1] = who[i2]; |
414 | 414 | who[i2] = tmp; |
415 | 415 | } |
@@ -455,7 +455,7 @@ static void spoil_obj_desc(cptr fname) | ||
455 | 455 | if (k_ptr->gen_flags & (TRG_INSTA_ART)) continue; |
456 | 456 | |
457 | 457 | /* Save the index */ |
458 | - who[n++] = k; | |
458 | + who[n++] = (u16b)k; | |
459 | 459 | } |
460 | 460 | } |
461 | 461 |
@@ -1655,7 +1655,7 @@ static bool make_fake_artifact(object_type *o_ptr, int name1) | ||
1655 | 1655 | object_prep(o_ptr, i); |
1656 | 1656 | |
1657 | 1657 | /* Save the name */ |
1658 | - o_ptr->name1 = name1; | |
1658 | + o_ptr->name1 = (byte_hack)name1; | |
1659 | 1659 | |
1660 | 1660 | /* Extract the fields */ |
1661 | 1661 | o_ptr->pval = a_ptr->pval; |
@@ -1817,7 +1817,7 @@ static void spoil_mon_desc(cptr fname) | ||
1817 | 1817 | monster_race *r_ptr = &r_info[i]; |
1818 | 1818 | |
1819 | 1819 | /* Use that monster */ |
1820 | - if (r_ptr->name) who[n++] = i; | |
1820 | + if (r_ptr->name) who[n++] = (s16b)i; | |
1821 | 1821 | } |
1822 | 1822 | |
1823 | 1823 | /* Select the sort method */ |
@@ -2154,7 +2154,7 @@ static void spoil_mon_info(cptr fname) | ||
2154 | 2154 | monster_race *r_ptr = &r_info[i]; |
2155 | 2155 | |
2156 | 2156 | /* Use that monster */ |
2157 | - if (r_ptr->name) who[n++] = i; | |
2157 | + if (r_ptr->name) who[n++] = (s16b)i; | |
2158 | 2158 | } |
2159 | 2159 | |
2160 | 2160 | /* Select the sort method */ |
@@ -120,10 +120,10 @@ static bool set_gametime(void) | ||
120 | 120 | char ppp[80], tmp_val[40]; |
121 | 121 | |
122 | 122 | /* Prompt */ |
123 | - sprintf(ppp, "Dungeon Turn (0-%d): ", dungeon_turn_limit); | |
123 | + sprintf(ppp, "Dungeon Turn (0-%ld): ", dungeon_turn_limit); | |
124 | 124 | |
125 | 125 | /* Default */ |
126 | - sprintf(tmp_val, "%d", dungeon_turn); | |
126 | + sprintf(tmp_val, "%ld", dungeon_turn); | |
127 | 127 | |
128 | 128 | /* Query */ |
129 | 129 | if (!get_string(ppp, tmp_val, 10)) return (FALSE); |
@@ -349,7 +349,7 @@ static void do_cmd_wiz_reset_class(void) | ||
349 | 349 | if (tmp_int < 0 || tmp_int >= MAX_CLASS) return; |
350 | 350 | |
351 | 351 | /* Save it */ |
352 | - p_ptr->pclass = tmp_int; | |
352 | + p_ptr->pclass = (byte_hack)tmp_int; | |
353 | 353 | |
354 | 354 | /* Redraw inscription */ |
355 | 355 | p_ptr->window |= (PW_PLAYER); |
@@ -410,7 +410,7 @@ static void do_cmd_wiz_change_aux(void) | ||
410 | 410 | else if (tmp_int < 3) tmp_int = 3; |
411 | 411 | |
412 | 412 | /* Save it */ |
413 | - p_ptr->stat_cur[i] = p_ptr->stat_max[i] = tmp_int; | |
413 | + p_ptr->stat_cur[i] = p_ptr->stat_max[i] = (s16b)tmp_int; | |
414 | 414 | } |
415 | 415 | |
416 | 416 |
@@ -421,7 +421,7 @@ static void do_cmd_wiz_change_aux(void) | ||
421 | 421 | if (!get_string(_("熟練度: ", "Proficiency: "), tmp_val, 9)) return; |
422 | 422 | |
423 | 423 | /* Extract */ |
424 | - tmp_s16b = atoi(tmp_val); | |
424 | + tmp_s16b = (s16b)atoi(tmp_val); | |
425 | 425 | |
426 | 426 | /* Verify */ |
427 | 427 | if (tmp_s16b < WEAPON_EXP_UNSKILLED) tmp_s16b = WEAPON_EXP_UNSKILLED; |
@@ -860,25 +860,25 @@ static void wiz_tweak_item(object_type *o_ptr) | ||
860 | 860 | p = "Enter new 'pval' setting: "; |
861 | 861 | sprintf(tmp_val, "%d", o_ptr->pval); |
862 | 862 | if (!get_string(p, tmp_val, 5)) return; |
863 | - o_ptr->pval = atoi(tmp_val); | |
863 | + o_ptr->pval = (s16b)atoi(tmp_val); | |
864 | 864 | wiz_display_item(o_ptr); |
865 | 865 | |
866 | 866 | p = "Enter new 'to_a' setting: "; |
867 | 867 | sprintf(tmp_val, "%d", o_ptr->to_a); |
868 | 868 | if (!get_string(p, tmp_val, 5)) return; |
869 | - o_ptr->to_a = atoi(tmp_val); | |
869 | + o_ptr->to_a = (s16b)atoi(tmp_val); | |
870 | 870 | wiz_display_item(o_ptr); |
871 | 871 | |
872 | 872 | p = "Enter new 'to_h' setting: "; |
873 | 873 | sprintf(tmp_val, "%d", o_ptr->to_h); |
874 | 874 | if (!get_string(p, tmp_val, 5)) return; |
875 | - o_ptr->to_h = atoi(tmp_val); | |
875 | + o_ptr->to_h = (s16b)atoi(tmp_val); | |
876 | 876 | wiz_display_item(o_ptr); |
877 | 877 | |
878 | 878 | p = "Enter new 'to_d' setting: "; |
879 | 879 | sprintf(tmp_val, "%d", o_ptr->to_d); |
880 | 880 | if (!get_string(p, tmp_val, 5)) return; |
881 | - o_ptr->to_d = atoi(tmp_val); | |
881 | + o_ptr->to_d = (s16b)atoi(tmp_val); | |
882 | 882 | wiz_display_item(o_ptr); |
883 | 883 | } |
884 | 884 |
@@ -1221,7 +1221,7 @@ static void wiz_quantity_item(object_type *o_ptr) | ||
1221 | 1221 | if (tmp_int > 99) tmp_int = 99; |
1222 | 1222 | |
1223 | 1223 | /* Accept modifications */ |
1224 | - o_ptr->number = tmp_int; | |
1224 | + o_ptr->number = (byte_hack)tmp_int; | |
1225 | 1225 | } |
1226 | 1226 | |
1227 | 1227 | if (o_ptr->tval == TV_ROD) |
@@ -1569,9 +1569,9 @@ static void do_cmd_wiz_jump(void) | ||
1569 | 1569 | if (!get_string(ppp, tmp_val, 10)) return; |
1570 | 1570 | |
1571 | 1571 | /* Extract request */ |
1572 | - command_arg = atoi(tmp_val); | |
1572 | + command_arg = (s16b)atoi(tmp_val); | |
1573 | 1573 | |
1574 | - dungeon_type = tmp_dungeon_type; | |
1574 | + dungeon_type = (byte_hack)tmp_dungeon_type; | |
1575 | 1575 | } |
1576 | 1576 | |
1577 | 1577 | /* Paranoia */ |
@@ -1809,7 +1809,7 @@ static void do_cmd_wiz_create_feature(void) | ||
1809 | 1809 | else if (tmp_mimic >= max_f_idx) tmp_mimic = max_f_idx - 1; |
1810 | 1810 | |
1811 | 1811 | cave_set_feat(y, x, tmp_feat); |
1812 | - c_ptr->mimic = tmp_mimic; | |
1812 | + c_ptr->mimic = (s16b)tmp_mimic; | |
1813 | 1813 | |
1814 | 1814 | f_ptr = &f_info[get_feat_mimic(c_ptr)]; |
1815 | 1815 |