* @param feat 地形ID
* @return 開いた地形である場合TRUEを返す / Return TRUE if the given feature is an open door
*/
-static bool is_open(int feat)
+static bool is_open(IDX feat)
{
return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(feat, FF_CLOSE));
}
* @details Return the number of features around (or under) the character.
* Usually look for doors and floor traps.
*/
-static int count_dt(POSITION *y, POSITION *x, bool (*test)(int feat), bool under)
+static int count_dt(POSITION *y, POSITION *x, bool (*test)(IDX feat), bool under)
{
int d, count, xx, yy;
/* See if only one target */
if (num_traps || num_chests)
{
- bool too_many = (num_traps && num_chests) || (num_traps > 1) ||
- (num_chests > 1);
+ bool too_many = (num_traps && num_chests) || (num_traps > 1) || (num_chests > 1);
if (!too_many) command_dir = coords_to_dir(y, x);
}
}
/* Rest some */
else
{
- command_arg = atoi(out_val);
+ command_arg = (COMMAND_ARG)atoi(out_val);
if (command_arg <= 0) return;
}
}
int now_exp = p_ptr->weapon_exp[0][j_ptr->sval];
if (now_exp < s_info[p_ptr->pclass].w_max[0][j_ptr->sval])
{
- int amount = 0;
+ SUB_EXP amount = 0;
if (now_exp < WEAPON_EXP_BEGINNER) amount = 80;
else if (now_exp < WEAPON_EXP_SKILLED) amount = 25;
else if ((now_exp < WEAPON_EXP_EXPERT) && (p_ptr->lev > 19)) amount = 10;
if (snipe_type == SP_RUSH)
{
int n = randint1(5) + 3;
- IDX m_idx = c_mon_ptr->m_idx;
+ MONSTER_IDX m_idx = c_mon_ptr->m_idx;
for ( ; cur_dis <= tdis; )
{
if (stick_to)
{
- int m_idx = cave[y][x].m_idx;
+ MONSTER_IDX m_idx = cave[y][x].m_idx;
monster_type *m_ptr = &m_list[m_idx];
- int o_idx = o_pop();
+ IDX o_idx = o_pop();
if (!o_idx)
{
*/
void do_cmd_fire(void)
{
- int item;
+ OBJECT_IDX item;
object_type *j_ptr;
cptr q, s;
* the item to be destroyed? Should it do any damage at all?
* </pre>
*/
-bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
+bool do_cmd_throw_aux(int mult, bool boomerang, OBJECT_IDX shuriken)
{
- int dir, item;
+ DIRECTION dir;
+ OBJECT_IDX item;
int i, j, y, x, ty, tx, prev_y, prev_x;
int ny[19], nx[19];
int chance, tdam, tdis;
static int flow_head = 0;
static int flow_tail = 0;
-static s16b temp2_x[MAX_SHORT];
-static s16b temp2_y[MAX_SHORT];
+static POSITION temp2_x[MAX_SHORT];
+static POSITION temp2_y[MAX_SHORT];
/*!
* @brief トラベル処理の記憶配列を初期化する Hack: forget the "flow" information
* @param wall プレイヤーが壁の中にいるならばTRUE
* @return なし
*/
-static void travel_flow_aux(int y, int x, int n, bool wall)
+static void travel_flow_aux(POSITION y, POSITION x, int n, bool wall)
{
cave_type *c_ptr = &cave[y][x];
feature_type *f_ptr = &f_info[c_ptr->feat];