From: Holger Schemel Date: Sat, 10 Jun 2006 18:46:44 +0000 (+0200) Subject: rnd-20060610-1-src X-Git-Tag: 3.2.0^2~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=03f1156cc40e36c17e19a1c9ee02f0cbd70b8989;p=rocksndiamonds.git rnd-20060610-1-src * fixed bug which caused EMC doors #5 to #8 to be passable without keys --- diff --git a/ChangeLog b/ChangeLog index 7ce1772e..4c3a7ac1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ 2006-05-30 * fixed some bugs when displaying title screens from info screen menu + * fixed bug which caused EMC doors #5 to #8 to be passable without keys 2006-05-20 * changed file major version to 3 to reflect level file format changes diff --git a/src/conftime.h b/src/conftime.h index ddaadea5..b4519ad5 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-06-06 23:46]" +#define COMPILE_DATE_STRING "[2006-06-10 19:22]" diff --git a/src/editor.c b/src/editor.c index 57649a8c..e90e94f3 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3111,6 +3111,16 @@ static int edit_mode_properties; static int element_shift = 0; +static int editor_el_players[] = +{ + EL_PLAYER_1, + EL_PLAYER_2, + EL_PLAYER_3, + EL_PLAYER_4 +}; +static int *editor_el_players_ptr = editor_el_players; +static int num_editor_el_players = SIZEOF_ARRAY_INT(editor_el_players); + static int editor_hl_boulderdash[] = { EL_INTERNAL_CASCADE_BD_ACTIVE, @@ -4378,6 +4388,13 @@ 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 }; +static int *editor_hl_unused_ptr = editor_hl_unused; +static int num_editor_hl_unused = 0; + static struct { boolean *setup_value; @@ -4393,6 +4410,12 @@ static struct } editor_elements_info[] = { + { + &setup_editor_show_always, + &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_cascade.el_bd, @@ -7816,6 +7839,7 @@ static struct #if 1 { EL_TIMEGATE_SWITCH, &level.time_timegate, TEXT_DURATION }, + { EL_LIGHT_SWITCH, &level.time_light, TEXT_DURATION }, { EL_LIGHT_SWITCH_ACTIVE, &level.time_light, TEXT_DURATION }, { EL_SHIELD_NORMAL, &level.shield_normal_time, TEXT_DURATION }, { EL_SHIELD_DEADLY, &level.shield_deadly_time, TEXT_DURATION }, @@ -10027,7 +10051,8 @@ void HandleLevelEditorKeyInput(Key key) (key == KSYM_Delete && new_element_shift > element_shift)) break; - if (IS_EDITOR_CASCADE(editor_elements[i])) + /* jump to next cascade block (or to start of element list) */ + if (i == 0 || IS_EDITOR_CASCADE(editor_elements[i])) new_element_shift = i; } diff --git a/src/files.c b/src/files.c index 5631595e..c53c86d8 100644 --- a/src/files.c +++ b/src/files.c @@ -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" }, }; diff --git a/src/game.c b/src/game.c index 09eea8f3..2eb5aeb3 100644 --- a/src/game.c +++ b/src/game.c @@ -45,6 +45,7 @@ #define USE_BOTH_SWITCHGATE_SWITCHES (USE_NEW_STUFF * 1) #define USE_PLAYER_GRAVITY (USE_NEW_STUFF * 1) #define USE_FIXED_BORDER_RUNNING_GFX (USE_NEW_STUFF * 1) +#define USE_QUICKSAND_BD_ROCK_BUGFIX (USE_NEW_STUFF * 0) #define USE_QUICKSAND_IMPACT_BUGFIX (USE_NEW_STUFF * 0) @@ -5861,7 +5862,12 @@ void StartMoving(int x, int y) started_moving = TRUE; Feld[x][y] = EL_QUICKSAND_EMPTYING; +#if USE_QUICKSAND_BD_ROCK_BUGFIX + if (Store[x][y] != EL_ROCK && Store[x][y] != EL_BD_ROCK) + Store[x][y] = EL_ROCK; +#else Store[x][y] = EL_ROCK; +#endif PlayLevelSoundAction(x, y, ACTION_EMPTYING); } diff --git a/src/libgame/system.h b/src/libgame/system.h index ac10e75c..35eb221e 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -655,6 +655,9 @@ struct SetupEditorInfo boolean el_headlines; + boolean el_by_game; + boolean el_by_type; + boolean show_element_token; }; diff --git a/src/screens.c b/src/screens.c index dc0a14eb..7967566e 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2573,10 +2573,15 @@ static struct TokenInfo setup_info_editor[] = #endif { TYPE_SWITCH, &setup.editor.el_chars, "Text Characters:" }, { TYPE_SWITCH, &setup.editor.el_custom, "Custom & Group Elements:" }, +#if 0 { TYPE_SWITCH, &setup.editor.el_headlines, "Headlines:" }, +#endif { TYPE_SWITCH, &setup.editor.el_user_defined, "User defined element list:" }, { TYPE_SWITCH, &setup.editor.el_dynamic, "Dynamic level elements:" }, { TYPE_EMPTY, NULL, "" }, + { 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, "" }, { TYPE_SWITCH, &setup.editor.show_element_token, "Show element token:" }, { TYPE_EMPTY, NULL, "" }, { TYPE_LEAVE_MENU, execSetupMain, "Back" },