• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision580928e4aaa05c34f429fefb8ff9841a78eb3467 (tree)
Time2019-05-17 00:01:39
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 hack_m_idx, hack_m_idx_ii を monster2.c / monster.h へ移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -56,8 +56,6 @@ extern s16b command_new;
5656
5757 extern bool repair_monsters;
5858 extern bool repair_objects;
59-extern MONSTER_IDX hack_m_idx;
60-extern MONSTER_IDX hack_m_idx_ii;
6159 extern int total_friends;
6260 extern bool reinit_wilderness;
6361
--- a/src/monster-process.c
+++ b/src/monster-process.c
@@ -3274,7 +3274,6 @@ void process_monsters(void)
32743274 /* Use up "some" energy */
32753275 m_ptr->energy_need += ENERGY_NEED();
32763276
3277-
32783277 /* Save global index */
32793278 hack_m_idx = i;
32803279
--- a/src/monster.h
+++ b/src/monster.h
@@ -3,6 +3,9 @@
33
44 typedef bool(*monsterrace_hook_type)(MONRACE_IDX r_idx);
55
6+extern MONSTER_IDX hack_m_idx;
7+extern MONSTER_IDX hack_m_idx_ii;
8+
69 /*
710 * Monster information, for a specific monster.
811 * Note: fy, fx constrain dungeon size to 256x256
--- a/src/monster2.c
+++ b/src/monster2.c
@@ -41,6 +41,8 @@
4141 #define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
4242 #define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
4343
44+MONSTER_IDX hack_m_idx = 0; /* Hack -- see "process_monsters()" */
45+MONSTER_IDX hack_m_idx_ii = 0;
4446
4547 /*!
4648 * @brief モンスターの目標地点をセットする / Set the target of counter attack
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -1912,7 +1912,7 @@ void spell_RF6_TPORT(MONSTER_IDX m_idx, int TARGET_TYPE)
19121912 */
19131913 HIT_POINT spell_RF6_WORLD(MONSTER_IDX m_idx)
19141914 {
1915- monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
1915+ monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
19161916 MONSTER_IDX who = 0;
19171917 GAME_TEXT m_name[MAX_NLEN];
19181918 monster_name(m_idx, m_name);
--- a/src/variable.c
+++ b/src/variable.c
@@ -29,9 +29,6 @@ s16b command_new; /* Command chaining from inven/equip view */
2929 bool repair_monsters; /* Hack -- optimize detect monsters */
3030 bool repair_objects; /* Hack -- optimize detect objects */
3131
32-MONSTER_IDX hack_m_idx = 0; /* Hack -- see "process_monsters()" */
33-MONSTER_IDX hack_m_idx_ii = 0;
34-
3532 int total_friends = 0;
3633
3734 bool reinit_wilderness = FALSE;
Show on old repository browser