X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ffiles.c;h=c96105927edc77edafdf9bbe0e288f9648f61e3a;hb=54d5d4386f2ee13e9931c659667da7c11dfec197;hp=0395afae669525f711ececc669caacf1678cf3a4;hpb=24cc4564457e645addf08604dc80fbab152c8590;p=rocksndiamonds.git diff --git a/src/files.c b/src/files.c index 0395afae..c9610592 100644 --- a/src/files.c +++ b/src/files.c @@ -227,8 +227,8 @@ static struct LevelFileConfigInfo chunk_config_INFO[] = { -1, -1, -1, -1, - NULL, -1, - }, + NULL, -1 + } }; static struct LevelFileConfigInfo chunk_config_ELEM[] = @@ -722,8 +722,8 @@ static struct LevelFileConfigInfo chunk_config_ELEM[] = { -1, -1, -1, -1, - NULL, -1, - }, + NULL, -1 + } }; static struct LevelFileConfigInfo chunk_config_NOTE[] = @@ -750,8 +750,8 @@ static struct LevelFileConfigInfo chunk_config_NOTE[] = { -1, -1, -1, -1, - NULL, -1, - }, + NULL, -1 + } }; static struct LevelFileConfigInfo chunk_config_CUSX_base[] = @@ -956,7 +956,7 @@ static struct LevelFileConfigInfo chunk_config_CUSX_base[] = -1, -1, NULL, -1, NULL - }, + } }; static struct LevelFileConfigInfo chunk_config_CUSX_change[] = @@ -1094,8 +1094,8 @@ static struct LevelFileConfigInfo chunk_config_CUSX_change[] = { -1, -1, -1, -1, - NULL, -1, - }, + NULL, -1 + } }; static struct LevelFileConfigInfo chunk_config_GRPX[] = @@ -1135,8 +1135,8 @@ static struct LevelFileConfigInfo chunk_config_GRPX[] = { -1, -1, -1, -1, - NULL, -1, - }, + NULL, -1 + } }; static struct LevelFileConfigInfo chunk_config_CONF[] = /* (OBSOLETE) */ @@ -1190,8 +1190,8 @@ static struct LevelFileConfigInfo chunk_config_CONF[] = /* (OBSOLETE) */ { -1, -1, -1, -1, - NULL, -1, - }, + NULL, -1 + } }; static struct @@ -1738,6 +1738,11 @@ static void setLevelInfoToDefaults(struct LevelInfo *level) int element = i; struct ElementInfo *ei = &element_info[element]; + /* never initialize clipboard elements after the very first time */ + /* (to be able to use clipboard elements between several levels) */ + if (IS_CLIPBOARD_ELEMENT(element) && clipboard_elements_initialized) + continue; + if (IS_ENVELOPE(element)) { int envelope_nr = element - EL_ENVELOPE_1; @@ -1760,11 +1765,6 @@ static void setLevelInfoToDefaults(struct LevelInfo *level) } #endif - /* never initialize clipboard elements after the very first time */ - /* (to be able to use clipboard elements between several levels) */ - if (IS_CLIPBOARD_ELEMENT(element) && clipboard_elements_initialized) - continue; - setElementChangePages(ei, 1); setElementChangeInfoToDefaults(ei->change); @@ -6881,9 +6881,11 @@ void SaveScore(int nr) #define SETUP_TOKEN_EDITOR_EL_HEADLINES 10 #define SETUP_TOKEN_EDITOR_EL_USER_DEFINED 11 #define SETUP_TOKEN_EDITOR_EL_DYNAMIC 12 -#define SETUP_TOKEN_EDITOR_SHOW_ELEMENT_TOKEN 13 +#define SETUP_TOKEN_EDITOR_EL_BY_GAME 13 +#define SETUP_TOKEN_EDITOR_EL_BY_TYPE 14 +#define SETUP_TOKEN_EDITOR_SHOW_ELEMENT_TOKEN 15 -#define NUM_EDITOR_SETUP_TOKENS 14 +#define NUM_EDITOR_SETUP_TOKENS 16 /* editor cascade setup */ #define SETUP_TOKEN_EDITOR_CASCADE_BD 0 @@ -7002,6 +7004,8 @@ static struct TokenInfo editor_setup_tokens[] = { TYPE_SWITCH, &sei.el_headlines, "editor.el_headlines" }, { TYPE_SWITCH, &sei.el_user_defined, "editor.el_user_defined" }, { TYPE_SWITCH, &sei.el_dynamic, "editor.el_dynamic" }, + { TYPE_SWITCH, &sei.el_by_game, "editor.el_by_game" }, + { TYPE_SWITCH, &sei.el_by_type, "editor.el_by_type" }, { TYPE_SWITCH, &sei.show_element_token,"editor.show_element_token" }, };