added additional empty space elements to level editor
authorHolger Schemel <info@artsoft.org>
Fri, 26 Nov 2021 12:27:51 +0000 (13:27 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 22 Jan 2022 16:58:28 +0000 (17:58 +0100)
src/editor.c
src/files.c
src/init.c
src/libgame/system.h
src/main.c
src/main.h

index 7f63d89eec53de1db4fc33587be48a05be5f7abb..b32cbd82fbbcedf767faf2f4e9814063571d5cf8 100644 (file)
@@ -5272,6 +5272,41 @@ static int *editor_el_group_ptr = editor_el_group;
 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,
@@ -5484,6 +5519,12 @@ editor_elements_info[] =
     &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,
index d78432d1ebb372df5ca77f21b97809554666b177..bffb16052eab5ce67593c85d8296d430d0bd57ed 100644 (file)
@@ -10214,6 +10214,10 @@ static struct TokenInfo editor_cascade_setup_tokens[] =
     TYPE_SWITCH,
     &setup.editor_cascade.el_ge,               "editor.cascade.el_ge"
   },
+  {
+    TYPE_SWITCH,
+    &setup.editor_cascade.el_es,               "editor.cascade.el_es"
+  },
   {
     TYPE_SWITCH,
     &setup.editor_cascade.el_ref,              "editor.cascade.el_ref"
@@ -10948,6 +10952,7 @@ static void setSetupInfoToDefaults_EditorCascade(struct SetupInfo *si)
   si->editor_cascade.el_steel_chars    = FALSE;
   si->editor_cascade.el_ce             = FALSE;
   si->editor_cascade.el_ge             = FALSE;
+  si->editor_cascade.el_es             = FALSE;
   si->editor_cascade.el_ref            = FALSE;
   si->editor_cascade.el_user           = FALSE;
   si->editor_cascade.el_dynamic                = FALSE;
index 114b177fb1578c19f30248069d85bf6a23acb350..c98670a495a856080ae1305642703de754484bce 100644 (file)
@@ -4348,6 +4348,7 @@ void InitElementPropertiesStatic(void)
     EL_INTERNAL_CASCADE_STEEL_CHARS_ACTIVE,
     EL_INTERNAL_CASCADE_CE_ACTIVE,
     EL_INTERNAL_CASCADE_GE_ACTIVE,
+    EL_INTERNAL_CASCADE_ES_ACTIVE,
     EL_INTERNAL_CASCADE_REF_ACTIVE,
     EL_INTERNAL_CASCADE_USER_ACTIVE,
     EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE,
@@ -4371,6 +4372,7 @@ void InitElementPropertiesStatic(void)
     EL_INTERNAL_CASCADE_STEEL_CHARS,
     EL_INTERNAL_CASCADE_CE,
     EL_INTERNAL_CASCADE_GE,
+    EL_INTERNAL_CASCADE_ES,
     EL_INTERNAL_CASCADE_REF,
     EL_INTERNAL_CASCADE_USER,
     EL_INTERNAL_CASCADE_DYNAMIC,
index 327cba881e18ab2b806c4823691f5056e6b53df4..4acc61d8858bb4dc68ee26271bc2b0196d19b3b9 100644 (file)
@@ -1355,6 +1355,7 @@ struct SetupEditorCascadeInfo
   boolean el_steel_chars;
   boolean el_ce;
   boolean el_ge;
+  boolean el_es;
   boolean el_ref;
   boolean el_user;
   boolean el_dynamic;
index 496a86c9e8d2ed1ad97377e731724982bb5b09be..4ef296f299673572ab459559f0eafef3e1fe057f 100644 (file)
@@ -7294,6 +7294,16 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "internal",
     "hide group elements"
   },
+  {
+    "internal_cascade_es",
+    "internal",
+    "show empty space elements"
+  },
+  {
+    "internal_cascade_es.active",
+    "internal",
+    "hide empty space elements"
+  },
   {
     "internal_cascade_ref",
     "internal",
index 3f2389cc2c38cfa287ca50e2c9d0727dd884c72b..9108054efe4fa91463d78b08e6198acc1645a9d0 100644 (file)
 #define EL_INTERNAL_CASCADE_CE_ACTIVE          (EL_FIRST_INTERNAL + 29)
 #define EL_INTERNAL_CASCADE_GE                 (EL_FIRST_INTERNAL + 30)
 #define EL_INTERNAL_CASCADE_GE_ACTIVE          (EL_FIRST_INTERNAL + 31)
-#define EL_INTERNAL_CASCADE_REF                        (EL_FIRST_INTERNAL + 32)
-#define EL_INTERNAL_CASCADE_REF_ACTIVE         (EL_FIRST_INTERNAL + 33)
-#define EL_INTERNAL_CASCADE_USER               (EL_FIRST_INTERNAL + 34)
-#define EL_INTERNAL_CASCADE_USER_ACTIVE                (EL_FIRST_INTERNAL + 35)
-#define EL_INTERNAL_CASCADE_DYNAMIC            (EL_FIRST_INTERNAL + 36)
-#define EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE     (EL_FIRST_INTERNAL + 37)
+#define EL_INTERNAL_CASCADE_ES                 (EL_FIRST_INTERNAL + 32)
+#define EL_INTERNAL_CASCADE_ES_ACTIVE          (EL_FIRST_INTERNAL + 33)
+#define EL_INTERNAL_CASCADE_REF                        (EL_FIRST_INTERNAL + 34)
+#define EL_INTERNAL_CASCADE_REF_ACTIVE         (EL_FIRST_INTERNAL + 35)
+#define EL_INTERNAL_CASCADE_USER               (EL_FIRST_INTERNAL + 36)
+#define EL_INTERNAL_CASCADE_USER_ACTIVE                (EL_FIRST_INTERNAL + 37)
+#define EL_INTERNAL_CASCADE_DYNAMIC            (EL_FIRST_INTERNAL + 38)
+#define EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE     (EL_FIRST_INTERNAL + 39)
 
 #define EL_INTERNAL_CLIPBOARD_START    (EL_FIRST_INTERNAL + 0)
 #define EL_INTERNAL_CLIPBOARD_END      (EL_FIRST_INTERNAL + 2)
 #define EL_INTERNAL_START              (EL_FIRST_INTERNAL + 0)
-#define EL_INTERNAL_END                        (EL_FIRST_INTERNAL + 37)
+#define EL_INTERNAL_END                        (EL_FIRST_INTERNAL + 39)
 
-#define MAX_NUM_ELEMENTS               (EL_FIRST_INTERNAL + 38)
+#define MAX_NUM_ELEMENTS               (EL_FIRST_INTERNAL + 40)
 
 
 // values for graphics/sounds action types