rnd-20060610-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 10 Jun 2006 18:46:44 +0000 (20:46 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:52:06 +0000 (10:52 +0200)
* fixed bug which caused EMC doors #5 to #8 to be passable without keys

ChangeLog
src/conftime.h
src/editor.c
src/files.c
src/game.c
src/libgame/system.h
src/screens.c

index 7ce1772e06f71471cd031b9be61278469b15472b..4c3a7ac1117694aed299d0175f157d4f6d1c470f 100644 (file)
--- 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
index ddaadea5b4c8cf2482f4e127669b31f24ae6114e..b4519ad5a5b2b1f888e55475d1b7da35797ebb97 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2006-06-06 23:46]"
+#define COMPILE_DATE_STRING "[2006-06-10 19:22]"
index 57649a8c1fba450cf0cad1c63ce911c7a1e2b926..e90e94f3fff2c18517164cc593b4ca5fe3fb6df6 100644 (file)
@@ -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;
        }
 
index 5631595e6b59c70f5fbaf5f13ad59e0e27606da1..c53c86d88047d81eff27d8644a9d1b2e47b52b0c 100644 (file)
@@ -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"   },
 };
 
index 09eea8f3bf0c635affcf0b99b2916fe2c5378c75..2eb5aeb33a9a8ff1164e8ea175590f494621d14c 100644 (file)
@@ -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);
       }
index ac10e75c3c94948b85450be4a224ecb8eecd100a..35eb221eebe658dca59c581a4c141c837dc15c15 100644 (file)
@@ -655,6 +655,9 @@ struct SetupEditorInfo
 
   boolean el_headlines;
 
+  boolean el_by_game;
+  boolean el_by_type;
+
   boolean show_element_token;
 };
 
index dc0a14ebcfc4e70876269e45ced4ddc4edac4d51..7967566e8d6326e2e0cd9dd8fc1917c6e4c061c8 100644 (file)
@@ -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"                  },