• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

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


コミットメタ情報

リビジョン9314ad911a52014ac349166f8a194865ff6fc528 (tree)
日時2017-09-13 23:33:41
作者Deskull <desull@user...>
コミッターDeskull

ログメッセージ

#37287 (2.2.0.89) rooms.c 中のVCコンパイラ警告を修正。 / Fix warnings of VC compiler in rooms.c.

変更サマリ

差分

--- 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 88 /*!< ゲームのバージョン番号定義(エクストラ番号) */
56+#define FAKE_VER_EXTRA 89 /*!< ゲームのバージョン番号定義(エクストラ番号) */
5757
5858
5959 /*!
--- a/src/grid.h
+++ b/src/grid.h
@@ -189,7 +189,7 @@
189189 #define place_outer_noperm_bold(Y, X) \
190190 { \
191191 feature_type *_f_ptr = &f_info[feat_wall_outer]; \
192- if (permanent_wall(_f_ptr)) set_cave_feat(Y, X, feat_state(feat_wall_outer, FF_UNPERM)); \
192+ if (permanent_wall(_f_ptr)) set_cave_feat(Y, X, (s16b)feat_state(feat_wall_outer, FF_UNPERM)); \
193193 else set_cave_feat(Y,X,feat_wall_outer); \
194194 cave[Y][X].info &= ~(CAVE_MASK); \
195195 add_cave_info(Y,X,(CAVE_OUTER | CAVE_VAULT)); \
@@ -199,7 +199,7 @@
199199 #define place_outer_noperm_grid(C) \
200200 { \
201201 feature_type *_f_ptr = &f_info[feat_wall_outer]; \
202- if (permanent_wall(_f_ptr)) (C)->feat = feat_state(feat_wall_outer, FF_UNPERM); \
202+ if (permanent_wall(_f_ptr)) (C)->feat = (s16b)feat_state(feat_wall_outer, FF_UNPERM); \
203203 else (C)->feat = feat_wall_outer; \
204204 (C)->info &= ~(CAVE_MASK); \
205205 (C)->info |= (CAVE_OUTER | CAVE_VAULT); \
--- a/src/rooms.c
+++ b/src/rooms.c
@@ -486,8 +486,8 @@ static bool find_space(int *y, int *x, int height, int width)
486486 /* Save the room location */
487487 if (dun->cent_n < CENT_MAX)
488488 {
489- dun->cent[dun->cent_n].y = *y;
490- dun->cent[dun->cent_n].x = *x;
489+ dun->cent[dun->cent_n].y = (byte_hack)*y;
490+ dun->cent[dun->cent_n].x = (byte_hack)*x;
491491 dun->cent_n++;
492492 }
493493
@@ -2310,7 +2310,7 @@ static bool build_type5(void)
23102310 if (r_ptr->flags3 & RF3_EVIL) align.sub_align |= SUB_ALIGN_EVIL;
23112311 if (r_ptr->flags3 & RF3_GOOD) align.sub_align |= SUB_ALIGN_GOOD;
23122312
2313- nest_mon_info[i].r_idx = r_idx;
2313+ nest_mon_info[i].r_idx = (s16b)r_idx;
23142314 nest_mon_info[i].used = FALSE;
23152315 }
23162316
@@ -3208,7 +3208,7 @@ static void store_height(int x, int y, int val)
32083208 (val <= fill_data.c1)) val = fill_data.c1 + 1;
32093209
32103210 /* store the value in height-map format */
3211- cave[y][x].feat = val;
3211+ cave[y][x].feat = (s16b)val;
32123212
32133213 return;
32143214 }
@@ -3333,10 +3333,10 @@ static void generate_hmap(int y0, int x0, int xsiz, int ysiz, int grd, int roug,
33333333 }
33343334
33353335 /* Boundaries are walls */
3336- cave[fill_data.ymin][fill_data.xmin].feat = maxsize;
3337- cave[fill_data.ymax][fill_data.xmin].feat = maxsize;
3338- cave[fill_data.ymin][fill_data.xmax].feat = maxsize;
3339- cave[fill_data.ymax][fill_data.xmax].feat = maxsize;
3336+ cave[fill_data.ymin][fill_data.xmin].feat = (s16b)maxsize;
3337+ cave[fill_data.ymax][fill_data.xmin].feat = (s16b)maxsize;
3338+ cave[fill_data.ymin][fill_data.xmax].feat = (s16b)maxsize;
3339+ cave[fill_data.ymax][fill_data.xmax].feat = (s16b)maxsize;
33403340
33413341 /* Set the middle square to be an open area. */
33423342 cave[y0][x0].feat = 0;
@@ -3488,14 +3488,14 @@ static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int
34883488 /* 25% of the time use the other tile : it looks better this way */
34893489 if (randint1(100) < 75)
34903490 {
3491- cave[y][x].feat = feat1;
3491+ cave[y][x].feat = (s16b)feat1;
34923492 cave[y][x].info &= ~(CAVE_MASK);
34933493 cave[y][x].info |= info1;
34943494 return TRUE;
34953495 }
34963496 else
34973497 {
3498- cave[y][x].feat = feat2;
3498+ cave[y][x].feat = (s16b)feat2;
34993499 cave[y][x].info &= ~(CAVE_MASK);
35003500 cave[y][x].info |= info2;
35013501 return TRUE;
@@ -3506,14 +3506,14 @@ static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int
35063506 /* 25% of the time use the other tile : it looks better this way */
35073507 if (randint1(100) < 75)
35083508 {
3509- cave[y][x].feat = feat2;
3509+ cave[y][x].feat = (s16b)feat2;
35103510 cave[y][x].info &= ~(CAVE_MASK);
35113511 cave[y][x].info |= info2;
35123512 return TRUE;
35133513 }
35143514 else
35153515 {
3516- cave[y][x].feat = feat1;
3516+ cave[y][x].feat = (s16b)feat1;
35173517 cave[y][x].info &= ~(CAVE_MASK);
35183518 cave[y][x].info |= info1;
35193519 return TRUE;
@@ -3521,7 +3521,7 @@ static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int
35213521 }
35223522 else if (cave[y][x].feat <= c3)
35233523 {
3524- cave[y][x].feat = feat3;
3524+ cave[y][x].feat = (s16b)feat3;
35253525 cave[y][x].info &= ~(CAVE_MASK);
35263526 cave[y][x].info |= info3;
35273527 return TRUE;
@@ -3596,8 +3596,8 @@ static void cave_fill(byte y, byte x)
35963596 fill_data.info1, fill_data.info2, fill_data.info3))
35973597 {
35983598 /* Enqueue that entry */
3599- temp_y[flow_tail] = j;
3600- temp_x[flow_tail] = i;
3599+ temp_y[flow_tail] = (byte_hack)j;
3600+ temp_x[flow_tail] = (byte_hack)i;
36013601
36023602 /* Advance the queue */
36033603 if (++flow_tail == TEMP_MAX) flow_tail = 0;
@@ -4348,8 +4348,8 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
43484348 }
43494349 }
43504350
4351- center[i].x = x;
4352- center[i].y = y;
4351+ center[i].x = (byte_hack)x;
4352+ center[i].y = (byte_hack)y;
43534353 }
43544354
43554355
@@ -4383,8 +4383,8 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
43834383 /* Get distances to two closest centers */
43844384
43854385 /* initialize */
4386- min1 = distance(x, y, center[0].x, center[0].y);
4387- min2 = distance(x, y, center[1].x, center[1].y);
4386+ min1 = (u16b)distance(x, y, center[0].x, center[0].y);
4387+ min2 = (u16b)distance(x, y, center[1].x, center[1].y);
43884388
43894389 if (min1 > min2)
43904390 {
@@ -4397,7 +4397,7 @@ static void build_bubble_vault(int x0, int y0, int xsize, int ysize)
43974397 /* Scan the rest */
43984398 for (i = 2; i < BUBBLENUM; i++)
43994399 {
4400- temp = distance(x, y, center[i].x, center[i].y);
4400+ temp = (u16b)distance(x, y, center[i].x, center[i].y);
44014401
44024402 if (temp < min1)
44034403 {
旧リポジトリブラウザで表示