From: Holger Schemel Date: Wed, 28 Aug 2024 21:06:14 +0000 (+0200) Subject: added game element palette section for scanned BD elements in editor X-Git-Tag: 4.4.0.0-test-4~284 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a55a1cb2b7e593493a72b6852b25054ec6d03fa2;p=rocksndiamonds.git added game element palette section for scanned BD elements in editor --- diff --git a/src/editor.c b/src/editor.c index c7748d57..fa797d1e 100644 --- a/src/editor.c +++ b/src/editor.c @@ -5800,6 +5800,103 @@ static int *editor_el_boulderdash_effects_ptr = editor_el_boulderdash_effects; static int num_editor_hl_boulderdash_effects = ARRAY_SIZE(editor_hl_boulderdash_effects); static int num_editor_el_boulderdash_effects = ARRAY_SIZE(editor_el_boulderdash_effects); +static int editor_hl_boulderdash_scanned[] = +{ + EL_INTERNAL_CASCADE_BDX_SCANNED_ACTIVE, + EL_CHAR('B'), + EL_CHAR('D'), + EL_CHAR('S'), +}; + +static int editor_el_boulderdash_scanned[] = +{ + EL_BDX_SAND_BALL_SCANNED, + EL_BDX_SAND_BALL_FALLING_SCANNED, + EL_BDX_SAND_LOOSE_SCANNED, + EL_BDX_SAND_LOOSE_FALLING_SCANNED, + EL_BDX_ROCK_SCANNED, + EL_BDX_ROCK_FALLING_SCANNED, + EL_BDX_FLYING_ROCK_SCANNED, + EL_BDX_FLYING_ROCK_FLYING_SCANNED, + EL_BDX_MEGA_ROCK_SCANNED, + EL_BDX_MEGA_ROCK_FALLING_SCANNED, + EL_BDX_DIAMOND_SCANNED, + EL_BDX_DIAMOND_FALLING_SCANNED, + EL_BDX_FLYING_DIAMOND_SCANNED, + EL_BDX_FLYING_DIAMOND_FLYING_SCANNED, + EL_BDX_NUT_SCANNED, + EL_BDX_NUT_FALLING_SCANNED, + EL_BDX_EXPANDABLE_WALL_HORIZONTAL_SCANNED, + EL_BDX_EXPANDABLE_WALL_VERTICAL_SCANNED, + EL_BDX_EXPANDABLE_WALL_ANY_SCANNED, + EL_BDX_EXPANDABLE_STEELWALL_HORIZONTAL_SCANNED, + EL_BDX_EXPANDABLE_STEELWALL_VERTICAL_SCANNED, + EL_BDX_EXPANDABLE_STEELWALL_ANY_SCANNED, + EL_BDX_ACID_SCANNED, + EL_BDX_FALLING_WALL_FALLING_SCANNED, + EL_BDX_COW_LEFT_SCANNED, + EL_BDX_COW_UP_SCANNED, + EL_BDX_COW_RIGHT_SCANNED, + EL_BDX_COW_DOWN_SCANNED, + EL_BDX_AMOEBA_1_SCANNED, + EL_BDX_AMOEBA_2_SCANNED, + EL_BDX_WAITING_ROCK_SCANNED, + EL_BDX_CHASING_ROCK_SCANNED, + EL_BDX_GHOST_SCANNED, + EL_BDX_FIREFLY_1_RIGHT_SCANNED, + EL_BDX_FIREFLY_1_UP_SCANNED, + EL_BDX_FIREFLY_1_LEFT_SCANNED, + EL_BDX_FIREFLY_1_DOWN_SCANNED, + EL_BDX_FIREFLY_2_RIGHT_SCANNED, + EL_BDX_FIREFLY_2_UP_SCANNED, + EL_BDX_FIREFLY_2_LEFT_SCANNED, + EL_BDX_FIREFLY_2_DOWN_SCANNED, + EL_BDX_BUTTERFLY_1_RIGHT_SCANNED, + EL_BDX_BUTTERFLY_1_UP_SCANNED, + EL_BDX_BUTTERFLY_1_LEFT_SCANNED, + EL_BDX_BUTTERFLY_1_DOWN_SCANNED, + EL_BDX_BUTTERFLY_2_RIGHT_SCANNED, + EL_BDX_BUTTERFLY_2_UP_SCANNED, + EL_BDX_BUTTERFLY_2_LEFT_SCANNED, + EL_BDX_BUTTERFLY_2_DOWN_SCANNED, + EL_BDX_STONEFLY_RIGHT_SCANNED, + EL_BDX_STONEFLY_UP_SCANNED, + EL_BDX_STONEFLY_LEFT_SCANNED, + EL_BDX_STONEFLY_DOWN_SCANNED, + EL_BDX_BITER_RIGHT_SCANNED, + EL_BDX_BITER_UP_SCANNED, + EL_BDX_BITER_LEFT_SCANNED, + EL_BDX_BITER_DOWN_SCANNED, + EL_BDX_DRAGONFLY_RIGHT_SCANNED, + EL_BDX_DRAGONFLY_UP_SCANNED, + EL_BDX_DRAGONFLY_LEFT_SCANNED, + EL_BDX_DRAGONFLY_DOWN_SCANNED, + EL_BDX_PLAYER_SCANNED, + EL_BDX_PLAYER_WITH_BOMB_SCANNED, + EL_BDX_PLAYER_WITH_ROCKET_LAUNCHER_SCANNED, + EL_BDX_ROCKET_RIGHT_SCANNED, + EL_BDX_ROCKET_UP_SCANNED, + EL_BDX_ROCKET_LEFT_SCANNED, + EL_BDX_ROCKET_DOWN_SCANNED, + EL_BDX_NITRO_PACK_SCANNED, + EL_BDX_NITRO_PACK_FALLING_SCANNED, + EL_BDX_NITRO_PACK_EXPLODING_SCANNED, + EL_BDX_CLOCK_GROWING_0, + EL_BDX_DIAMOND_GROWING_0, + EL_BDX_EXPLODING_0, + EL_BDX_ROCK_GROWING_0, + EL_BDX_STEELWALL_GROWING_0, + EL_BDX_GHOST_EXPLODING_0, + EL_BDX_BOMB_EXPLODING_0, + EL_BDX_NITRO_PACK_EXPLODING_0, + EL_BDX_AMOEBA_2_EXPLODING_0, + EL_BDX_NUT_BREAKING_0, +}; +static int *editor_hl_boulderdash_scanned_ptr = editor_hl_boulderdash_scanned; +static int *editor_el_boulderdash_scanned_ptr = editor_el_boulderdash_scanned; +static int num_editor_hl_boulderdash_scanned = ARRAY_SIZE(editor_hl_boulderdash_scanned); +static int num_editor_el_boulderdash_scanned = ARRAY_SIZE(editor_el_boulderdash_scanned); + static int editor_hl_emerald_mine[] = { EL_INTERNAL_CASCADE_EM_ACTIVE, @@ -7212,6 +7309,7 @@ static boolean setup_editor_el_players = TRUE; static boolean setup_editor_el_boulderdash = TRUE; static boolean setup_editor_el_boulderdash_native = TRUE; static boolean setup_editor_el_boulderdash_effects = TRUE; +static boolean setup_editor_el_boulderdash_scanned = TRUE; static boolean setup_editor_el_emerald_mine = TRUE; static boolean setup_editor_el_emerald_mine_club = TRUE; static boolean setup_editor_el_more = TRUE; @@ -7270,6 +7368,12 @@ editor_elements_info[] = &editor_hl_boulderdash_effects_ptr, &num_editor_hl_boulderdash_effects, &editor_el_boulderdash_effects_ptr, &num_editor_el_boulderdash_effects }, + { + &setup_editor_el_boulderdash_scanned, + &setup.editor_cascade.el_bdx_scanned, + &editor_hl_boulderdash_scanned_ptr, &num_editor_hl_boulderdash_scanned, + &editor_el_boulderdash_scanned_ptr, &num_editor_el_boulderdash_scanned + }, { &setup_editor_el_emerald_mine, &setup.editor_cascade.el_em, @@ -7576,6 +7680,7 @@ static void ReinitializeElementList_EnableSections(void) setup_editor_el_boulderdash = TRUE; setup_editor_el_boulderdash_native = TRUE; setup_editor_el_boulderdash_effects = TRUE; + setup_editor_el_boulderdash_scanned = TRUE; setup_editor_el_emerald_mine = TRUE; setup_editor_el_emerald_mine_club = TRUE; setup_editor_el_more = TRUE; @@ -7600,6 +7705,7 @@ static void ReinitializeElementList_EnableSections(void) setup_editor_el_boulderdash = FALSE; setup_editor_el_boulderdash_native = FALSE; setup_editor_el_boulderdash_effects = FALSE; + setup_editor_el_boulderdash_scanned = FALSE; setup_editor_el_emerald_mine = FALSE; setup_editor_el_emerald_mine_club = FALSE; setup_editor_el_more = FALSE; @@ -7632,6 +7738,7 @@ static void ReinitializeElementList_EnableSections(void) { setup_editor_el_boulderdash_native = FALSE; setup_editor_el_boulderdash_effects = FALSE; + setup_editor_el_boulderdash_scanned = FALSE; setup_editor_el_mirror_magic = FALSE; setup_editor_el_deflektor = FALSE; } @@ -7658,6 +7765,7 @@ static void ReinitializeElementList_EnableSections(void) setup_editor_el_boulderdash = FALSE; setup_editor_el_boulderdash_native = FALSE; setup_editor_el_boulderdash_effects = FALSE; + setup_editor_el_boulderdash_scanned = FALSE; setup_editor_el_more = FALSE; setup_editor_el_sokoban = FALSE; setup_editor_el_supaplex = FALSE; @@ -7675,6 +7783,7 @@ static void ReinitializeElementList_EnableSections(void) setup_editor_el_boulderdash = FALSE; setup_editor_el_boulderdash_native = FALSE; setup_editor_el_boulderdash_effects = FALSE; + setup_editor_el_boulderdash_scanned = FALSE; setup_editor_el_emerald_mine = FALSE; setup_editor_el_emerald_mine_club = FALSE; setup_editor_el_more = FALSE; @@ -7694,6 +7803,7 @@ static void ReinitializeElementList_EnableSections(void) setup_editor_el_boulderdash = FALSE; setup_editor_el_boulderdash_native = FALSE; setup_editor_el_boulderdash_effects = FALSE; + setup_editor_el_boulderdash_scanned = FALSE; setup_editor_el_emerald_mine = FALSE; setup_editor_el_emerald_mine_club = FALSE; setup_editor_el_more = FALSE; diff --git a/src/files.c b/src/files.c index a0e7df1f..d06eae95 100644 --- a/src/files.c +++ b/src/files.c @@ -11157,6 +11157,10 @@ static struct TokenInfo editor_cascade_setup_tokens[] = TYPE_SWITCH, &setup.editor_cascade.el_bdx_effects, "editor.cascade.el_bdx_effects" }, + { + TYPE_SWITCH, + &setup.editor_cascade.el_bdx_scanned, "editor.cascade.el_bdx_scanned" + }, { TYPE_SWITCH, &setup.editor_cascade.el_em, "editor.cascade.el_em" @@ -11876,6 +11880,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->editor.el_boulderdash = TRUE; si->editor.el_boulderdash_native = TRUE; si->editor.el_boulderdash_effects = TRUE; + si->editor.el_boulderdash_scanned = FALSE; si->editor.el_emerald_mine = TRUE; si->editor.el_emerald_mine_club = TRUE; si->editor.el_more = TRUE; @@ -12055,6 +12060,7 @@ static void setSetupInfoToDefaults_EditorCascade(struct SetupInfo *si) si->editor_cascade.el_bd = TRUE; si->editor_cascade.el_bdx = TRUE; si->editor_cascade.el_bdx_effects = FALSE; + si->editor_cascade.el_bdx_scanned = FALSE; si->editor_cascade.el_em = TRUE; si->editor_cascade.el_emc = TRUE; si->editor_cascade.el_rnd = TRUE; diff --git a/src/init.c b/src/init.c index a6666d5d..c71008f9 100644 --- a/src/init.c +++ b/src/init.c @@ -4613,6 +4613,7 @@ void InitElementPropertiesStatic(void) EL_INTERNAL_CASCADE_BD_ACTIVE, EL_INTERNAL_CASCADE_BDX_ACTIVE, EL_INTERNAL_CASCADE_BDX_EFFECTS_ACTIVE, + EL_INTERNAL_CASCADE_BDX_SCANNED_ACTIVE, EL_INTERNAL_CASCADE_EM_ACTIVE, EL_INTERNAL_CASCADE_EMC_ACTIVE, EL_INTERNAL_CASCADE_RND_ACTIVE, @@ -4639,6 +4640,7 @@ void InitElementPropertiesStatic(void) EL_INTERNAL_CASCADE_BD, EL_INTERNAL_CASCADE_BDX, EL_INTERNAL_CASCADE_BDX_EFFECTS, + EL_INTERNAL_CASCADE_BDX_SCANNED, EL_INTERNAL_CASCADE_EM, EL_INTERNAL_CASCADE_EMC, EL_INTERNAL_CASCADE_RND, diff --git a/src/libgame/system.h b/src/libgame/system.h index 85c26a5f..d4266201 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1297,6 +1297,7 @@ struct SetupEditorInfo boolean el_boulderdash; boolean el_boulderdash_native; boolean el_boulderdash_effects; + boolean el_boulderdash_scanned; boolean el_emerald_mine; boolean el_emerald_mine_club; boolean el_more; @@ -1344,6 +1345,7 @@ struct SetupEditorCascadeInfo boolean el_bd; boolean el_bdx; boolean el_bdx_effects; + boolean el_bdx_scanned; boolean el_em; boolean el_emc; boolean el_rnd; diff --git a/src/main.c b/src/main.c index 9b591aab..3e056363 100644 --- a/src/main.c +++ b/src/main.c @@ -8918,6 +8918,16 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = "internal", "Hide Boulder Dash effects elements" }, + { + "internal_cascade_bdx_scanned", + "internal", + "Show Boulder Dash scanned elements" + }, + { + "internal_cascade_bdx_scanned.active", + "internal", + "Hide Boulder Dash scanned elements" + }, { "internal_cascade_em", "internal", diff --git a/src/main.h b/src/main.h index 2e21491a..679832f1 100644 --- a/src/main.h +++ b/src/main.h @@ -2616,47 +2616,49 @@ #define EL_INTERNAL_CASCADE_BDX_ACTIVE (EL_FIRST_INTERNAL + 7) #define EL_INTERNAL_CASCADE_BDX_EFFECTS (EL_FIRST_INTERNAL + 8) #define EL_INTERNAL_CASCADE_BDX_EFFECTS_ACTIVE (EL_FIRST_INTERNAL + 9) -#define EL_INTERNAL_CASCADE_EM (EL_FIRST_INTERNAL + 10) -#define EL_INTERNAL_CASCADE_EM_ACTIVE (EL_FIRST_INTERNAL + 11) -#define EL_INTERNAL_CASCADE_EMC (EL_FIRST_INTERNAL + 12) -#define EL_INTERNAL_CASCADE_EMC_ACTIVE (EL_FIRST_INTERNAL + 13) -#define EL_INTERNAL_CASCADE_RND (EL_FIRST_INTERNAL + 14) -#define EL_INTERNAL_CASCADE_RND_ACTIVE (EL_FIRST_INTERNAL + 15) -#define EL_INTERNAL_CASCADE_SB (EL_FIRST_INTERNAL + 16) -#define EL_INTERNAL_CASCADE_SB_ACTIVE (EL_FIRST_INTERNAL + 17) -#define EL_INTERNAL_CASCADE_SP (EL_FIRST_INTERNAL + 18) -#define EL_INTERNAL_CASCADE_SP_ACTIVE (EL_FIRST_INTERNAL + 19) -#define EL_INTERNAL_CASCADE_DC (EL_FIRST_INTERNAL + 20) -#define EL_INTERNAL_CASCADE_DC_ACTIVE (EL_FIRST_INTERNAL + 21) -#define EL_INTERNAL_CASCADE_DX (EL_FIRST_INTERNAL + 22) -#define EL_INTERNAL_CASCADE_DX_ACTIVE (EL_FIRST_INTERNAL + 23) -#define EL_INTERNAL_CASCADE_MM (EL_FIRST_INTERNAL + 24) -#define EL_INTERNAL_CASCADE_MM_ACTIVE (EL_FIRST_INTERNAL + 25) -#define EL_INTERNAL_CASCADE_DF (EL_FIRST_INTERNAL + 26) -#define EL_INTERNAL_CASCADE_DF_ACTIVE (EL_FIRST_INTERNAL + 27) -#define EL_INTERNAL_CASCADE_CHARS (EL_FIRST_INTERNAL + 28) -#define EL_INTERNAL_CASCADE_CHARS_ACTIVE (EL_FIRST_INTERNAL + 29) -#define EL_INTERNAL_CASCADE_STEEL_CHARS (EL_FIRST_INTERNAL + 30) -#define EL_INTERNAL_CASCADE_STEEL_CHARS_ACTIVE (EL_FIRST_INTERNAL + 31) -#define EL_INTERNAL_CASCADE_CE (EL_FIRST_INTERNAL + 32) -#define EL_INTERNAL_CASCADE_CE_ACTIVE (EL_FIRST_INTERNAL + 33) -#define EL_INTERNAL_CASCADE_GE (EL_FIRST_INTERNAL + 34) -#define EL_INTERNAL_CASCADE_GE_ACTIVE (EL_FIRST_INTERNAL + 35) -#define EL_INTERNAL_CASCADE_ES (EL_FIRST_INTERNAL + 36) -#define EL_INTERNAL_CASCADE_ES_ACTIVE (EL_FIRST_INTERNAL + 37) -#define EL_INTERNAL_CASCADE_REF (EL_FIRST_INTERNAL + 38) -#define EL_INTERNAL_CASCADE_REF_ACTIVE (EL_FIRST_INTERNAL + 39) -#define EL_INTERNAL_CASCADE_USER (EL_FIRST_INTERNAL + 40) -#define EL_INTERNAL_CASCADE_USER_ACTIVE (EL_FIRST_INTERNAL + 41) -#define EL_INTERNAL_CASCADE_DYNAMIC (EL_FIRST_INTERNAL + 42) -#define EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE (EL_FIRST_INTERNAL + 43) +#define EL_INTERNAL_CASCADE_BDX_SCANNED (EL_FIRST_INTERNAL + 10) +#define EL_INTERNAL_CASCADE_BDX_SCANNED_ACTIVE (EL_FIRST_INTERNAL + 11) +#define EL_INTERNAL_CASCADE_EM (EL_FIRST_INTERNAL + 12) +#define EL_INTERNAL_CASCADE_EM_ACTIVE (EL_FIRST_INTERNAL + 13) +#define EL_INTERNAL_CASCADE_EMC (EL_FIRST_INTERNAL + 14) +#define EL_INTERNAL_CASCADE_EMC_ACTIVE (EL_FIRST_INTERNAL + 15) +#define EL_INTERNAL_CASCADE_RND (EL_FIRST_INTERNAL + 16) +#define EL_INTERNAL_CASCADE_RND_ACTIVE (EL_FIRST_INTERNAL + 17) +#define EL_INTERNAL_CASCADE_SB (EL_FIRST_INTERNAL + 18) +#define EL_INTERNAL_CASCADE_SB_ACTIVE (EL_FIRST_INTERNAL + 19) +#define EL_INTERNAL_CASCADE_SP (EL_FIRST_INTERNAL + 20) +#define EL_INTERNAL_CASCADE_SP_ACTIVE (EL_FIRST_INTERNAL + 21) +#define EL_INTERNAL_CASCADE_DC (EL_FIRST_INTERNAL + 22) +#define EL_INTERNAL_CASCADE_DC_ACTIVE (EL_FIRST_INTERNAL + 23) +#define EL_INTERNAL_CASCADE_DX (EL_FIRST_INTERNAL + 24) +#define EL_INTERNAL_CASCADE_DX_ACTIVE (EL_FIRST_INTERNAL + 25) +#define EL_INTERNAL_CASCADE_MM (EL_FIRST_INTERNAL + 26) +#define EL_INTERNAL_CASCADE_MM_ACTIVE (EL_FIRST_INTERNAL + 27) +#define EL_INTERNAL_CASCADE_DF (EL_FIRST_INTERNAL + 28) +#define EL_INTERNAL_CASCADE_DF_ACTIVE (EL_FIRST_INTERNAL + 29) +#define EL_INTERNAL_CASCADE_CHARS (EL_FIRST_INTERNAL + 30) +#define EL_INTERNAL_CASCADE_CHARS_ACTIVE (EL_FIRST_INTERNAL + 31) +#define EL_INTERNAL_CASCADE_STEEL_CHARS (EL_FIRST_INTERNAL + 32) +#define EL_INTERNAL_CASCADE_STEEL_CHARS_ACTIVE (EL_FIRST_INTERNAL + 33) +#define EL_INTERNAL_CASCADE_CE (EL_FIRST_INTERNAL + 34) +#define EL_INTERNAL_CASCADE_CE_ACTIVE (EL_FIRST_INTERNAL + 35) +#define EL_INTERNAL_CASCADE_GE (EL_FIRST_INTERNAL + 36) +#define EL_INTERNAL_CASCADE_GE_ACTIVE (EL_FIRST_INTERNAL + 37) +#define EL_INTERNAL_CASCADE_ES (EL_FIRST_INTERNAL + 38) +#define EL_INTERNAL_CASCADE_ES_ACTIVE (EL_FIRST_INTERNAL + 39) +#define EL_INTERNAL_CASCADE_REF (EL_FIRST_INTERNAL + 40) +#define EL_INTERNAL_CASCADE_REF_ACTIVE (EL_FIRST_INTERNAL + 41) +#define EL_INTERNAL_CASCADE_USER (EL_FIRST_INTERNAL + 42) +#define EL_INTERNAL_CASCADE_USER_ACTIVE (EL_FIRST_INTERNAL + 43) +#define EL_INTERNAL_CASCADE_DYNAMIC (EL_FIRST_INTERNAL + 44) +#define EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE (EL_FIRST_INTERNAL + 45) #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 + 43) +#define EL_INTERNAL_END (EL_FIRST_INTERNAL + 45) -#define MAX_NUM_ELEMENTS (EL_FIRST_INTERNAL + 44) +#define MAX_NUM_ELEMENTS (EL_FIRST_INTERNAL + 46) // values for graphics/sounds action types