#define IS_INTERNAL_ELEMENT(e) ((e) >= EL_INTERNAL_START && \
(e) <= EL_INTERNAL_END)
+#define IS_MM_ELEMENT(e) ((e) >= EL_MM_START && \
+ (e) <= EL_MM_END)
+
+#define IS_DF_ELEMENT(e) ((e) >= EL_DF_START && \
+ (e) <= EL_DF_END)
+
+#define IS_MM_MCDUFFIN(e) ((e) >= EL_MM_MCDUFFIN_START && \
+ (e) <= EL_MM_MCDUFFIN_END)
+
+#define IS_DF_LASER(e) ((e) >= EL_DF_LASER_START && \
+ (e) <= EL_DF_LASER_END)
+
+#define IS_MM_WALL(e) (((e) >= EL_MM_WALL_START && \
+ (e) <= EL_MM_WALL_END) || \
+ ((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 !!! */
#define EL_FROM_LEVEL_TEMPLATE 863
#define EL_MM_START 864
+#define EL_MM_START_1 EL_MM_START
+
#define EL_MM_EMPTY_SPACE (EL_MM_START + 0)
#define EL_MM_EMPTY EL_MM_EMPTY_SPACE
#define EL_MM_MIRROR_START (EL_MM_START + 1)
#define EL_MM_WOODEN_GRID_FIXED_END EL_MM_WOODEN_GRID_FIXED_03
#define EL_MM_FUEL_EMPTY (EL_MM_START + 155)
-#define EL_DF_START (EL_MM_START + 156)
+#define EL_MM_UNUSED_156 (EL_MM_START + 156)
+#define EL_MM_UNUSED_157 (EL_MM_START + 157)
+#define EL_MM_UNUSED_158 (EL_MM_START + 158)
+#define EL_MM_UNUSED_159 (EL_MM_START + 159)
+
+#define EL_MM_END_1 (EL_MM_START + 159)
+#define EL_MM_START_2 (EL_MM_START + 160)
+
+#define EL_DF_START EL_MM_START_2
#define EL_DF_START2 (EL_DF_START - 240)
#define EL_DF_MIRROR_START EL_DF_START
#define EL_MM_BEAMER_BLUE_16 (EL_MM_BEAMER_BLUE_START + 15)
#define EL_MM_BEAMER_BLUE_END EL_MM_BEAMER_BLUE_16
-#define EL_MM_MCDUFFIN 1200
-#define EL_MM_PACMAN 1201
-#define EL_MM_FUSE 1202
-#define EL_MM_STEEL_WALL 1203
-#define EL_MM_WOODEN_WALL 1204
-#define EL_MM_ICE_WALL 1205
-#define EL_MM_AMOEBA_WALL 1206
-#define EL_DF_LASER 1207
-#define EL_DF_RECEIVER 1208
-#define EL_DF_STEEL_WALL 1209
-#define EL_DF_WOODEN_WALL 1210
+#define EL_MM_MCDUFFIN 1204
+#define EL_MM_PACMAN 1205
+#define EL_MM_FUSE 1206
+#define EL_MM_STEEL_WALL 1207
+#define EL_MM_WOODEN_WALL 1208
+#define EL_MM_ICE_WALL 1209
+#define EL_MM_AMOEBA_WALL 1210
+#define EL_DF_LASER 1211
+#define EL_DF_RECEIVER 1212
+#define EL_DF_STEEL_WALL 1213
+#define EL_DF_WOODEN_WALL 1214
-#define EL_MM_END (EL_DF_START2 + 430)
+#define EL_MM_END_2 (EL_DF_START2 + 430)
+#define EL_MM_END EL_MM_END_2
-#define NUM_FILE_ELEMENTS 1211
+#define NUM_FILE_ELEMENTS 1215
/* "real" (and therefore drawable) runtime elements */
#define EL_MM_GRAY_BALL_OPENING (EL_FIRST_RUNTIME_REAL + 74)
#define EL_MM_ICE_WALL_SHRINKING (EL_FIRST_RUNTIME_REAL + 75)
#define EL_MM_AMOEBA_WALL_GROWING (EL_FIRST_RUNTIME_REAL + 76)
+#define EL_MM_PACMAN_EATING_RIGHT (EL_FIRST_RUNTIME_REAL + 77)
+#define EL_MM_PACMAN_EATING_UP (EL_FIRST_RUNTIME_REAL + 78)
+#define EL_MM_PACMAN_EATING_LEFT (EL_FIRST_RUNTIME_REAL + 79)
+#define EL_MM_PACMAN_EATING_DOWN (EL_FIRST_RUNTIME_REAL + 80)
-#define NUM_DRAWABLE_ELEMENTS (EL_FIRST_RUNTIME_REAL + 77)
+#define NUM_DRAWABLE_ELEMENTS (EL_FIRST_RUNTIME_REAL + 81)
#define EL_MM_RUNTIME_START EL_MM_EXIT_OPENING
#define EL_MM_RUNTIME_END EL_MM_AMOEBA_WALL_GROWING
int time; /* available time (seconds) */
int gems_needed;
+ boolean auto_count_gems;
char name[MAX_LEVEL_NAME_LEN + 1];
char author[MAX_LEVEL_AUTHOR_LEN + 1];
boolean block_last_field; /* player blocks previous field while moving */
boolean sp_block_last_field; /* player blocks previous field while moving */
+ /* values for MM/DF elements */
+ boolean mm_laser_red, mm_laser_green, mm_laser_blue;
+ boolean df_laser_red, df_laser_green, df_laser_blue;
+ int mm_time_fuse;
+
/* ('int' instead of 'boolean' because used as selectbox value in editor) */
int use_step_counter; /* count steps instead of seconds for level */
boolean use_custom_template; /* use custom properties from template file */
+ boolean file_has_custom_elements; /* set when level file contains CEs */
+
boolean no_valid_file; /* set when level file missing or invalid */
boolean no_level_file; /* set when falling back to level template */