• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision25e3c79434959c6309a101d0f505654d8d6edfad (tree)
Time2018-11-17 18:31:40
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 型の置換。 / Type replacement.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -1014,9 +1014,9 @@ extern bool psychometry(void);
10141014 /* spells3.c */
10151015 extern bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode);
10161016 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);
10201020 extern void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode);
10211021 extern void teleport_away_followable(MONSTER_IDX m_idx);
10221022 extern void teleport_level(MONSTER_IDX m_idx);
--- a/src/floor-save.c
+++ b/src/floor-save.c
@@ -408,7 +408,7 @@ static void preserve_pet(void)
408408 }
409409 else
410410 {
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);
412412
413413 /* Confused (etc.) monsters don't follow. */
414414 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)
681681 static void get_out_monster(void)
682682 {
683683 int tries = 0;
684- int dis = 1;
684+ POSITION dis = 1;
685685 int oy = p_ptr->y;
686686 int ox = p_ptr->x;
687687 MONSTER_IDX m_idx = cave[oy][ox].m_idx;
--- a/src/monster-process.c
+++ b/src/monster-process.c
@@ -707,7 +707,7 @@ static bool get_fear_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
707707 /* Check nearby grids, diagonals first */
708708 for (i = 7; i >= 0; i--)
709709 {
710- int dis, s;
710+ POSITION dis, s;
711711
712712 /* Get the location */
713713 y = fy + ddy_ddd[i];
@@ -2605,7 +2605,7 @@ void process_monster(MONSTER_IDX m_idx)
26052605 if (avoid || lonely || distant)
26062606 {
26072607 /* Remember the leash length */
2608- int dis = p_ptr->pet_follow_distance;
2608+ POSITION dis = p_ptr->pet_follow_distance;
26092609
26102610 /* Hack -- adjust follow distance temporarily */
26112611 if (p_ptr->pet_follow_distance > PET_SEEK_DIST)
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -145,17 +145,18 @@ bool teleport_away(MONSTER_IDX m_idx, POSITION dis, BIT_FLAGS mode)
145145 */
146146 void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power, BIT_FLAGS mode)
147147 {
148- int ny, nx, oy, ox, d, i, min;
148+ POSITION ny, nx, oy, ox;
149+ int d, i, min;
149150 int attempts = 500;
150- int dis = 2;
151+ POSITION dis = 2;
151152 bool look = TRUE;
152153 monster_type *m_ptr = &m_list[m_idx];
153154
154155 /* Paranoia */
155- if (!m_ptr->r_idx) return;
156+ if(!m_ptr->r_idx) return;
156157
157158 /* "Skill" test */
158- if (randint1(100) > power) return;
159+ if(randint1(100) > power) return;
159160
160161 /* Initialize */
161162 ny = m_ptr->fy;
@@ -258,7 +259,7 @@ void teleport_monster_to(MONSTER_IDX m_idx, POSITION ty, POSITION tx, int power,
258259 * </pre>
259260 */
260261
261-bool teleport_player_aux(int dis, BIT_FLAGS mode)
262+bool teleport_player_aux(POSITION dis, BIT_FLAGS mode)
262263 {
263264 int candidates_at[MAX_TELEPORT_DISTANCE + 1];
264265 int total_candidates, cur_candidates;
@@ -374,7 +375,7 @@ bool teleport_player_aux(int dis, BIT_FLAGS mode)
374375 * @param mode オプション
375376 * @return なし
376377 */
377-void teleport_player(int dis, BIT_FLAGS mode)
378+void teleport_player(POSITION dis, BIT_FLAGS mode)
378379 {
379380 int yy, xx;
380381
@@ -418,7 +419,7 @@ void teleport_player(int dis, BIT_FLAGS mode)
418419 * @param dis テレポート距離
419420 * @return なし
420421 */
421-void teleport_player_away(MONSTER_IDX m_idx, int dis)
422+void teleport_player_away(MONSTER_IDX m_idx, POSITION dis)
422423 {
423424 int yy, xx;
424425
@@ -472,7 +473,7 @@ void teleport_player_away(MONSTER_IDX m_idx, int dis)
472473 void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode)
473474 {
474475 POSITION y, x;
475- int dis = 0, ctr = 0;
476+ POSITION dis = 0, ctr = 0;
476477
477478 if (p_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
478479 {
--- a/src/z-virt.c
+++ b/src/z-virt.c
@@ -11,10 +11,8 @@
1111 /* Purpose: Memory management routines -BEN- */
1212
1313 #include "z-virt.h"
14-
1514 #include "z-util.h"
1615
17-
1816 /*
1917 * Allow debugging messages to track memory usage.
2018 */
Show on old repository browser