From bc76bd63993e350f699d1420ebd9ae3ac573f407 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 23 Jun 2006 20:53:52 +0200 Subject: [PATCH] rnd-20060623-1-src * reorganized level editor element list a bit to match engines better --- ChangeLog | 3 +++ src/conftime.h | 2 +- src/editor.c | 53 +++++++++++++++++++++++++++++++------------- src/files.c | 8 ++++--- src/init.c | 4 ++-- src/libgame/system.h | 1 + src/main.c | 32 +++++++++++++------------- src/main.h | 8 +++---- src/screens.c | 2 ++ 9 files changed, 71 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c0bdd6d..c3ac63a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-06-23 + * reorganized level editor element list a bit to match engines better + 2006-06-21 * fixed newly introduced bug with wrongly initializing clipboard element diff --git a/src/conftime.h b/src/conftime.h index 008c2484..c1180fe0 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-06-21 01:26]" +#define COMPILE_DATE_STRING "[2006-06-23 20:52]" diff --git a/src/editor.c b/src/editor.c index 791789dc..86adfc6f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3451,16 +3451,6 @@ static int editor_el_emerald_mine_club[] = EL_EMC_WALL_11, EL_EMC_WALL_12, - EL_EMC_ANDROID, - EL_BALLOON, - EL_BALLOON_SWITCH_ANY, - EL_BALLOON_SWITCH_NONE, - - EL_BALLOON_SWITCH_LEFT, - EL_BALLOON_SWITCH_RIGHT, - EL_BALLOON_SWITCH_UP, - EL_BALLOON_SWITCH_DOWN, - EL_EMC_GRASS, EL_EMC_FAKE_GRASS, EL_EMC_PLANT, @@ -3476,10 +3466,20 @@ static int editor_el_emerald_mine_club[] = EL_EM_DYNAMITE, EL_EM_DYNAMITE_ACTIVE, + EL_BALLOON, + EL_YAMYAM_UP, + EL_BALLOON_SWITCH_UP, + EL_BALLOON_SWITCH_ANY, + EL_YAMYAM_LEFT, + EL_BALLOON_SWITCH_LEFT, EL_YAMYAM_RIGHT, - EL_YAMYAM_UP, + EL_BALLOON_SWITCH_RIGHT, + + EL_EMC_ANDROID, EL_YAMYAM_DOWN, + EL_BALLOON_SWITCH_DOWN, + EL_BALLOON_SWITCH_NONE, #else @@ -4618,8 +4618,23 @@ static int editor_el_custom[] = EL_CUSTOM_START + 252, EL_CUSTOM_START + 253, EL_CUSTOM_START + 254, - EL_CUSTOM_START + 255, + EL_CUSTOM_START + 255 +}; +static int *editor_hl_custom_ptr = editor_hl_custom; +static int *editor_el_custom_ptr = editor_el_custom; +static int num_editor_hl_custom = SIZEOF_ARRAY_INT(editor_hl_custom); +static int num_editor_el_custom = SIZEOF_ARRAY_INT(editor_el_custom); + +static int editor_hl_reference[] = +{ + EL_INTERNAL_CASCADE_REF_ACTIVE, + EL_CHAR('R'), + EL_CHAR('E'), + EL_CHAR('F') +}; +static int editor_el_reference[] = +{ EL_TRIGGER_PLAYER, EL_TRIGGER_ELEMENT, EL_TRIGGER_CE_VALUE, @@ -4630,10 +4645,10 @@ static int editor_el_custom[] = EL_CURRENT_CE_VALUE, EL_CURRENT_CE_SCORE }; -static int *editor_hl_custom_ptr = editor_hl_custom; -static int *editor_el_custom_ptr = editor_el_custom; -static int num_editor_hl_custom = SIZEOF_ARRAY_INT(editor_hl_custom); -static int num_editor_el_custom = SIZEOF_ARRAY_INT(editor_el_custom); +static int *editor_hl_reference_ptr = editor_hl_reference; +static int *editor_el_reference_ptr = editor_el_reference; +static int num_editor_hl_reference = SIZEOF_ARRAY_INT(editor_hl_reference); +static int num_editor_el_reference = SIZEOF_ARRAY_INT(editor_el_reference); static int editor_hl_group[] = { @@ -4856,6 +4871,12 @@ editor_elements_info[] = &editor_hl_custom_ptr, &num_editor_hl_custom, &editor_el_custom_ptr, &num_editor_el_custom }, + { + &setup.editor.el_custom, + &setup.editor_cascade.el_ref, + &editor_hl_reference_ptr, &num_editor_hl_reference, + &editor_el_reference_ptr, &num_editor_el_reference + }, { &setup.editor.el_custom, &setup.editor_cascade.el_ge, diff --git a/src/files.c b/src/files.c index c9610592..8d299b67 100644 --- a/src/files.c +++ b/src/files.c @@ -6899,8 +6899,8 @@ void SaveScore(int nr) #define SETUP_TOKEN_EDITOR_CASCADE_TEXT 8 #define SETUP_TOKEN_EDITOR_CASCADE_CE 9 #define SETUP_TOKEN_EDITOR_CASCADE_GE 10 -#define SETUP_TOKEN_EDITOR_CASCADE_USER 11 -#define SETUP_TOKEN_EDITOR_CASCADE_GENERIC 12 +#define SETUP_TOKEN_EDITOR_CASCADE_REF 11 +#define SETUP_TOKEN_EDITOR_CASCADE_USER 12 #define SETUP_TOKEN_EDITOR_CASCADE_DYNAMIC 13 #define NUM_EDITOR_CASCADE_SETUP_TOKENS 14 @@ -7022,6 +7022,7 @@ static struct TokenInfo editor_cascade_setup_tokens[] = { TYPE_SWITCH, &seci.el_chars, "editor.cascade.el_chars" }, { TYPE_SWITCH, &seci.el_ce, "editor.cascade.el_ce" }, { TYPE_SWITCH, &seci.el_ge, "editor.cascade.el_ge" }, + { TYPE_SWITCH, &seci.el_ref, "editor.cascade.el_ref" }, { TYPE_SWITCH, &seci.el_user, "editor.cascade.el_user" }, { TYPE_SWITCH, &seci.el_dynamic, "editor.cascade.el_dynamic" }, }; @@ -7188,6 +7189,7 @@ static void setSetupInfoToDefaults_EditorCascade(struct SetupInfo *si) si->editor_cascade.el_chars = FALSE; si->editor_cascade.el_ce = FALSE; si->editor_cascade.el_ge = FALSE; + si->editor_cascade.el_ref = FALSE; si->editor_cascade.el_user = FALSE; si->editor_cascade.el_dynamic = FALSE; } @@ -7414,7 +7416,7 @@ void SaveSetup_EditorCascade() seci = setup.editor_cascade; fprintf(file, "\n"); - for (i = 0; i < NUM_EDITOR_SETUP_TOKENS; i++) + for (i = 0; i < NUM_EDITOR_CASCADE_SETUP_TOKENS; i++) fprintf(file, "%s\n", getSetupLine(editor_cascade_setup_tokens, "", i)); fclose(file); diff --git a/src/init.c b/src/init.c index c444d8d3..c975ec61 100644 --- a/src/init.c +++ b/src/init.c @@ -3537,8 +3537,8 @@ void InitElementPropertiesStatic() EL_INTERNAL_CASCADE_CHARS_ACTIVE, EL_INTERNAL_CASCADE_CE_ACTIVE, EL_INTERNAL_CASCADE_GE_ACTIVE, + EL_INTERNAL_CASCADE_REF_ACTIVE, EL_INTERNAL_CASCADE_USER_ACTIVE, - EL_INTERNAL_CASCADE_GENERIC_ACTIVE, EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE, -1 @@ -3557,8 +3557,8 @@ void InitElementPropertiesStatic() EL_INTERNAL_CASCADE_CHARS, EL_INTERNAL_CASCADE_CE, EL_INTERNAL_CASCADE_GE, + EL_INTERNAL_CASCADE_REF, EL_INTERNAL_CASCADE_USER, - EL_INTERNAL_CASCADE_GENERIC, EL_INTERNAL_CASCADE_DYNAMIC, -1 diff --git a/src/libgame/system.h b/src/libgame/system.h index 35eb221e..9d90cd99 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -674,6 +674,7 @@ struct SetupEditorCascadeInfo boolean el_chars; boolean el_ce; boolean el_ge; + boolean el_ref; boolean el_user; boolean el_dynamic; }; diff --git a/src/main.c b/src/main.c index 0d59cc56..4506c8e3 100644 --- a/src/main.c +++ b/src/main.c @@ -199,7 +199,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = }, { "steelwall", - "wall", + "steelwall", "steel wall" }, { @@ -444,7 +444,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = }, { "invisible_steelwall", - "wall", + "steelwall", "invisible steel wall" }, { @@ -1703,7 +1703,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = }, { "steelwall_slippery", - "wall", + "steelwall", "slippery steel wall" }, { @@ -1788,22 +1788,22 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = }, { "emc_steelwall_1", - "wall", + "steelwall", "steel wall" }, { "emc_steelwall_2", - "wall", + "steelwall", "steel wall" }, { "emc_steelwall_3", - "wall", + "steelwall", "steel wall" }, { "emc_steelwall_4", - "wall", + "steelwall", "steel wall" }, { @@ -3758,7 +3758,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = }, { "invisible_steelwall.active", - "wall", + "steelwall", "-" }, { @@ -4373,24 +4373,24 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] = "hide group elements" }, { - "internal_cascade_user", + "internal_cascade_ref", "internal", - "show user defined elements" + "show reference elements" }, { - "internal_cascade_user.active", + "internal_cascade_ref.active", "internal", - "hide user defined elements" + "hide reference elements" }, { - "internal_cascade_generic", + "internal_cascade_user", "internal", - "show elements" + "show user defined elements" }, { - "internal_cascade_generic.active", + "internal_cascade_user.active", "internal", - "hide elements" + "hide user defined elements" }, { "internal_cascade_dynamic", diff --git a/src/main.h b/src/main.h index ddb8c4f9..645adfd8 100644 --- a/src/main.h +++ b/src/main.h @@ -1462,10 +1462,10 @@ #define EL_INTERNAL_CASCADE_CE_ACTIVE (EL_FIRST_INTERNAL + 23) #define EL_INTERNAL_CASCADE_GE (EL_FIRST_INTERNAL + 24) #define EL_INTERNAL_CASCADE_GE_ACTIVE (EL_FIRST_INTERNAL + 25) -#define EL_INTERNAL_CASCADE_USER (EL_FIRST_INTERNAL + 26) -#define EL_INTERNAL_CASCADE_USER_ACTIVE (EL_FIRST_INTERNAL + 27) -#define EL_INTERNAL_CASCADE_GENERIC (EL_FIRST_INTERNAL + 28) -#define EL_INTERNAL_CASCADE_GENERIC_ACTIVE (EL_FIRST_INTERNAL + 29) +#define EL_INTERNAL_CASCADE_REF (EL_FIRST_INTERNAL + 26) +#define EL_INTERNAL_CASCADE_REF_ACTIVE (EL_FIRST_INTERNAL + 27) +#define EL_INTERNAL_CASCADE_USER (EL_FIRST_INTERNAL + 28) +#define EL_INTERNAL_CASCADE_USER_ACTIVE (EL_FIRST_INTERNAL + 29) #define EL_INTERNAL_CASCADE_DYNAMIC (EL_FIRST_INTERNAL + 30) #define EL_INTERNAL_CASCADE_DYNAMIC_ACTIVE (EL_FIRST_INTERNAL + 31) diff --git a/src/screens.c b/src/screens.c index 7967566e..831b8489 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2579,9 +2579,11 @@ static struct TokenInfo setup_info_editor[] = { TYPE_SWITCH, &setup.editor.el_user_defined, "User defined element list:" }, { TYPE_SWITCH, &setup.editor.el_dynamic, "Dynamic level elements:" }, { TYPE_EMPTY, NULL, "" }, +#if 0 { TYPE_SWITCH, &setup.editor.el_by_game, "Show elements by game:" }, { TYPE_SWITCH, &setup.editor.el_by_type, "Show elements by type:" }, { TYPE_EMPTY, NULL, "" }, +#endif { TYPE_SWITCH, &setup.editor.show_element_token, "Show element token:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" }, -- 2.34.1