{
#ifdef JP
sprintf(note," - %d 体の%sを倒す。(あと %d 体)",
- quest[i].max_num, name, quest[i].max_num - quest[i].cur_num);
+ (int)quest[i].max_num, name, (int)(quest[i].max_num - quest[i].cur_num));
#else
plural_aux(name);
sprintf(note," - kill %d %s, have killed %d.",
- quest[i].max_num, name, quest[i].cur_num);
+ (int)quest[i].max_num, name, (int)quest[i].cur_num);
#endif
}
else
case QUEST_TYPE_KILL_NUMBER:
#ifdef JP
sprintf(note," - %d 体のモンスターを倒す。(あと %d 体)",
- quest[i].max_num, quest[i].max_num - quest[i].cur_num);
+ (int)quest[i].max_num, (int)(quest[i].max_num - quest[i].cur_num));
#else
sprintf(note," - Kill %d monsters, have killed %d.",
- quest[i].max_num, quest[i].cur_num);
+ (int)quest[i].max_num, (int)quest[i].cur_num);
#endif
break;
*/
void determine_bounty_uniques(void)
{
- int i, j, tmp;
+ int i, j;
+ MONRACE_IDX tmp;
monster_race *r_ptr;
get_mon_num_prep(NULL, NULL);
/* spells1.c */
extern bool in_disintegration_range(POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-extern void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, int *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int typ);
+extern void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int typ);
extern int take_hit(int damage_type, HIT_POINT damage, cptr kb_str, int monspell);
extern u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, int typ);
extern sint project_path(u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int flg);
-extern int dist_to_line(int y, int x, int y1, int x1, int y2, int x2);
+extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT dam, int typ, int flg, int monspell);
extern int project_length;
extern bool binding_field(HIT_POINT dam);
/* object1.c */
extern int scan_floor(int *items, int y, int x, int mode);
-extern int show_floor(int target_item, int y, int x, int *min_width);
+extern COMMAND_CODE show_floor(int target_item, int y, int x, int *min_width);
extern bool get_item_floor(COMMAND_CODE *cp, cptr pmt, cptr str, int mode);
extern void py_pickup_floor(bool pickup);
*/
COMMAND_CODE show_inven(int target_item)
{
- int i, j, k, l, z = 0;
+ COMMAND_CODE i;
+ int j, k, l, z = 0;
int col, cur_col, len;
object_type *o_ptr;
char o_name[MAX_NLEN];
int out_index[23];
byte out_color[23];
char out_desc[23][MAX_NLEN];
- int target_item_label = 0;
- int wid, hgt;
+ COMMAND_CODE target_item_label = 0;
+ TERM_POSITION wid, hgt;
char inven_label[52 + 1];
/* Starting column */
*/
COMMAND_CODE show_equip(int target_item)
{
- int i, j, k, l;
+ COMMAND_CODE i;
+ int j, k, l;
int col, cur_col, len;
object_type *o_ptr;
char tmp_val[80];
int out_index[23];
byte out_color[23];
char out_desc[23][MAX_NLEN];
- int target_item_label = 0;
- int wid, hgt;
+ COMMAND_CODE target_item_label = 0;
+ TERM_POSITION wid, hgt;
char equip_label[52 + 1];
/* Starting column */
* @param y 走査するフロアのY座標
* @param x 走査するフロアのX座標
* @param min_width 表示の長さ
- * @return 選択したアイテムのID
+ * @return 選択したアイテムの添え字
* @details
*/
-int show_floor(int target_item, int y, int x, int *min_width)
+COMMAND_CODE show_floor(int target_item, int y, int x, int *min_width)
{
int i, j, k, l;
int col, len;
int out_index[23];
byte out_color[23];
char out_desc[23][MAX_NLEN];
- int target_item_label = 0;
+ COMMAND_CODE target_item_label = 0;
int floor_list[23], floor_num;
int wid, hgt;
*/
static bool py_pickup_floor_aux(void)
{
- s16b this_o_idx;
+ OBJECT_IDX this_o_idx;
cptr q, s;
- int item;
+ OBJECT_IDX item;
/* Restrict the choices */
item_tester_hook = inven_carry_okay;
/*
* Find the distance from (x, y) to a line.
*/
-int dist_to_line(int y, int x, int y1, int x1, int y2, int x2)
+POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
/* Vector from (x, y) to (x1, y1) */
- int py = y1 - y;
- int px = x1 - x;
+ POSITION py = y1 - y;
+ POSITION px = x1 - x;
/* Normal vector */
- int ny = x2 - x1;
- int nx = y1 - y2;
+ POSITION ny = x2 - x1;
+ POSITION nx = y1 - y2;
- /* Length of N */
- int pd = distance(y1, x1, y, x);
- int nd = distance(y1, x1, y2, x2);
+ /* Length of N */
+ POSITION pd = distance(y1, x1, y, x);
+ POSITION nd = distance(y1, x1, y2, x2);
if (pd > nd) return distance(y, x, y2, x2);
/* Component of P on N */
nd = ((nd) ? ((py * ny + px * nx) / nd) : 0);
- /* Absolute value */
- return((nd >= 0) ? nd : 0 - nd);
+ /* Absolute value */
+ return((nd >= 0) ? nd : 0 - nd);
}
/*
* breath shape
*/
-void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, int *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int typ)
+void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int typ)
{
POSITION by = y1;
POSITION bx = x1;
/* Hex-mode XXX */
if (*str == 'x')
{
- *s = 16 * dehex(*++str);
- *s++ += dehex(*++str);
+ *s = 16 * (char)dehex(*++str);
+ *s++ += (char)dehex(*++str);
}
/* Hack -- simple way to specify "backslash" */
/* Octal-mode */
else if (*str == '0')
{
- *s = 8 * deoct(*++str);
- *s++ += deoct(*++str);
+ *s = 8 * (char)deoct(*++str);
+ *s++ += (char)deoct(*++str);
}
/* Octal-mode */
else if (*str == '1')
{
- *s = 64 + 8 * deoct(*++str);
- *s++ += deoct(*++str);
+ *s = 64 + 8 * (char)deoct(*++str);
+ *s++ += (char)deoct(*++str);
}
/* Octal-mode */
else if (*str == '2')
{
- *s = 64 * 2 + 8 * deoct(*++str);
- *s++ += deoct(*++str);
+ *s = 64 * 2 + 8 * (char)deoct(*++str);
+ *s++ += (char)deoct(*++str);
}
/* Octal-mode */
else if (*str == '3')
{
- *s = 64 * 3 + 8 * deoct(*++str);
- *s++ += deoct(*++str);
+ *s = 64 * 3 + 8 * (char)deoct(*++str);
+ *s++ += (char)deoct(*++str);
}
/* Skip the final char */