変愚蛮怒のメインリポジトリです
Revision | 25e3c79434959c6309a101d0f505654d8d6edfad (tree) |
---|---|
Time | 2018-11-17 18:31:40 |
Author | Deskull <deskull@user...> |
Commiter | Deskull |
[Refactor] #37353 型の置換。 / Type replacement.
@@ -1014,9 +1014,9 @@ extern bool psychometry(void); | ||
1014 | 1014 | /* spells3.c */ |
1015 | 1015 | extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode); |
1016 | 1016 | extern void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode); |
1017 | -extern bool teleport_player_aux(int dis, BIT_FLAGS mode); | |
1018 | -extern void teleport_player(int dis, BIT_FLAGS mode); | |
1019 | -extern void teleport_player_away(MONSTER_IDX m_idx, int dis); | |
1017 | +extern bool teleport_player_aux(POSITION dis, BIT_FLAGS mode); | |
1018 | +extern void teleport_player(POSITION dis, BIT_FLAGS mode); | |
1019 | +extern void teleport_player_away(MONSTER_IDX m_idx, POSITION dis); | |
1020 | 1020 | extern void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode); |
1021 | 1021 | extern void teleport_away_followable(MONSTER_IDX m_idx); |
1022 | 1022 | extern void teleport_level(MONSTER_IDX m_idx); |
@@ -408,7 +408,7 @@ static void preserve_pet(void) | ||
408 | 408 | } |
409 | 409 | else |
410 | 410 | { |
411 | - int dis = distance(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx); | |
411 | + POSITION dis = distance(p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx); | |
412 | 412 | |
413 | 413 | /* Confused (etc.) monsters don't follow. */ |
414 | 414 | if (MON_CONFUSED(m_ptr) || MON_STUNNED(m_ptr) || MON_CSLEEP(m_ptr)) continue; |
@@ -681,7 +681,7 @@ static void update_unique_artifact(s16b cur_floor_id) | ||
681 | 681 | static void get_out_monster(void) |
682 | 682 | { |
683 | 683 | int tries = 0; |
684 | - int dis = 1; | |
684 | + POSITION dis = 1; | |
685 | 685 | int oy = p_ptr->y; |
686 | 686 | int ox = p_ptr->x; |
687 | 687 | MONSTER_IDX m_idx = cave[oy][ox].m_idx; |
@@ -707,7 +707,7 @@ static bool get_fear_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp) | ||
707 | 707 | /* Check nearby grids, diagonals first */ |
708 | 708 | for (i = 7; i >= 0; i--) |
709 | 709 | { |
710 | - int dis, s; | |
710 | + POSITION dis, s; | |
711 | 711 | |
712 | 712 | /* Get the location */ |
713 | 713 | y = fy + ddy_ddd[i]; |
@@ -2605,7 +2605,7 @@ void process_monster(MONSTER_IDX m_idx) | ||
2605 | 2605 | if (avoid || lonely || distant) |
2606 | 2606 | { |
2607 | 2607 | /* Remember the leash length */ |
2608 | - int dis = p_ptr->pet_follow_distance; | |
2608 | + POSITION dis = p_ptr->pet_follow_distance; | |
2609 | 2609 | |
2610 | 2610 | /* Hack -- adjust follow distance temporarily */ |
2611 | 2611 | if (p_ptr->pet_follow_distance > PET_SEEK_DIST) |
@@ -145,17 +145,18 @@ bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode) | ||
145 | 145 | */ |
146 | 146 | void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode) |
147 | 147 | { |
148 | - int ny, nx, oy, ox, d, i, min; | |
148 | + POSITION ny, nx, oy, ox; | |
149 | + int d, i, min; | |
149 | 150 | int attempts = 500; |
150 | - int dis = 2; | |
151 | + POSITION dis = 2; | |
151 | 152 | bool look = TRUE; |
152 | 153 | monster_type *m_ptr = &m_list[m_idx]; |
153 | 154 | |
154 | 155 | /* Paranoia */ |
155 | - if (!m_ptr->r_idx) return; | |
156 | + if(!m_ptr->r_idx) return; | |
156 | 157 | |
157 | 158 | /* "Skill" test */ |
158 | - if (randint1(100) > power) return; | |
159 | + if(randint1(100) > power) return; | |
159 | 160 | |
160 | 161 | /* Initialize */ |
161 | 162 | ny = m_ptr->fy; |
@@ -258,7 +259,7 @@ void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, | ||
258 | 259 | * </pre> |
259 | 260 | */ |
260 | 261 | |
261 | -bool teleport_player_aux(int dis, BIT_FLAGS mode) | |
262 | +bool teleport_player_aux(POSITION dis, BIT_FLAGS mode) | |
262 | 263 | { |
263 | 264 | int candidates_at[MAX_TELEPORT_DISTANCE + 1]; |
264 | 265 | int total_candidates, cur_candidates; |
@@ -374,7 +375,7 @@ bool teleport_player_aux(int dis, BIT_FLAGS mode) | ||
374 | 375 | * @param mode オプション |
375 | 376 | * @return なし |
376 | 377 | */ |
377 | -void teleport_player(int dis, BIT_FLAGS mode) | |
378 | +void teleport_player(POSITION dis, BIT_FLAGS mode) | |
378 | 379 | { |
379 | 380 | int yy, xx; |
380 | 381 |
@@ -418,7 +419,7 @@ void teleport_player(int dis, BIT_FLAGS mode) | ||
418 | 419 | * @param dis テレポート距離 |
419 | 420 | * @return なし |
420 | 421 | */ |
421 | -void teleport_player_away(MONSTER_IDX m_idx, int dis) | |
422 | +void teleport_player_away(MONSTER_IDX m_idx, POSITION dis) | |
422 | 423 | { |
423 | 424 | int yy, xx; |
424 | 425 |
@@ -472,7 +473,7 @@ void teleport_player_away(MONSTER_IDX m_idx, int dis) | ||
472 | 473 | void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode) |
473 | 474 | { |
474 | 475 | POSITION y, x; |
475 | - int dis = 0, ctr = 0; | |
476 | + POSITION dis = 0, ctr = 0; | |
476 | 477 | |
477 | 478 | if (p_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL)) |
478 | 479 | { |
@@ -11,10 +11,8 @@ | ||
11 | 11 | /* Purpose: Memory management routines -BEN- */ |
12 | 12 | |
13 | 13 | #include "z-virt.h" |
14 | - | |
15 | 14 | #include "z-util.h" |
16 | 15 | |
17 | - | |
18 | 16 | /* |
19 | 17 | * Allow debugging messages to track memory usage. |
20 | 18 | */ |