static int num_editor_hl_group = ARRAY_SIZE(editor_hl_group);
static int num_editor_el_group = ARRAY_SIZE(editor_el_group);
+static int editor_hl_empty_space[] =
+{
+ EL_INTERNAL_CASCADE_ES_ACTIVE,
+ EL_CHAR('E'),
+ EL_CHAR('S'),
+ EL_EMPTY,
+};
+
+static int editor_el_empty_space[] =
+{
+ EL_EMPTY_SPACE_1,
+ EL_EMPTY_SPACE_2,
+ EL_EMPTY_SPACE_3,
+ EL_EMPTY_SPACE_4,
+
+ EL_EMPTY_SPACE_5,
+ EL_EMPTY_SPACE_6,
+ EL_EMPTY_SPACE_7,
+ EL_EMPTY_SPACE_8,
+
+ EL_EMPTY_SPACE_9,
+ EL_EMPTY_SPACE_10,
+ EL_EMPTY_SPACE_11,
+ EL_EMPTY_SPACE_12,
+
+ EL_EMPTY_SPACE_13,
+ EL_EMPTY_SPACE_14,
+ EL_EMPTY_SPACE_15,
+ EL_EMPTY_SPACE_16
+};
+static int *editor_hl_empty_space_ptr = editor_hl_empty_space;
+static int *editor_el_empty_space_ptr = editor_el_empty_space;
+static int num_editor_hl_empty_space = ARRAY_SIZE(editor_hl_empty_space);
+static int num_editor_el_empty_space = ARRAY_SIZE(editor_el_empty_space);
+
static int editor_hl_reference[] =
{
EL_INTERNAL_CASCADE_REF_ACTIVE,
&editor_hl_group_ptr, &num_editor_hl_group,
&editor_el_group_ptr, &num_editor_el_group
},
+ {
+ &setup_editor_el_custom,
+ &setup.editor_cascade.el_es,
+ &editor_hl_empty_space_ptr, &num_editor_hl_empty_space,
+ &editor_el_empty_space_ptr, &num_editor_el_empty_space
+ },
{
&setup_editor_el_custom,
&setup.editor_cascade.el_ref,
custom_element = element_info[element]; // needed for description
}
+static void CopyEmptyElementPropertiesToEditor(int element)
+{
+ custom_element = element_info[element];
+}
+
static void CopyClassicElementPropertiesToEditor(int element)
{
if (IS_PLAYER_ELEMENT(element) || COULD_MOVE_INTO_ACID(element))
CopyCustomElementPropertiesToEditor(element);
else if (IS_GROUP_ELEMENT(element))
CopyGroupElementPropertiesToEditor(element);
+ else if (IS_EMPTY_ELEMENT(element))
+ CopyEmptyElementPropertiesToEditor(element);
else
CopyClassicElementPropertiesToEditor(element);
}
InitElementPropertiesGfxElement();
}
+static void CopyEmptyElementPropertiesToGame(int element)
+{
+ // mark that this empty element has been modified
+ custom_element.modified_settings = TRUE;
+ level.changed = TRUE;
+
+ if (level.use_custom_template)
+ AskToCopyAndModifyLevelTemplate();
+
+ element_info[element] = custom_element;
+
+ // needed here to restore runtime value "element_info[element].gfx_element"
+ InitElementPropertiesGfxElement();
+}
+
static void CopyClassicElementPropertiesToGame(int element)
{
if (IS_PLAYER_ELEMENT(element) || COULD_MOVE_INTO_ACID(element))
CopyCustomElementPropertiesToGame(element);
else if (IS_GROUP_ELEMENT(element))
CopyGroupElementPropertiesToGame(element);
+ else if (IS_EMPTY_ELEMENT(element))
+ CopyEmptyElementPropertiesToGame(element);
else
CopyClassicElementPropertiesToGame(element);
}
if (IS_GEM(element) ||
IS_CUSTOM_ELEMENT(element) ||
IS_GROUP_ELEMENT(element) ||
+ IS_EMPTY_ELEMENT(element) ||
IS_BALLOON_ELEMENT(element) ||
IS_ENVELOPE(element) ||
IS_MM_MCDUFFIN(element) ||
draw_footer_line = TRUE;
}
+ else if (IS_EMPTY_ELEMENT(properties_element))
+ {
+ // draw stickybutton gadget
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_STICK_ELEMENT);
+
+ // draw checkbutton gadgets
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC);
+ MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE_1);
+
+ // draw textbutton gadgets
+ MapTextbuttonGadget(ED_TEXTBUTTON_ID_SAVE_AS_TEMPLATE_1);
+
+ // draw drawing area gadgets
+ MapDrawingArea(ED_DRAWING_ID_CUSTOM_GRAPHIC);
+
+ draw_footer_line = TRUE;
+ }
// draw little footer border line above CE/GE use/save template gadgets
if (draw_footer_line)
boolean template_related_changes_found = FALSE;
int i;
- // check if any custom or group elements have been changed
+ // check if any custom, group or empty elements have been changed
for (i = 0; i < NUM_FILE_ELEMENTS; i++)
- if ((IS_CUSTOM_ELEMENT(i) || IS_GROUP_ELEMENT(i)) &&
+ if ((IS_CUSTOM_ELEMENT(i) ||
+ IS_GROUP_ELEMENT(i) ||
+ IS_EMPTY_ELEMENT(i)) &&
element_info[i].modified_settings)
template_related_changes_found = TRUE;