From b1ef47c2169ef4cf3ced913a2aab9ac04ba47960 Mon Sep 17 00:00:00 2001 From: Hourier Date: Sun, 7 Jun 2020 23:16:57 +0900 Subject: [PATCH] [Refactor] #40014 Separated monster-timed-effect-types.h from monster.h --- Hengband/Hengband/Hengband.vcxproj | 1 + Hengband/Hengband/Hengband.vcxproj.filters | 3 +++ src/Makefile.am | 1 + src/monster/monster-timed-effect-types.h | 12 ++++++++++++ src/monster/monster.h | 14 +------------- src/system/system-variables.h | 2 ++ 6 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 src/monster/monster-timed-effect-types.h diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index 9fd981575..065a01300 100644 --- a/Hengband/Hengband/Hengband.vcxproj +++ b/Hengband/Hengband/Hengband.vcxproj @@ -532,6 +532,7 @@ + diff --git a/Hengband/Hengband/Hengband.vcxproj.filters b/Hengband/Hengband/Hengband.vcxproj.filters index 0c7d4926b..1d96f2928 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -2701,6 +2701,9 @@ monster + + monster + diff --git a/src/Makefile.am b/src/Makefile.am index dffac461a..50e05b90e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -290,6 +290,7 @@ hengband_SOURCES = \ monster/monster-process.c monster/monster-process.h \ monster/monster-runaway.c monster/monster-runaway.h \ monster/monster-safety-hiding.c monster/monster-safety-hiding.h \ + monster/monster-timed-effect-types.h \ monster/place-monster-types.h \ monster/smart-learn-types.h \ monster/monster-status.c monster/monster-status.h \ diff --git a/src/monster/monster-timed-effect-types.h b/src/monster/monster-timed-effect-types.h new file mode 100644 index 000000000..c8411db1d --- /dev/null +++ b/src/monster/monster-timed-effect-types.h @@ -0,0 +1,12 @@ +#pragma once + +typedef enum monster_timed_effect_type { + MTIMED_CSLEEP = 0, /* Monster is sleeping */ + MTIMED_FAST = 1, /* Monster is temporarily fast */ + MTIMED_SLOW = 2, /* Monster is temporarily slow */ + MTIMED_STUNNED = 3, /* Monster is stunned */ + MTIMED_CONFUSED = 4, /* Monster is confused */ + MTIMED_MONFEAR = 5, /* Monster is afraid */ + MTIMED_INVULNER = 6, /* Monster is temporarily invulnerable */ + MAX_MTIMED = 7, +} monster_timed_effect_type; diff --git a/src/monster/monster.h b/src/monster/monster.h index dc7616d2c..fbf968991 100644 --- a/src/monster/monster.h +++ b/src/monster/monster.h @@ -1,5 +1,6 @@ #pragma once +#include "monster/monster-timed-effect-types.h" #include "monster-race/monster-race.h" typedef bool(*monsterrace_hook_type)(MONRACE_IDX r_idx); @@ -7,19 +8,6 @@ typedef bool(*monsterrace_hook_type)(MONRACE_IDX r_idx); extern MONSTER_IDX hack_m_idx; extern MONSTER_IDX hack_m_idx_ii; -/* Maximum "Nazguls" number */ -#define MAX_NAZGUL_NUM 5 - -#define MTIMED_CSLEEP 0 /* Monster is sleeping */ -#define MTIMED_FAST 1 /* Monster is temporarily fast */ -#define MTIMED_SLOW 2 /* Monster is temporarily slow */ -#define MTIMED_STUNNED 3 /* Monster is stunned */ -#define MTIMED_CONFUSED 4 /* Monster is confused */ -#define MTIMED_MONFEAR 5 /* Monster is afraid */ -#define MTIMED_INVULNER 6 /* Monster is temporarily invulnerable */ - -#define MAX_MTIMED 7 - /* * Monster information, for a specific monster. * Note: fy, fx constrain dungeon size to 256x256 diff --git a/src/system/system-variables.h b/src/system/system-variables.h index a656c7160..2759eeb54 100644 --- a/src/system/system-variables.h +++ b/src/system/system-variables.h @@ -2,6 +2,8 @@ #include "system/angband.h" +#define MAX_NAZGUL_NUM 5 + typedef enum init_flags_type { INIT_NAME_ONLY = 0x01, INIT_SHOW_TEXT = 0x02, -- 2.11.0