OSDN Git Service

[Refactor] #37353 health_track() を view-mainwindow.c/h に移動。
authordeskull <deskull@users.sourceforge.jp>
Sat, 20 Apr 2019 07:19:01 +0000 (16:19 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sat, 20 Apr 2019 07:19:01 +0000 (16:19 +0900)
14 files changed:
src/cmd-basic.c
src/cmd-pet.c
src/externs.h
src/grid.c
src/melee1.c
src/mind.c
src/monster2.c
src/player-move.c
src/shoot.c
src/spells1.c
src/spells3.c
src/view-mainwindow.c
src/view-mainwindow.h
src/xtra2.c

index 84a7e9b..fb252c6 100644 (file)
@@ -39,6 +39,8 @@
 #include "dungeon-file.h"
 #include "files.h"
 
+#include "view-mainwindow.h"
+
 /*!
  * @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理
  * @param down_stair TRUEならば階段を降りる処理、FALSEなら階段を昇る処理による内容
index 187d1fd..e92c2c7 100644 (file)
@@ -11,6 +11,7 @@
 #include "monster-status.h"
 #include "cmd-pet.h"
 #include "cmd-basic.h"
+#include "view-mainwindow.h"
 
 /*!
 * @brief プレイヤーの騎乗/下馬処理判定
index 84d2841..0d3a0df 100644 (file)
@@ -422,7 +422,6 @@ extern void update_flow(void);
 extern void update_smell(void);
 extern void cave_set_feat(POSITION y, POSITION x, FEAT_IDX feat);
 
-extern void health_track(MONSTER_IDX m_idx);
 extern void monster_race_track(MONRACE_IDX r_idx);
 extern void object_kind_track(KIND_OBJECT_IDX k_idx);
 extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
index 8e5f3cf..8bb2f82 100644 (file)
@@ -2138,23 +2138,6 @@ bool is_explosive_rune_grid(grid_type *g_ptr)
 
 
 /*
- * Track a new monster
- */
-void health_track(MONSTER_IDX m_idx)
-{
-       /* Mount monster is already tracked */
-       if (m_idx && m_idx == p_ptr->riding) return;
-
-       /* Track a new guy */
-       p_ptr->health_who = m_idx;
-
-       /* Redraw (later) */
-       p_ptr->redraw |= (PR_HEALTH);
-}
-
-
-
-/*
  * Hack -- track the given monster race
  */
 void monster_race_track(MONRACE_IDX r_idx)
index e09de5c..bfb7a6a 100644 (file)
@@ -31,6 +31,7 @@
 #include "spells.h"
 #include "files.h"
 #include "player-effects.h"
+#include "view-mainwindow.h"
 
 
 
index 1c86941..89d68ca 100644 (file)
@@ -30,6 +30,7 @@
 #include "cmd-basic.h"
 #include "monster-status.h"
 #include "player-effects.h"
+#include "view-mainwindow.h"
 
 /*! 特殊技能の一覧テーブル */
 mind_power const mind_powers[5] =
index 2c2377a..4b0224f 100644 (file)
@@ -27,6 +27,7 @@
 #include "player-status.h"
 #include "monster-spell.h"
 #include "files.h"
+#include "view-mainwindow.h"
 
 #define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
 #define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
index 8d121c2..052326b 100644 (file)
 #include "object-flavor.h"
 #include "spells.h"
 #include "cmd-basic.h"
+#include "view-mainwindow.h"
 
 
 
index 159b145..bc63d12 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "shoot.h"
 #include "snipe.h"
+#include "view-mainwindow.h"
 
 /*!
  * @brief 矢弾を射撃した際のスレイ倍率をかけた結果を返す /
index e62d0ba..c00688d 100644 (file)
@@ -44,6 +44,7 @@
 #include "term.h"
 #include "grid.h"
 #include "feature.h"
+#include "view-mainwindow.h"
 
 
 static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
index 30b1d59..ef857f2 100644 (file)
@@ -34,6 +34,7 @@
 #include "floor-save.h"
 #include "files.h"
 #include "player-effects.h"
+#include "view-mainwindow.h"
 
 
 /*! テレポート先探索の試行数 / Maximum number of tries for teleporting */
index 41594b9..44dde0f 100644 (file)
@@ -3744,3 +3744,19 @@ void do_cmd_view_map(void)
        screen_load();
 }
 
+/*
+ * Track a new monster
+ */
+void health_track(MONSTER_IDX m_idx)
+{
+       /* Mount monster is already tracked */
+       if (m_idx && m_idx == p_ptr->riding) return;
+
+       /* Track a new guy */
+       p_ptr->health_who = m_idx;
+
+       /* Redraw (later) */
+       p_ptr->redraw |= (PR_HEALTH);
+}
+
+
index 8e8911d..fc5d0b4 100644 (file)
@@ -6,3 +6,5 @@ extern void prt_map(void);
 extern void map_info(POSITION y, POSITION x, TERM_COLOR *ap, SYMBOL_CODE *cp, TERM_COLOR *tap, SYMBOL_CODE *tcp);
 extern void display_map(int *cy, int *cx);
 extern void do_cmd_view_map(void);
+
+extern void health_track(MONSTER_IDX m_idx);
index a614c54..04bbc6d 100644 (file)
@@ -27,6 +27,7 @@
 #include "player-move.h"
 #include "player-status.h"
 #include "monster-status.h"
+#include "view-mainwindow.h"
 
 /*!
  * @brief コンソール上におけるマップ表示の左上位置を返す /