val = 5 + 3;
val += tmp % 3; tmp /= 3;
val += tmp % 4; tmp /= 4;
- val += tmp;
+ val += (base_status)tmp;
/* Save that value */
sum += val;
position oy = p_ptr->y;
position ox = p_ptr->x;
cave_type *oc_ptr = &cave[oy][ox];
- int om_idx = oc_ptr->m_idx;
+ idx om_idx = oc_ptr->m_idx;
idx nm_idx = c_ptr->m_idx;
/* Move the player */
/*
* The direction we are running
*/
-static byte find_current;
+static direction find_current;
/*
* The direction we came from
*/
-static byte find_prevdir;
+static direction find_prevdir;
/*
* We are looking for open area
* @param x 方角を確認したX座標
* @return 方向ID
*/
-static int coords_to_dir(int y, int x)
+static direction coords_to_dir(position y, position x)
{
int d[3][3] = { {7, 4, 1}, {8, 5, 2}, {9, 6, 3} };
int dy, dx;
*/
void do_cmd_open(void)
{
- int y, x, dir;
-
- s16b o_idx;
+ int y, x;
+ direction dir;
+ idx o_idx;
bool more = FALSE;
* @param i2 整理したい配列の終点
* @return なし
*/
-static void compact_objects_aux(int i1, int i2)
+static void compact_objects_aux(idx i1, idx i2)
{
- int i;
-
+ idx i;
cave_type *c_ptr;
-
object_type *o_ptr;
-
/* Do nothing */
if (i1 == i2) return;
u32b curse_flags; /* Flags for curse */
- s16b next_o_idx; /* Next object in stack (if any) */
-
+ idx next_o_idx; /* Next object in stack (if any) */
idx held_m_idx; /* Monster holding us (if any) */
};