OSDN Git Service

[Refactor] #37353 SUB_ALIGN_* を monster.h へ移動.
authordeskull <deskull@users.sourceforge.jp>
Tue, 4 Jun 2019 14:19:16 +0000 (23:19 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 4 Jun 2019 14:19:16 +0000 (23:19 +0900)
src/defines.h
src/monster.h

index d24a80f..46eda89 100644 (file)
 #define SLF_SECOND              0x0001  /* Called from another save/load function */
 #define SLF_NO_KILL      0x0002  /* Don't kill temporal files */
 
-
-/* Sub-alignment flags for neutral monsters */
-#define SUB_ALIGN_NEUTRAL 0x0000
-#define SUB_ALIGN_EVIL    0x0001
-#define SUB_ALIGN_GOOD    0x0002
-
 /*
  * Max numbers of macro trigger names
  */
index b532a58..f4cab6a 100644 (file)
@@ -19,7 +19,12 @@ struct monster_type
 {
        MONRACE_IDX r_idx;              /* Monster race index 0 = dead. */
        MONRACE_IDX ap_r_idx;   /* Monster race appearance index */
-       byte sub_align;         /* Sub-alignment for a neutral monster */
+
+       /* Sub-alignment flags for neutral monsters */
+       #define SUB_ALIGN_NEUTRAL 0x0000
+       #define SUB_ALIGN_EVIL    0x0001
+       #define SUB_ALIGN_GOOD    0x0002
+       BIT_FLAGS8 sub_align;           /* Sub-alignment for a neutral monster */
 
        POSITION fy;            /* Y location on map */
        POSITION fx;            /* X location on map */