From: Holger Schemel Date: Tue, 31 Jan 2017 18:31:48 +0000 (+0100) Subject: added setup option to show/hide classic elements in the editor palette X-Git-Tag: 4.0.0.2~12 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5c5685a92a0ca8060018c4d035e6b37fea7e0f5a;p=rocksndiamonds.git added setup option to show/hide classic elements in the editor palette --- diff --git a/src/editor.c b/src/editor.c index fd1dfbda..8d9f5821 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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 diff --git a/src/files.c b/src/files.c index b55395f4..419399bf 100644 --- a/src/files.c +++ b/src/files.c @@ -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; diff --git a/src/libgame/system.h b/src/libgame/system.h index 25be3c85..ad6976c8 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -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; diff --git a/src/screens.c b/src/screens.c index b2c61ea9..c1f16489 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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:" },