* @param do_init クエストの開始処理(TRUE)、結果処理か(FALSE)
* @return なし
*/
-static void get_questinfo(int questnum, bool do_init)
+static void get_questinfo(IDX questnum, bool do_init)
{
int i;
- int old_quest;
+ IDX old_quest;
char tmp_str[80];
/* Clear the text */
/* Damage for one blow (if it hits) */
sprintf(tmp_str, _("攻撃一回につき %d-%d", "One Strike: %d-%d damage"),
- eff_dd + o_ptr->to_d + p_ptr->to_d[0],
- eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0]);
+ (int)(eff_dd + o_ptr->to_d + p_ptr->to_d[0]),
+ (int)(eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0]));
put_str(tmp_str, row+6, col+1);
/* Damage for the complete attack (if all blows hit) */
sprintf(tmp_str, _("1ターンにつき %d-%d", "One Attack: %d-%d damage"),
- p_ptr->num_blow[0] * (eff_dd + o_ptr->to_d + p_ptr->to_d[0]),
- p_ptr->num_blow[0] * (eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0]));
+ (int)(p_ptr->num_blow[0] * (eff_dd + o_ptr->to_d + p_ptr->to_d[0])),
+ (int)(p_ptr->num_blow[0] * (eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0])));
put_str(tmp_str, row+7, col+1);
}
int item, mater;
object_type *o_ptr, *mo_ptr; /* broken weapon and material weapon */
object_kind *k_ptr;
- int i, k_idx, dd_bonus, ds_bonus;
+ int i, dd_bonus, ds_bonus;
+ IDX k_idx;
char basenm[MAX_NLEN];
cptr q, s; /* For get_item prompt */
int row = 7;
/*
* Add a square to the changes array
*/
-static void mon_lite_hack(int y, int x)
+static void mon_lite_hack(POSITION y, POSITION x)
{
cave_type *c_ptr;
- int midpoint, dpf, d;
+ int dpf, d;
+ POSITION midpoint;
/* We trust this grid is in bounds */
/* if (!in_bounds2(y, x)) return; */
}
/* Add to end of temp array */
- temp_x[temp_n] = (byte)fx;
- temp_y[temp_n] = (byte)fy;
+ temp_x[temp_n] = fx;
+ temp_y[temp_n] = fy;
temp_n++;
}
*/
void update_view(void)
{
- int n, m, d, k, y, x, z;
+ int n, m, d, k, z;
+ POSITION y, x;
int se, sw, ne, nw, es, en, ws, wn;
int full, over;
- int y_max = cur_hgt - 1;
- int x_max = cur_wid - 1;
+ POSITION y_max = cur_hgt - 1;
+ POSITION x_max = cur_wid - 1;
cave_type *c_ptr;
*/
void update_flow(void)
{
- int x, y, d;
+ POSITION x, y, d;
int flow_head = 1;
int flow_tail = 0;
* @param turn 状態異常の追加ターン量
* @return なし
*/
-static void hit_trap_set_abnormal_status(cptr trap_message, bool resist, bool (*set_status)(int), int turn_aux)
+static void hit_trap_set_abnormal_status(cptr trap_message, bool resist, bool (*set_status)(IDX), IDX turn_aux)
{
msg_print(trap_message);
}
-static bool do_cmd_knowledge_quests_aux(FILE *fff, int q_idx)
+static bool do_cmd_knowledge_quests_aux(FILE *fff, IDX q_idx)
{
char tmp_str[120];
char playtime_str[16];
/* 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, byte *gx, byte *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, int typ);
+extern void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int 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);
else
{
#ifdef JP
- sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(), dun_level, p_ptr->died_from);
+ sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(), (int)dun_level, p_ptr->died_from);
#else
sprintf(statmsg, "...You were killed by %s on level %d of %s.", p_ptr->died_from, dun_level, map_name());
#endif
else
{
#ifdef JP
- sprintf(statmsg, "…あなたは現在、 %s の %d 階で探索している。", map_name(), dun_level);
+ sprintf(statmsg, "…あなたは現在、 %s の %d 階で探索している。", map_name(), (int)dun_level);
#else
sprintf(statmsg, "...Now, you are exploring level %d of %s.", dun_level, map_name());
#endif
for (k = uniq_total - 1; k >= 0 && k >= uniq_total - 10; k--)
{
monster_race *r_ptr = &r_info[who[k]];
- fprintf(fff, _(" %-40s (レベル%3d)\n", " %-40s (level %3d)\n"), (r_name + r_ptr->name), r_ptr->level);
+ fprintf(fff, _(" %-40s (レベル%3d)\n", " %-40s (level %3d)\n"), (r_name + r_ptr->name), (int)r_ptr->level);
}
}
{
if (streq(p_ptr->died_from, "途中終了"))
{
- sprintf(tmp, "地下 %d 階で死んだ", dun_level);
+ sprintf(tmp, "地下 %d 階で死んだ", (int)dun_level);
}
else
{
- sprintf(tmp, "に地下 %d 階で殺された", dun_level);
+ sprintf(tmp, "に地下 %d 階で殺された", (int)dun_level);
}
}
center_string(buf, tmp);
/* Read the monsters */
for (i = 1; i < limit; i++)
{
- int m_idx;
+ IDX m_idx;
monster_type *m_ptr;
/* Get a new record */
u16b grid_g[512];
int grids = 0;
- byte gx[1024], gy[1024];
+ POSITION gx[1024], gy[1024];
byte gm[32];
int gm_rad = rad;
* @param m_idx 呪文を唱えるモンスターID
* @return 召喚したモンスターの数を返す。
*/
-int summon_NAZGUL(int y, int x, int m_idx)
+int summon_NAZGUL(POSITION y, POSITION x, IDX m_idx)
{
u32b mode = 0L;
int count = 0, k;
- int cy = y;
- int cx = x;
+ POSITION cy = y;
+ POSITION cx = x;
char m_name[80];
monster_name(m_idx, m_name);
static bool make_artifact_special(object_type *o_ptr)
{
int i;
- int k_idx = 0;
+ IDX k_idx = 0;
/*! @note 地上ではキャンセルする / No artifacts in the town */
if (!dun_level) return (FALSE);
* Quick and nasty fill routine used to find the connected region
* of floor in the middle of the cave
*/
-static void cave_fill(byte y, byte x)
+static void cave_fill(POSITION y, POSITION x)
{
int i, j, d;
int ty, tx;
/*
* breath shape
*/
-void breath_shape(u16b *path_g, int dist, int *pgrids, byte *gx, byte *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, int typ)
+void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, byte *gm, int *pgm_rad, int rad, int y1, int x1, int y2, int x2, int typ)
{
int by = y1;
int bx = x1;
WEIGHT weight; /* Item weight */
- byte name1; /* Artifact type, if any */
- byte name2; /* Ego-Item type, if any */
+ IDX name1; /* Artifact type, if any */
+ IDX name2; /* Ego-Item type, if any */
byte xtra1; /* Extra info type (now unused) */
byte xtra2; /* Extra info activation index */
}
else
{
- if (depth_in_feet) (void)sprintf(depths, _("%d ft", "%d ft"), dun_level * 50);
- else (void)sprintf(depths, _("%d 階", "Lev %d"), dun_level);
+ if (depth_in_feet) (void)sprintf(depths, _("%d ft", "%d ft"), (int)dun_level * 50);
+ else (void)sprintf(depths, _("%d 階", "Lev %d"), (int)dun_level);
/* Get color of level based on feeling -JSV- */
switch (p_ptr->feeling)
Term_add_bigch(r_ptr->x_attr, r_ptr->x_char);
//LV
if (r_ptr->r_tkills && !(m_ptr->mflag2 & MFLAG2_KAGE)){
- sprintf(buf, " %2d", r_ptr->level);
+ sprintf(buf, " %2d", (int)r_ptr->level);
}else{
strcpy(buf, " ??");
}
/* Create a magical staircase */
if (create_stairs)
{
- int ny, nx;
+ POSITION ny, nx;
/* Stagger around */
while (cave_perma_bold(y, x) || cave[y][x].o_idx || (cave[y][x].info & CAVE_OBJECT) )
if (p_ptr->riding && target_pet && (temp_n > 1) && (mode & (TARGET_KILL)))
{
- byte tmp;
+ POSITION tmp;
tmp = temp_y[0];
temp_y[0] = temp_y[1];
/* Continue scrolling list if requested */
while (1)
{
- int i, o_idx;
+ int i;
+ IDX o_idx;
/* Save screen */
screen_save();
bool target_set(int mode)
{
int i, d, m, t, bd;
- int y = p_ptr->y;
- int x = p_ptr->x;
+ POSITION y = p_ptr->y;
+ POSITION x = p_ptr->x;
bool done = FALSE;
{
if (strcmp(zz[0], "ARTIFACT") == 0)
{
- int a_idx, k_idx;
+ IDX a_idx, k_idx;
object_type forge;
object_type *q_ptr = &forge;
artifact_type *a_ptr;