added macros for MM style wall handling
authorHolger Schemel <info@artsoft.org>
Mon, 6 Mar 2017 17:37:34 +0000 (18:37 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:10 +0000 (23:21 +0100)
src/main.h

index 9e164247be52a1ffedf90684e615cffd91c6fc7a..70a94900afef51d746e7bb7d36797d83c13b3a99 100644 (file)
                                 ((e) >= EL_DF_WALL_START &&            \
                                  (e) <= EL_DF_WALL_END))
 
-#define IS_DF_WALL(e)          (((e) >= EL_DF_WALL_START &&            \
-                                 (e) <= EL_DF_WALL_END))
+#define IS_DF_WALL(e)          ((e) >= EL_DF_WALL_START &&             \
+                                (e) <= EL_DF_WALL_END)
+
+#define IS_MM_WALL_EDITOR(e)   ((e) == EL_MM_STEEL_WALL ||             \
+                                (e) == EL_MM_WOODEN_WALL ||            \
+                                (e) == EL_MM_ICE_WALL ||               \
+                                (e) == EL_MM_AMOEBA_WALL ||            \
+                                (e) == EL_DF_STEEL_WALL ||             \
+                                (e) == EL_DF_WOODEN_WALL)
 
 #define IS_ENVELOPE(e)         ((e) >= EL_ENVELOPE_1 &&                \
                                 (e) <= EL_ENVELOPE_4)
 #define IS_DC_STEELWALL_2(e)   ((e) >= EL_DC_STEELWALL_2_LEFT &&       \
                                 (e) <= EL_DC_STEELWALL_2_SINGLE)
 
+#define MM_WALL_BASE(e)                ((e) & 0xfff0)
+#define MM_WALL_BITS(e)                ((e) & 0x000f)
+
 #define GFX_ELEMENT(e)         (element_info[e].gfx_element)
 
 /* !!! CHECK THIS !!! */