#define place_outer_noperm_bold(Y, X) \
{ \
feature_type *_f_ptr = &f_info[feat_wall_outer]; \
- if (permanent_wall(_f_ptr)) set_cave_feat(Y, X, feat_state(feat_wall_outer, FF_UNPERM)); \
+ if (permanent_wall(_f_ptr)) set_cave_feat(Y, X, (s16b)feat_state(feat_wall_outer, FF_UNPERM)); \
else set_cave_feat(Y,X,feat_wall_outer); \
cave[Y][X].info &= ~(CAVE_MASK); \
add_cave_info(Y,X,(CAVE_OUTER | CAVE_VAULT)); \
#define place_outer_noperm_grid(C) \
{ \
feature_type *_f_ptr = &f_info[feat_wall_outer]; \
- if (permanent_wall(_f_ptr)) (C)->feat = feat_state(feat_wall_outer, FF_UNPERM); \
+ if (permanent_wall(_f_ptr)) (C)->feat = (s16b)feat_state(feat_wall_outer, FF_UNPERM); \
else (C)->feat = feat_wall_outer; \
(C)->info &= ~(CAVE_MASK); \
(C)->info |= (CAVE_OUTER | CAVE_VAULT); \
/* Save the room location */
if (dun->cent_n < CENT_MAX)
{
- dun->cent[dun->cent_n].y = *y;
- dun->cent[dun->cent_n].x = *x;
+ dun->cent[dun->cent_n].y = (byte_hack)*y;
+ dun->cent[dun->cent_n].x = (byte_hack)*x;
dun->cent_n++;
}
if (r_ptr->flags3 & RF3_EVIL) align.sub_align |= SUB_ALIGN_EVIL;
if (r_ptr->flags3 & RF3_GOOD) align.sub_align |= SUB_ALIGN_GOOD;
- nest_mon_info[i].r_idx = r_idx;
+ nest_mon_info[i].r_idx = (s16b)r_idx;
nest_mon_info[i].used = FALSE;
}
(val <= fill_data.c1)) val = fill_data.c1 + 1;
/* store the value in height-map format */
- cave[y][x].feat = val;
+ cave[y][x].feat = (s16b)val;
return;
}
}
/* Boundaries are walls */
- cave[fill_data.ymin][fill_data.xmin].feat = maxsize;
- cave[fill_data.ymax][fill_data.xmin].feat = maxsize;
- cave[fill_data.ymin][fill_data.xmax].feat = maxsize;
- cave[fill_data.ymax][fill_data.xmax].feat = maxsize;
+ cave[fill_data.ymin][fill_data.xmin].feat = (s16b)maxsize;
+ cave[fill_data.ymax][fill_data.xmin].feat = (s16b)maxsize;
+ cave[fill_data.ymin][fill_data.xmax].feat = (s16b)maxsize;
+ cave[fill_data.ymax][fill_data.xmax].feat = (s16b)maxsize;
/* Set the middle square to be an open area. */
cave[y0][x0].feat = 0;
/* 25% of the time use the other tile : it looks better this way */
if (randint1(100) < 75)
{
- cave[y][x].feat = feat1;
+ cave[y][x].feat = (s16b)feat1;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info1;
return TRUE;
}
else
{
- cave[y][x].feat = feat2;
+ cave[y][x].feat = (s16b)feat2;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info2;
return TRUE;
/* 25% of the time use the other tile : it looks better this way */
if (randint1(100) < 75)
{
- cave[y][x].feat = feat2;
+ cave[y][x].feat = (s16b)feat2;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info2;
return TRUE;
}
else
{
- cave[y][x].feat = feat1;
+ cave[y][x].feat = (s16b)feat1;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info1;
return TRUE;
}
else if (cave[y][x].feat <= c3)
{
- cave[y][x].feat = feat3;
+ cave[y][x].feat = (s16b)feat3;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info3;
return TRUE;
fill_data.info1, fill_data.info2, fill_data.info3))
{
/* Enqueue that entry */
- temp_y[flow_tail] = j;
- temp_x[flow_tail] = i;
+ temp_y[flow_tail] = (byte_hack)j;
+ temp_x[flow_tail] = (byte_hack)i;
/* Advance the queue */
if (++flow_tail == TEMP_MAX) flow_tail = 0;
}
}
- center[i].x = x;
- center[i].y = y;
+ center[i].x = (byte_hack)x;
+ center[i].y = (byte_hack)y;
}
/* Get distances to two closest centers */
/* initialize */
- min1 = distance(x, y, center[0].x, center[0].y);
- min2 = distance(x, y, center[1].x, center[1].y);
+ min1 = (u16b)distance(x, y, center[0].x, center[0].y);
+ min2 = (u16b)distance(x, y, center[1].x, center[1].y);
if (min1 > min2)
{
/* Scan the rest */
for (i = 2; i < BUBBLENUM; i++)
{
- temp = distance(x, y, center[i].x, center[i].y);
+ temp = (u16b)distance(x, y, center[i].x, center[i].y);
if (temp < min1)
{