/* spells3.c */
extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode);
extern void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode);
-extern bool teleport_player_aux(int dis, BIT_FLAGS mode);
-extern void teleport_player(int dis, BIT_FLAGS mode);
-extern void teleport_player_away(MONSTER_IDX m_idx, int dis);
+extern bool teleport_player_aux(POSITION dis, BIT_FLAGS mode);
+extern void teleport_player(POSITION dis, BIT_FLAGS mode);
+extern void teleport_player_away(MONSTER_IDX m_idx, POSITION dis);
extern void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode);
extern void teleport_away_followable(MONSTER_IDX m_idx);
extern void teleport_level(MONSTER_IDX m_idx);
}
else
{
- int dis = distance(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx);
+ POSITION dis = distance(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx);
/* Confused (etc.) monsters don't follow. */
if (MON_CONFUSED(m_ptr) || MON_STUNNED(m_ptr) || MON_CSLEEP(m_ptr)) continue;
static void get_out_monster(void)
{
int tries = 0;
- int dis = 1;
+ POSITION dis = 1;
int oy = p_ptr->y;
int ox = p_ptr->x;
MONSTER_IDX m_idx = cave[oy][ox].m_idx;
/* Check nearby grids, diagonals first */
for (i = 7; i >= 0; i--)
{
- int dis, s;
+ POSITION dis, s;
/* Get the location */
y = fy + ddy_ddd[i];
if (avoid || lonely || distant)
{
/* Remember the leash length */
- int dis = p_ptr->pet_follow_distance;
+ POSITION dis = p_ptr->pet_follow_distance;
/* Hack -- adjust follow distance temporarily */
if (p_ptr->pet_follow_distance > PET_SEEK_DIST)
*/
void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode)
{
- int ny, nx, oy, ox, d, i, min;
+ POSITION ny, nx, oy, ox;
+ int d, i, min;
int attempts = 500;
- int dis = 2;
+ POSITION dis = 2;
bool look = TRUE;
monster_type *m_ptr = &m_list[m_idx];
/* Paranoia */
- if (!m_ptr->r_idx) return;
+ if(!m_ptr->r_idx) return;
/* "Skill" test */
- if (randint1(100) > power) return;
+ if(randint1(100) > power) return;
/* Initialize */
ny = m_ptr->fy;
* </pre>
*/
-bool teleport_player_aux(int dis, BIT_FLAGS mode)
+bool teleport_player_aux(POSITION dis, BIT_FLAGS mode)
{
int candidates_at[MAX_TELEPORT_DISTANCE + 1];
int total_candidates, cur_candidates;
* @param mode オプション
* @return なし
*/
-void teleport_player(int dis, BIT_FLAGS mode)
+void teleport_player(POSITION dis, BIT_FLAGS mode)
{
int yy, xx;
* @param dis テレポート距離
* @return なし
*/
-void teleport_player_away(MONSTER_IDX m_idx, int dis)
+void teleport_player_away(MONSTER_IDX m_idx, POSITION dis)
{
int yy, xx;
void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode)
{
POSITION y, x;
- int dis = 0, ctr = 0;
+ POSITION dis = 0, ctr = 0;
if (p_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
{
/* Purpose: Memory management routines -BEN- */
#include "z-virt.h"
-
#include "z-util.h"
-
/*
* Allow debugging messages to track memory usage.
*/