• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

Revision141b95346462d722bdeaaeee16533f3039b02f7d (tree)
Zeit2017-09-12 21:41:18
AutorDeskull <desull@user...>
CommiterDeskull

Log Message

前回は(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.

Ändern Zusammenfassung

Diff

--- a/src/defines.h
+++ b/src/defines.h
@@ -53,7 +53,7 @@
5353 #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
5454 #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
5555 #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */
56-#define FAKE_VER_EXTRA 86 /*!< ゲームのバージョン番号定義(エクストラ番号) */
56+#define FAKE_VER_EXTRA 87 /*!< ゲームのバージョン番号定義(エクストラ番号) */
5757
5858
5959 /*!
--- a/src/wizard1.c
+++ b/src/wizard1.c
@@ -409,7 +409,7 @@ static void spoil_obj_desc(cptr fname)
409409
410410 if ((t1 > t2) || ((t1 == t2) && (e1 > e2)))
411411 {
412- int tmp = who[i1];
412+ u16b tmp = who[i1];
413413 who[i1] = who[i2];
414414 who[i2] = tmp;
415415 }
@@ -455,7 +455,7 @@ static void spoil_obj_desc(cptr fname)
455455 if (k_ptr->gen_flags & (TRG_INSTA_ART)) continue;
456456
457457 /* Save the index */
458- who[n++] = k;
458+ who[n++] = (u16b)k;
459459 }
460460 }
461461
@@ -1655,7 +1655,7 @@ static bool make_fake_artifact(object_type *o_ptr, int name1)
16551655 object_prep(o_ptr, i);
16561656
16571657 /* Save the name */
1658- o_ptr->name1 = name1;
1658+ o_ptr->name1 = (byte_hack)name1;
16591659
16601660 /* Extract the fields */
16611661 o_ptr->pval = a_ptr->pval;
@@ -1817,7 +1817,7 @@ static void spoil_mon_desc(cptr fname)
18171817 monster_race *r_ptr = &r_info[i];
18181818
18191819 /* Use that monster */
1820- if (r_ptr->name) who[n++] = i;
1820+ if (r_ptr->name) who[n++] = (s16b)i;
18211821 }
18221822
18231823 /* Select the sort method */
@@ -2154,7 +2154,7 @@ static void spoil_mon_info(cptr fname)
21542154 monster_race *r_ptr = &r_info[i];
21552155
21562156 /* Use that monster */
2157- if (r_ptr->name) who[n++] = i;
2157+ if (r_ptr->name) who[n++] = (s16b)i;
21582158 }
21592159
21602160 /* Select the sort method */
--- a/src/wizard2.c
+++ b/src/wizard2.c
@@ -120,10 +120,10 @@ static bool set_gametime(void)
120120 char ppp[80], tmp_val[40];
121121
122122 /* Prompt */
123- sprintf(ppp, "Dungeon Turn (0-%d): ", dungeon_turn_limit);
123+ sprintf(ppp, "Dungeon Turn (0-%ld): ", dungeon_turn_limit);
124124
125125 /* Default */
126- sprintf(tmp_val, "%d", dungeon_turn);
126+ sprintf(tmp_val, "%ld", dungeon_turn);
127127
128128 /* Query */
129129 if (!get_string(ppp, tmp_val, 10)) return (FALSE);
@@ -349,7 +349,7 @@ static void do_cmd_wiz_reset_class(void)
349349 if (tmp_int < 0 || tmp_int >= MAX_CLASS) return;
350350
351351 /* Save it */
352- p_ptr->pclass = tmp_int;
352+ p_ptr->pclass = (byte_hack)tmp_int;
353353
354354 /* Redraw inscription */
355355 p_ptr->window |= (PW_PLAYER);
@@ -410,7 +410,7 @@ static void do_cmd_wiz_change_aux(void)
410410 else if (tmp_int < 3) tmp_int = 3;
411411
412412 /* 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;
414414 }
415415
416416
@@ -421,7 +421,7 @@ static void do_cmd_wiz_change_aux(void)
421421 if (!get_string(_("熟練度: ", "Proficiency: "), tmp_val, 9)) return;
422422
423423 /* Extract */
424- tmp_s16b = atoi(tmp_val);
424+ tmp_s16b = (s16b)atoi(tmp_val);
425425
426426 /* Verify */
427427 if (tmp_s16b < WEAPON_EXP_UNSKILLED) tmp_s16b = WEAPON_EXP_UNSKILLED;
@@ -860,25 +860,25 @@ static void wiz_tweak_item(object_type *o_ptr)
860860 p = "Enter new 'pval' setting: ";
861861 sprintf(tmp_val, "%d", o_ptr->pval);
862862 if (!get_string(p, tmp_val, 5)) return;
863- o_ptr->pval = atoi(tmp_val);
863+ o_ptr->pval = (s16b)atoi(tmp_val);
864864 wiz_display_item(o_ptr);
865865
866866 p = "Enter new 'to_a' setting: ";
867867 sprintf(tmp_val, "%d", o_ptr->to_a);
868868 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);
870870 wiz_display_item(o_ptr);
871871
872872 p = "Enter new 'to_h' setting: ";
873873 sprintf(tmp_val, "%d", o_ptr->to_h);
874874 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);
876876 wiz_display_item(o_ptr);
877877
878878 p = "Enter new 'to_d' setting: ";
879879 sprintf(tmp_val, "%d", o_ptr->to_d);
880880 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);
882882 wiz_display_item(o_ptr);
883883 }
884884
@@ -1221,7 +1221,7 @@ static void wiz_quantity_item(object_type *o_ptr)
12211221 if (tmp_int > 99) tmp_int = 99;
12221222
12231223 /* Accept modifications */
1224- o_ptr->number = tmp_int;
1224+ o_ptr->number = (byte_hack)tmp_int;
12251225 }
12261226
12271227 if (o_ptr->tval == TV_ROD)
@@ -1569,9 +1569,9 @@ static void do_cmd_wiz_jump(void)
15691569 if (!get_string(ppp, tmp_val, 10)) return;
15701570
15711571 /* Extract request */
1572- command_arg = atoi(tmp_val);
1572+ command_arg = (s16b)atoi(tmp_val);
15731573
1574- dungeon_type = tmp_dungeon_type;
1574+ dungeon_type = (byte_hack)tmp_dungeon_type;
15751575 }
15761576
15771577 /* Paranoia */
@@ -1809,7 +1809,7 @@ static void do_cmd_wiz_create_feature(void)
18091809 else if (tmp_mimic >= max_f_idx) tmp_mimic = max_f_idx - 1;
18101810
18111811 cave_set_feat(y, x, tmp_feat);
1812- c_ptr->mimic = tmp_mimic;
1812+ c_ptr->mimic = (s16b)tmp_mimic;
18131813
18141814 f_ptr = &f_info[get_feat_mimic(c_ptr)];
18151815