rnd-20040309-1-src
authorHolger Schemel <info@artsoft.org>
Tue, 9 Mar 2004 01:23:27 +0000 (02:23 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:46:12 +0000 (10:46 +0200)
* fixed totally broken (every 8th frame skipped) step-by-step recording
* fixed bug with requester not displayed when quick-loading interrupted
* fixed bug which messed up key config when using keypad number keys

ChangeLog
src/conftime.h
src/editor.c
src/files.c
src/game.c
src/libgame/misc.c
src/main.h
src/tape.c
src/tools.c

index 973ddb6cef9fff0e37ba9706e3ef49dc54f2710b..83532d96aa1e424f9e68359f2e6da98096c0ca52 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-08
+       * fixed totally broken (every 8th frame skipped) step-by-step recording
+       * fixed bug with requester not displayed when quick-loading interrupted
+
+2004-03-07
+       * fixed bug which messed up key config when using keypad number keys
+
 2004-03-03
        * fixed bug which allowed moving upwards even when gravity was active
        * fixed bug with missing error handling when dumping levels or tapes
index cf51d97193aaeabc6369e61954668ec74821e8f3..e4f04ce0fd2da69fe5af2f8210659960c63a07ee 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-03-05 10:38]"
+#define COMPILE_DATE_STRING "[2004-03-09 02:02]"
index 5a567832af99981e765126f20de38453970183b6..b20ff4544959574c17f1e10cdf177c90a1205931 100644 (file)
 #define GADGET_ID_USE_SPRING_BUG       (GADGET_ID_CHECKBUTTON_FIRST + 7)
 #define GADGET_ID_BLOCK_LAST_FIELD     (GADGET_ID_CHECKBUTTON_FIRST + 8)
 #define GADGET_ID_SP_BLOCK_LAST_FIELD  (GADGET_ID_CHECKBUTTON_FIRST + 9)
-#define GADGET_ID_CAN_MOVE_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 10)
-#define GADGET_ID_CUSTOM_EXPLODE_RESULT        (GADGET_ID_CHECKBUTTON_FIRST + 11)
-#define GADGET_ID_CUSTOM_EXPLODE_FIRE  (GADGET_ID_CHECKBUTTON_FIRST + 12)
-#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 13)
-#define GADGET_ID_CUSTOM_EXPLODE_IMPACT        (GADGET_ID_CHECKBUTTON_FIRST + 14)
-#define GADGET_ID_CUSTOM_WALK_TO_OBJECT        (GADGET_ID_CHECKBUTTON_FIRST + 15)
-#define GADGET_ID_CUSTOM_DEADLY                (GADGET_ID_CHECKBUTTON_FIRST + 16)
-#define GADGET_ID_CUSTOM_CAN_MOVE      (GADGET_ID_CHECKBUTTON_FIRST + 17)
-#define GADGET_ID_CUSTOM_CAN_FALL      (GADGET_ID_CHECKBUTTON_FIRST + 18)
-#define GADGET_ID_CUSTOM_CAN_SMASH     (GADGET_ID_CHECKBUTTON_FIRST + 19)
-#define GADGET_ID_CUSTOM_SLIPPERY      (GADGET_ID_CHECKBUTTON_FIRST + 20)
-#define GADGET_ID_CUSTOM_ACCESSIBLE    (GADGET_ID_CHECKBUTTON_FIRST + 21)
-#define GADGET_ID_CUSTOM_USE_GRAPHIC   (GADGET_ID_CHECKBUTTON_FIRST + 22)
-#define GADGET_ID_CUSTOM_USE_TEMPLATE  (GADGET_ID_CHECKBUTTON_FIRST + 23)
-#define GADGET_ID_CUSTOM_CAN_CHANGE    (GADGET_ID_CHECKBUTTON_FIRST + 24)
-#define GADGET_ID_CHANGE_USE_CONTENT   (GADGET_ID_CHECKBUTTON_FIRST + 25)
-#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 26)
-#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 27)
-#define GADGET_ID_CHANGE_USE_RANDOM    (GADGET_ID_CHECKBUTTON_FIRST + 28)
-#define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 29)
-#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 30)
-#define GADGET_ID_CHANGE_BY_OTHER_ACT  (GADGET_ID_CHECKBUTTON_FIRST + 31)
+#define GADGET_ID_CAN_FALL_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 10)
+#define GADGET_ID_CAN_MOVE_INTO_ACID   (GADGET_ID_CHECKBUTTON_FIRST + 11)
+#define GADGET_ID_CUSTOM_EXPLODE_RESULT        (GADGET_ID_CHECKBUTTON_FIRST + 12)
+#define GADGET_ID_CUSTOM_EXPLODE_FIRE  (GADGET_ID_CHECKBUTTON_FIRST + 13)
+#define GADGET_ID_CUSTOM_EXPLODE_SMASH (GADGET_ID_CHECKBUTTON_FIRST + 14)
+#define GADGET_ID_CUSTOM_EXPLODE_IMPACT        (GADGET_ID_CHECKBUTTON_FIRST + 15)
+#define GADGET_ID_CUSTOM_WALK_TO_OBJECT        (GADGET_ID_CHECKBUTTON_FIRST + 16)
+#define GADGET_ID_CUSTOM_DEADLY                (GADGET_ID_CHECKBUTTON_FIRST + 17)
+#define GADGET_ID_CUSTOM_CAN_MOVE      (GADGET_ID_CHECKBUTTON_FIRST + 18)
+#define GADGET_ID_CUSTOM_CAN_FALL      (GADGET_ID_CHECKBUTTON_FIRST + 19)
+#define GADGET_ID_CUSTOM_CAN_SMASH     (GADGET_ID_CHECKBUTTON_FIRST + 20)
+#define GADGET_ID_CUSTOM_SLIPPERY      (GADGET_ID_CHECKBUTTON_FIRST + 21)
+#define GADGET_ID_CUSTOM_ACCESSIBLE    (GADGET_ID_CHECKBUTTON_FIRST + 22)
+#define GADGET_ID_CUSTOM_USE_GRAPHIC   (GADGET_ID_CHECKBUTTON_FIRST + 23)
+#define GADGET_ID_CUSTOM_USE_TEMPLATE  (GADGET_ID_CHECKBUTTON_FIRST + 24)
+#define GADGET_ID_CUSTOM_CAN_CHANGE    (GADGET_ID_CHECKBUTTON_FIRST + 25)
+#define GADGET_ID_CHANGE_USE_CONTENT   (GADGET_ID_CHECKBUTTON_FIRST + 26)
+#define GADGET_ID_CHANGE_USE_EXPLOSION (GADGET_ID_CHECKBUTTON_FIRST + 27)
+#define GADGET_ID_CHANGE_ONLY_COMPLETE (GADGET_ID_CHECKBUTTON_FIRST + 28)
+#define GADGET_ID_CHANGE_USE_RANDOM    (GADGET_ID_CHECKBUTTON_FIRST + 29)
+#define GADGET_ID_CHANGE_DELAY         (GADGET_ID_CHECKBUTTON_FIRST + 30)
+#define GADGET_ID_CHANGE_BY_DIRECT_ACT (GADGET_ID_CHECKBUTTON_FIRST + 31)
+#define GADGET_ID_CHANGE_BY_OTHER_ACT  (GADGET_ID_CHECKBUTTON_FIRST + 32)
 
 /* gadgets for buttons in element list */
-#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 32)
+#define GADGET_ID_ELEMENTLIST_FIRST    (GADGET_ID_CHECKBUTTON_FIRST + 33)
 #define GADGET_ID_ELEMENTLIST_LAST     (GADGET_ID_ELEMENTLIST_FIRST +  \
                                        ED_NUM_ELEMENTLIST_BUTTONS - 1)
 
 #define ED_CHECKBUTTON_ID_USE_SPRING_BUG       5
 #define ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD     6
 #define ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD  7
-#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID   8
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC   9
-#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE  10
-#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE    11
-#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT        12
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE      13
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL      14
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH     15
-#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      16
-#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY                17
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_RESULT        18
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE  19
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 20
-#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT        21
-#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE    22
-#define ED_CHECKBUTTON_ID_CHANGE_DELAY         23
-#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 24
-#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT  25
-#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 26
-#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT   27
-#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 28
-#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM    29
-
-#define ED_NUM_CHECKBUTTONS                    30
+#define ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID   8
+#define ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID   9
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_GRAPHIC   10
+#define ED_CHECKBUTTON_ID_CUSTOM_USE_TEMPLATE  11
+#define ED_CHECKBUTTON_ID_CUSTOM_ACCESSIBLE    12
+#define ED_CHECKBUTTON_ID_CUSTOM_WALK_TO_OBJECT        13
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_MOVE      14
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_FALL      15
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_SMASH     16
+#define ED_CHECKBUTTON_ID_CUSTOM_SLIPPERY      17
+#define ED_CHECKBUTTON_ID_CUSTOM_DEADLY                18
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_RESULT        19
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_FIRE  20
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_SMASH 21
+#define ED_CHECKBUTTON_ID_CUSTOM_EXPLODE_IMPACT        22
+#define ED_CHECKBUTTON_ID_CUSTOM_CAN_CHANGE    23
+#define ED_CHECKBUTTON_ID_CHANGE_DELAY         24
+#define ED_CHECKBUTTON_ID_CHANGE_BY_DIRECT_ACT 25
+#define ED_CHECKBUTTON_ID_CHANGE_BY_OTHER_ACT  26
+#define ED_CHECKBUTTON_ID_CHANGE_USE_EXPLOSION 27
+#define ED_CHECKBUTTON_ID_CHANGE_USE_CONTENT   28
+#define ED_CHECKBUTTON_ID_CHANGE_ONLY_COMPLETE 29
+#define ED_CHECKBUTTON_ID_CHANGE_USE_RANDOM    30
+
+#define ED_NUM_CHECKBUTTONS                    31
 
 #define ED_CHECKBUTTON_ID_LEVEL_FIRST  ED_CHECKBUTTON_ID_DOUBLE_SPEED
 #define ED_CHECKBUTTON_ID_LEVEL_LAST   ED_CHECKBUTTON_ID_RANDOM_RESTRICTED
@@ -1924,19 +1926,26 @@ static struct
     "use spring pushing bug",          "use odd spring pushing behaviour"
   },
   {
-    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(0),
+    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(1),
     GADGET_ID_BLOCK_LAST_FIELD,                GADGET_ID_NONE,
     &level.block_last_field,
     NULL,
     "block last field when moving",    "player blocks last field when moving"
   },
   {
-    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(0),
+    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(1),
     GADGET_ID_SP_BLOCK_LAST_FIELD,     GADGET_ID_NONE,
     &level.sp_block_last_field,
     NULL,
     "block last field when moving",    "player blocks last field when moving"
   },
+  {
+    ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(0),
+    GADGET_ID_CAN_FALL_INTO_ACID,      GADGET_ID_NONE,
+    &level.player_can_fall_into_acid,
+    NULL,
+    "can fall into acid (with gravity)","player can fall into acid pool"
+  },
   {
     ED_SETTINGS_XPOS(0),               ED_SETTINGS_YPOS(0),
     GADGET_ID_CAN_MOVE_INTO_ACID,      GADGET_ID_NONE,
@@ -6880,9 +6889,12 @@ static void DrawPropertiesConfig()
   }
 
   if (ELEM_IS_PLAYER(properties_element))
+  {
+    MapCheckbuttonGadget(ED_CHECKBUTTON_ID_CAN_FALL_INTO_ACID);
     MapCheckbuttonGadget(properties_element == EL_SP_MURPHY ?
                         ED_CHECKBUTTON_ID_SP_BLOCK_LAST_FIELD :
                         ED_CHECKBUTTON_ID_BLOCK_LAST_FIELD);
+  }
 
   if (IS_GEM(properties_element))
     MapCheckbuttonGadget(ED_CHECKBUTTON_ID_EM_SLIPPERY_GEMS);
@@ -6891,6 +6903,7 @@ static void DrawPropertiesConfig()
       (!IS_CUSTOM_ELEMENT(properties_element) ||
        edit_mode_properties == ED_MODE_PROPERTIES_CONFIG_2))
   {
+    /* set position for special checkbutton for "can move into acid" */
     checkbutton_info[ED_CHECKBUTTON_ID_CAN_MOVE_INTO_ACID].y =
       ED_SETTINGS_YPOS(IS_CUSTOM_ELEMENT(properties_element) ? 6 :
                       HAS_CONTENT(properties_element) ? 1 : 0);
@@ -6952,8 +6965,6 @@ static void DrawPropertiesConfig()
     }
     else if (edit_mode_properties == ED_MODE_PROPERTIES_CONFIG_2)
     {
-      /* set position for special checkbutton for "can move into acid" */
-
       /* draw checkbutton gadgets */
       for (i =  ED_CHECKBUTTON_ID_CUSTOM2_FIRST;
           i <= ED_CHECKBUTTON_ID_CUSTOM2_LAST; i++)
index bf3b77e7d063e9662243e6afdd0dbeeeb2a19d69..c5d8eb30691e232dcc0203f794525aead073b19f 100644 (file)
@@ -29,7 +29,7 @@
 #define CHUNK_SIZE_NONE                -1      /* do not write chunk size    */
 #define FILE_VERS_CHUNK_SIZE   8       /* size of file version chunk */
 #define LEVEL_HEADER_SIZE      80      /* size of level file header  */
-#define LEVEL_HEADER_UNUSED    7       /* unused level header bytes  */
+#define LEVEL_HEADER_UNUSED    6       /* unused level header bytes  */
 #define LEVEL_CHUNK_CNT2_SIZE  160     /* size of level CNT2 chunk   */
 #define LEVEL_CHUNK_CNT2_UNUSED        11      /* unused CNT2 chunk bytes    */
 #define LEVEL_CHUNK_CNT3_HEADER        16      /* size of level CNT3 header  */
@@ -164,6 +164,8 @@ static void setLevelInfoToDefaults(struct LevelInfo *level)
 
   level->can_move_into_acid_bits = ~0; /* everything can move into acid */
 
+  level->player_can_fall_into_acid = TRUE;
+
   level->use_step_counter = FALSE;
 
   level->use_custom_template = FALSE;
@@ -687,6 +689,8 @@ static int LoadLevel_HEAD(FILE *file, int chunk_size, struct LevelInfo *level)
 
   level->use_step_counter      = (getFile8Bit(file) == 1 ? TRUE : FALSE);
 
+  level->player_can_fall_into_acid = (getFile8Bit(file) == 1 ? TRUE : FALSE);
+
   ReadUnusedBytesFromFile(file, LEVEL_HEADER_UNUSED);
 
   return chunk_size;
@@ -2421,6 +2425,8 @@ static void SaveLevel_HEAD(FILE *file, struct LevelInfo *level)
 
   putFile8Bit(file, (level->use_step_counter ? 1 : 0));
 
+  putFile8Bit(file, (level->player_can_fall_into_acid ? 1 : 0));
+
   WriteUnusedBytesToFile(file, LEVEL_HEADER_UNUSED);
 }
 
index d55562340ab92cbe435c632ea060fb1ac9ef694e..6a797d86e7a0ff2545d3009c56cf9d776f79a93b 100644 (file)
@@ -2545,6 +2545,9 @@ void RelocatePlayer(int x, int y, int element_raw)
   boolean no_delay = (tape.index_search);
   int frame_delay_value = (ffwd_delay ? FfwdFrameDelay : GameFrameDelay);
   int wait_delay_value = (no_delay ? 0 : frame_delay_value);
+#if 1
+  int old_jx, old_jy;
+#endif
 
   if (player->GameOver)                /* do not reanimate dead player */
     return;
@@ -2574,9 +2577,49 @@ void RelocatePlayer(int x, int y, int element_raw)
     player->is_moving = FALSE;
   }
 
+#if 1
+  old_jx = player->jx;
+  old_jy = player->jy;
+#endif
+
   Feld[x][y] = element;
   InitPlayerField(x, y, element, TRUE);
 
+#if 0
+  if (player == local_player)
+  {
+#if 1
+
+    scroll_x += (local_player->jx - old_jx);
+    scroll_y += (local_player->jy - old_jy);
+
+    /* don't scroll over playfield boundaries */
+    if (scroll_x < SBX_Left || scroll_x > SBX_Right)
+      scroll_x = (scroll_x < SBX_Left ? SBX_Left : SBX_Right);
+
+    /* don't scroll over playfield boundaries */
+    if (scroll_y < SBY_Upper || scroll_y > SBY_Lower)
+      scroll_y = (scroll_y < SBY_Upper ? SBY_Upper : SBY_Lower);
+
+#else
+    scroll_x = (local_player->jx < SBX_Left  + MIDPOSX ? SBX_Left :
+               local_player->jx > SBX_Right + MIDPOSX ? SBX_Right :
+               local_player->jx - MIDPOSX);
+
+    scroll_y = (local_player->jy < SBY_Upper + MIDPOSY ? SBY_Upper :
+               local_player->jy > SBY_Lower + MIDPOSY ? SBY_Lower :
+               local_player->jy - MIDPOSY);
+#endif
+
+    RedrawPlayfield(TRUE, 0,0,0,0);
+#if 0
+    DrawAllPlayers();
+    BackToFront();
+#endif
+  }
+
+#else
+
   if (player == local_player)
   {
     int scroll_xx = -999, scroll_yy = -999;
@@ -2616,6 +2659,7 @@ void RelocatePlayer(int x, int y, int element_raw)
       Delay(wait_delay_value);
     }
   }
+#endif
 }
 
 void Explode(int ex, int ey, int phase, int mode)
@@ -7201,7 +7245,8 @@ static byte PlayerActions(struct PlayerInfo *player, byte player_action)
 
 #if 0
     /* !!! TEST !!! */
-    CheckGravityMovement(player);
+    if (player->MovPos == 0)
+      CheckGravityMovement(player);
 #endif
     if (button1)
       snapped = SnapField(player, dx, dy);
@@ -7428,7 +7473,13 @@ void GameActions()
     int actual_player_action = stored_player[i].effective_action;
 
 #if 1
-    /* OLD: overwrite programmed action with tape action (BAD!!!) */
+    /* !!! TEST !!! */
+    if (stored_player[i].MovPos == 0)
+      CheckGravityMovement(&stored_player[i]);
+#endif
+
+#if 1
+    /* overwrite programmed action with tape action */
     if (stored_player[i].programmed_action)
       actual_player_action = stored_player[i].programmed_action;
 #endif
@@ -7448,11 +7499,17 @@ void GameActions()
     }
 
 #if 0
-    /* NEW: overwrite tape action with programmed action */
+    /* overwrite tape action with programmed action */
     if (stored_player[i].programmed_action)
       actual_player_action = stored_player[i].programmed_action;
 #endif
 
+#if 0
+    if (i == 0)
+      printf("::: action: %d: %x [%d]\n",
+            stored_player[i].MovPos, actual_player_action, FrameCounter);
+#endif
+
     tape_action[i] = PlayerActions(&stored_player[i], actual_player_action);
 
     if (tape.recording && tape_action[i] && !tape.player_participates[i])
@@ -8103,13 +8160,13 @@ static void CheckGravityMovement(struct PlayerInfo *player)
     int dy = (move_dir & MV_UP ? -1 : move_dir & MV_DOWN ? +1 : 0);
     int new_jx = jx + dx, new_jy = jy + dy;
     boolean player_is_snapping = player->action & JOY_BUTTON_1;
-#if 0
-    /* !!! MAKE THIS CUSTOMIZABLE !!! */
-    boolean field_under_player_is_free_or_acid =
+#if 1
+    boolean player_can_fall_down =
       (IN_LEV_FIELD(jx, jy + 1) &&
-       (IS_FREE(jx, jy + 1) || Feld[jx][jy + 1] == EL_ACID));
+       (IS_FREE(jx, jy + 1) ||
+       (Feld[jx][jy + 1] == EL_ACID && level.player_can_fall_into_acid)));
 #else
-    boolean field_under_player_is_free_or_acid =
+    boolean player_can_fall_down =
       (IN_LEV_FIELD(jx, jy + 1) &&
        (IS_FREE(jx, jy + 1)));
 #endif
@@ -8132,13 +8189,13 @@ static void CheckGravityMovement(struct PlayerInfo *player)
 
 #if 0
     printf("::: checking gravity NOW [%d, %d, %d] [%d] ...\n",
-          field_under_player_is_free_or_acid,
+          player_can_fall_down,
           player_is_standing_on_valid_field,
           player_is_moving_to_valid_field,
           (player_is_moving_to_valid_field ? Feld[new_jx][new_jy] : -1));
 #endif
 
-    if (field_under_player_is_free_or_acid &&
+    if (player_can_fall_down &&
        !player_is_standing_on_valid_field &&
        !player_is_moving_to_valid_field)
     {
@@ -8627,6 +8684,47 @@ void ScrollPlayer(struct PlayerInfo *player, int mode)
        player->LevelSolved = player->GameOver = TRUE;
     }
 
+#if 0
+    /* !!! ENABLE THIS FOR NEW VERSIONS !!! */
+    {
+      static int trigger_sides[4][2] =
+      {
+       /* enter side           leave side */
+       { CH_SIDE_RIGHT,        CH_SIDE_LEFT    },      /* moving left  */
+       { CH_SIDE_LEFT,         CH_SIDE_RIGHT   },      /* moving right */
+       { CH_SIDE_BOTTOM,       CH_SIDE_TOP     },      /* moving up    */
+       { CH_SIDE_TOP,          CH_SIDE_BOTTOM  }       /* moving down  */
+      };
+      int move_direction = player->MovDir;
+      int enter_side = trigger_sides[MV_DIR_BIT(move_direction)][0];
+      int leave_side = trigger_sides[MV_DIR_BIT(move_direction)][1];
+      int old_jx = last_jx;
+      int old_jy = last_jy;
+
+#if 1
+      if (IS_CUSTOM_ELEMENT(Feld[old_jx][old_jy]))
+      {
+       CheckTriggeredElementChangePlayer(old_jx, old_jy, Feld[old_jx][old_jy],
+                                         CE_OTHER_GETS_LEFT,
+                                         player->index_bit, leave_side);
+       CheckElementChangePlayer(old_jx, old_jy, Feld[old_jx][old_jy],
+                                CE_LEFT_BY_PLAYER,
+                                player->index_bit, leave_side);
+      }
+
+      if (IS_CUSTOM_ELEMENT(Feld[jx][jy]))
+      {
+       CheckTriggeredElementChangePlayer(jx, jy, Feld[jx][jy],
+                                         CE_OTHER_GETS_ENTERED,
+                                         player->index_bit, enter_side);
+       CheckElementChangePlayer(jx, jy, Feld[jx][jy], CE_ENTERED_BY_PLAYER,
+                                player->index_bit, enter_side);
+      }
+#endif
+
+    }
+#endif
+
     if (game.engine_version >= VERSION_IDENT(3,0,7,0))
     {
       TestIfHeroTouchesBadThing(jx, jy);
@@ -10137,8 +10235,13 @@ boolean SnapField(struct PlayerInfo *player, int dx, int dy)
                        dy == -1 ? MV_UP :
                        dy == +1 ? MV_DOWN : MV_NO_MOVING);
 
+#if 0
+  if (player->MovPos)
+    return FALSE;
+#else
   if (player->MovPos && game.engine_version >= VERSION_IDENT(2,2,0,0))
     return FALSE;
+#endif
 
   if (!player->active || !IN_LEV_FIELD(x, y))
     return FALSE;
@@ -10585,7 +10688,25 @@ void RequestQuitGame(boolean ask_if_really_quit)
   }
   else
   {
+
+#if 1
+    if (tape.playing && tape.index_search)
+    {
+      SetDrawDeactivationMask(REDRAW_NONE);
+      audio.sound_deactivated = FALSE;
+    }
+#endif
+
     OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK);
+
+#if 1
+    if (tape.playing && tape.index_search)
+    {
+      SetDrawDeactivationMask(REDRAW_FIELD);
+      audio.sound_deactivated = TRUE;
+    }
+#endif
+
   }
 }
 
index cb0f65255487ad3ab9b2109a44bbe0481004acfe..a7eeb72f3042808a985ccbc1977fe3df1082dff4 100644 (file)
@@ -1232,7 +1232,7 @@ void translate_keyname(Key *keysym, char **x11name, char **name, int mode)
       char c = name_ptr[6];
 
       if (c >= '0' && c <= '9')
-       key = KSYM_0 + (Key)(c - '0');
+       key = KSYM_KP_0 + (Key)(c - '0');
     }
     else if (strncmp(name_ptr, "XK_F", 4) == 0 && strlen(name_ptr) <= 6)
     {
index b483378e3e9441bfd6aa7b068256ac3c73505da6..e55db3cb28fcf1426bb398300481d42ce5614177 100644 (file)
@@ -1425,6 +1425,8 @@ struct LevelInfo
 
   int can_move_into_acid_bits; /* bits indicate property for element groups */
 
+  boolean player_can_fall_into_acid;
+
   boolean double_speed;
   boolean initial_gravity;
   boolean em_slippery_gems;    /* EM style "gems slip from wall" behaviour */
index f05a3b45d18b4499f8123bb4b0fa6c353e5ff361..36748a7e4766a485734b38593d6e09dac47c1cd2 100644 (file)
@@ -420,8 +420,13 @@ void TapeRecordAction(byte action[MAX_PLAYERS])
 {
   int i;
 
+#if 1
+  if (!tape.recording)         /* record action even when tape is paused! */
+    return;
+#else
   if (!tape.recording || tape.pausing)
     return;
+#endif
 
   if (tape.counter >= MAX_TAPELEN - 1)
   {
@@ -636,8 +641,13 @@ static void TapeStopIndexSearch()
   SetDrawDeactivationMask(REDRAW_NONE);
   audio.sound_deactivated = FALSE;
 
-  RedrawPlayfield(TRUE, 0,0,0,0);
-  DrawGameDoorValues();
+#if 1
+  if (game_status == GAME_MODE_PLAYING)
+#endif
+  {
+    RedrawPlayfield(TRUE, 0,0,0,0);
+    DrawGameDoorValues();
+  }
 }
 
 static void TapeSingleStep()
index 8f3798a41f6e23541994274f933a96315c85808a..2f6bd8d81db5e07981795cfa56f471ba40bab659 100644 (file)
@@ -2050,6 +2050,15 @@ boolean Request(char *text, unsigned int req_state)
     }
   }
 
+#if 1
+  /* disable deactivated drawing when quick-loading level tape recording */
+  if (tape.playing && tape.index_search)
+  {
+    SetDrawDeactivationMask(REDRAW_NONE);
+    audio.sound_deactivated = FALSE;
+  }
+#endif
+
 #if 1
   SetMouseCursor(CURSOR_DEFAULT);
 #endif
@@ -2313,6 +2322,15 @@ boolean Request(char *text, unsigned int req_state)
     SendToServer_ContinuePlaying();
 #endif
 
+#if 1
+  /* restore deactivated drawing when quick-loading level tape recording */
+  if (tape.playing && tape.index_search)
+  {
+    SetDrawDeactivationMask(REDRAW_FIELD);
+    audio.sound_deactivated = TRUE;
+  }
+#endif
+
   return result;
 }