added setup option to show/hide classic elements in the editor palette
authorHolger Schemel <info@artsoft.org>
Tue, 31 Jan 2017 18:31:48 +0000 (19:31 +0100)
committerHolger Schemel <info@artsoft.org>
Tue, 31 Jan 2017 18:31:48 +0000 (19:31 +0100)
src/editor.c
src/files.c
src/libgame/system.h
src/screens.c

index fd1dfbd..8d9f582 100644 (file)
@@ -4829,7 +4829,6 @@ static boolean use_el_empty = FALSE;
 static int *editor_elements = NULL;    /* dynamically allocated */
 static int num_editor_elements = 0;    /* dynamically determined */
 
-static boolean setup_editor_show_always = TRUE;
 static boolean setup_editor_cascade_never = FALSE;
 
 static int editor_hl_unused[] = { EL_EMPTY };
@@ -4852,67 +4851,67 @@ static struct
 editor_elements_info[] =
 {
   {
-    &setup_editor_show_always,
+    &setup.editor.el_classic,
     &setup_editor_cascade_never,
     &editor_hl_unused_ptr,             &num_editor_hl_unused,
     &editor_el_players_ptr,            &num_editor_el_players
   },
   {
-    &setup.editor.el_boulderdash,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_bd,
     &editor_hl_boulderdash_ptr,                &num_editor_hl_boulderdash,
     &editor_el_boulderdash_ptr,                &num_editor_el_boulderdash
   },
   {
-    &setup.editor.el_emerald_mine,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_em,
     &editor_hl_emerald_mine_ptr,       &num_editor_hl_emerald_mine,
     &editor_el_emerald_mine_ptr,       &num_editor_el_emerald_mine
   },
   {
-    &setup.editor.el_emerald_mine_club,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_emc,
     &editor_hl_emerald_mine_club_ptr,  &num_editor_hl_emerald_mine_club,
     &editor_el_emerald_mine_club_ptr,  &num_editor_el_emerald_mine_club
   },
   {
-    &setup.editor.el_more,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_rnd,
     &editor_hl_rnd_ptr,                        &num_editor_hl_rnd,
     &editor_el_rnd_ptr,                        &num_editor_el_rnd
   },
   {
-    &setup.editor.el_sokoban,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_sb,
     &editor_hl_sokoban_ptr,            &num_editor_hl_sokoban,
     &editor_el_sokoban_ptr,            &num_editor_el_sokoban
   },
   {
-    &setup.editor.el_supaplex,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_sp,
     &editor_hl_supaplex_ptr,           &num_editor_hl_supaplex,
     &editor_el_supaplex_ptr,           &num_editor_el_supaplex
   },
   {
-    &setup.editor.el_diamond_caves,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_dc,
     &editor_hl_diamond_caves_ptr,      &num_editor_hl_diamond_caves,
     &editor_el_diamond_caves_ptr,      &num_editor_el_diamond_caves
   },
   {
-    &setup.editor.el_dx_boulderdash,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_dx,
     &editor_hl_dx_boulderdash_ptr,     &num_editor_hl_dx_boulderdash,
     &editor_el_dx_boulderdash_ptr,     &num_editor_el_dx_boulderdash
   },
   {
-    &setup.editor.el_chars,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_chars,
     &editor_hl_chars_ptr,              &num_editor_hl_chars,
     &editor_el_chars_ptr,              &num_editor_el_chars
   },
   {
-    &setup.editor.el_steel_chars,
+    &setup.editor.el_classic,
     &setup.editor_cascade.el_steel_chars,
     &editor_hl_steel_chars_ptr,                &num_editor_hl_steel_chars,
     &editor_el_steel_chars_ptr,                &num_editor_el_steel_chars
index b55395f..419399b 100644 (file)
@@ -7975,14 +7975,13 @@ void SaveScore(int nr)
 #define NUM_GLOBAL_SETUP_TOKENS                        43
 
 /* editor setup */
-#define SETUP_TOKEN_EDITOR_EL_CHARS            0
-#define SETUP_TOKEN_EDITOR_EL_STEEL_CHARS      1
-#define SETUP_TOKEN_EDITOR_EL_CUSTOM           2
-#define SETUP_TOKEN_EDITOR_EL_USER_DEFINED     3
-#define SETUP_TOKEN_EDITOR_EL_DYNAMIC          4
-#define SETUP_TOKEN_EDITOR_SHOW_ELEMENT_TOKEN  5
+#define SETUP_TOKEN_EDITOR_EL_CLASSIC          0
+#define SETUP_TOKEN_EDITOR_EL_CUSTOM           1
+#define SETUP_TOKEN_EDITOR_EL_USER_DEFINED     2
+#define SETUP_TOKEN_EDITOR_EL_DYNAMIC          3
+#define SETUP_TOKEN_EDITOR_SHOW_ELEMENT_TOKEN  4
 
-#define NUM_EDITOR_SETUP_TOKENS                        6
+#define NUM_EDITOR_SETUP_TOKENS                        5
 
 /* editor cascade setup */
 #define SETUP_TOKEN_EDITOR_CASCADE_BD          0
@@ -8167,8 +8166,7 @@ static struct TokenInfo global_setup_tokens[] =
 
 static struct TokenInfo editor_setup_tokens[] =
 {
-  { TYPE_SWITCH, &sei.el_chars,                "editor.el_chars"               },
-  { TYPE_SWITCH, &sei.el_steel_chars,  "editor.el_steel_chars"         },
+  { TYPE_SWITCH, &sei.el_classic,      "editor.el_classic"             },
   { TYPE_SWITCH, &sei.el_custom,       "editor.el_custom"              },
   { TYPE_SWITCH, &sei.el_user_defined, "editor.el_user_defined"        },
   { TYPE_SWITCH, &sei.el_dynamic,      "editor.el_dynamic"             },
@@ -8376,9 +8374,12 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->editor.el_dx_boulderdash         = TRUE;
   si->editor.el_chars                  = TRUE;
   si->editor.el_steel_chars            = TRUE;
+
+  si->editor.el_classic                        = TRUE;
   si->editor.el_custom                 = TRUE;
 
   si->editor.el_headlines = TRUE;
+
   si->editor.el_user_defined = FALSE;
   si->editor.el_dynamic = TRUE;
 
index 25be3c8..ad6976c 100644 (file)
@@ -969,6 +969,8 @@ struct SetupEditorInfo
   boolean el_dx_boulderdash;
   boolean el_chars;
   boolean el_steel_chars;
+
+  boolean el_classic;
   boolean el_custom;
   boolean el_user_defined;
   boolean el_dynamic;
index b2c61ea..c1f1648 100644 (file)
@@ -5356,9 +5356,10 @@ static struct TokenInfo setup_info_editor[] =
   { TYPE_SWITCH,       &setup.editor.el_supaplex,      "Supaplex:"     },
   { TYPE_SWITCH,       &setup.editor.el_diamond_caves, "Diamond Caves II:" },
   { TYPE_SWITCH,       &setup.editor.el_dx_boulderdash,"DX-Boulderdash:" },
-#endif
   { TYPE_SWITCH,       &setup.editor.el_chars,         "Text Characters:" },
   { TYPE_SWITCH, &setup.editor.el_steel_chars, "Text Characters (Steel):" },
+#endif
+  { TYPE_SWITCH,       &setup.editor.el_classic,  "Classic Elements:" },
   { TYPE_SWITCH,       &setup.editor.el_custom,  "Custom & Group Elements:" },
 #if 0
   { TYPE_SWITCH,       &setup.editor.el_headlines,     "Headlines:"    },