From: Holger Schemel Date: Mon, 6 Mar 2017 17:37:34 +0000 (+0100) Subject: added macros for MM style wall handling X-Git-Tag: 4.1.0.0~177 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=52a7fca6ef16e7152005b80d1a3221de95dc8f60;p=rocksndiamonds.git added macros for MM style wall handling --- diff --git a/src/main.h b/src/main.h index 9e164247..70a94900 100644 --- a/src/main.h +++ b/src/main.h @@ -685,8 +685,15 @@ ((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) @@ -777,6 +784,9 @@ #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 !!! */