rnd-20040505-1-src
authorHolger Schemel <info@artsoft.org>
Wed, 5 May 2004 20:34:18 +0000 (22:34 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:47:10 +0000 (10:47 +0200)
* fixed bug that caused two activated toolbox buttons in level editor

ChangeLog
src/conftime.h
src/editor.c
src/game.c

index 9171980234e37d27c8c8414ca317ea4f288d6f41..14a869f3ae87668807821992bcdc6141701634c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2004-05-05
+       * fixed bug that caused two activated toolbox buttons in level editor
+
 2004-05-02
        * fixed bug with creating walkable custom element under player (again)
        * fixed bug with not copying explosion type when copying CEs in editor
@@ -5,11 +8,12 @@
        * fixed graphical bug when the player is pushing an accessible element
        * fixed bug with classic switchable elements triggering CE changes
        * fixed bug with entering/leaving walkable element in RelocatePlayer()
-       * added special behaviour of Supaplex ports with gravity enabled
+       * fixed crash bug when CE leaves behind the trigger player element
 
 2004-04-30
        * fixed bug with broken tubes after placing/exploding dynamite in them
        * fixed bug with exploding dynamite under player due to other explosion
+       * fixed bug with not resetting push delay under certain circumstances
 
 2004-04-27
        * added option "handicap" for "levelinfo.conf" (thanks to Niko Böhm)
index 878eea86e582840c8f35b40dec8eacaec7df47f3..ff3747657771ea5a55ddb2d46e78ae2d7456d570 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-05-02 19:17]"
+#define COMPILE_DATE_STRING "[2004-05-05 22:30]"
index 17f95fde6fac9fbdd1f1c071701eff0ab807a239..89363f8fcdfe23ee9967ad29ec3effed27b374cd 100644 (file)
@@ -9065,7 +9065,15 @@ void HandleLevelEditorKeyInput(Key key)
        {
          RequestExitLevelEditor(setup.ask_on_escape);
        }
-        else
+        else if (edit_mode == ED_MODE_INFO)
+       {
+         HandleControlButtons(level_editor_gadget[GADGET_ID_INFO]);
+       }
+        else if (edit_mode == ED_MODE_PROPERTIES)
+       {
+         HandleControlButtons(level_editor_gadget[GADGET_ID_PROPERTIES]);
+       }
+       else            /* should never happen */
        {
          DrawDrawingWindow();
          edit_mode = ED_MODE_DRAWING;
index 467603a896db9d65bcd5dd2e4875e11c0f8ccf79..f0f4dbf7905b677f46f7bfba82c580b95231a94e 100644 (file)
        ((e) == EL_TRIGGER_ELEMENT ? (ch)->actual_trigger_element :     \
         (e) == EL_TRIGGER_PLAYER  ? (ch)->actual_trigger_player : (e))
 
+#define GET_VALID_PLAYER_ELEMENT(e)                                    \
+       ((e) >= EL_PLAYER_1 && (e) <= EL_PLAYER_4 ? (e) : EL_PLAYER_1)
+
 #define CAN_GROW_INTO(e)                                               \
-       (e == EL_SAND || (IS_DIGGABLE(e) && level.grow_into_diggable))
+       ((e) == EL_SAND || (IS_DIGGABLE(e) && level.grow_into_diggable))
 
 #define ELEMENT_CAN_ENTER_FIELD_BASE_X(x, y, condition)                        \
                (IN_LEV_FIELD(x, y) && (IS_FREE(x, y) ||                \
@@ -2818,7 +2821,11 @@ void DrawRelocatePlayer(struct PlayerInfo *player)
 
 void RelocatePlayer(int jx, int jy, int el_player_raw)
 {
+#if 1
+  int el_player = GET_VALID_PLAYER_ELEMENT(el_player_raw);
+#else
   int el_player = (el_player_raw == EL_SP_MURPHY ? EL_PLAYER_1 :el_player_raw);
+#endif
   struct PlayerInfo *player = &stored_player[el_player - EL_PLAYER_1];
   boolean ffwd_delay = (tape.playing && tape.fast_forward);
   boolean no_delay = (tape.warp_forward);
@@ -9077,7 +9084,9 @@ static boolean canMoveToValidFieldWithGravity(int x, int y, int move_dir)
 #if 1
   return (IN_LEV_FIELD(newx, newy) && !IS_FREE_OR_PLAYER(newx, newy) &&
          IS_GRAVITY_REACHABLE(Feld[newx][newy]) &&
+#if 0
          (!IS_SP_PORT(Feld[newx][newy]) || move_dir == MV_UP) &&
+#endif
          (IS_DIGGABLE(Feld[newx][newy]) ||
           IS_WALKABLE_FROM(Feld[newx][newy], opposite_dir) ||
           canPassField(newx, newy, move_dir)));