rnd-20040310-1-src
authorHolger Schemel <info@artsoft.org>
Wed, 10 Mar 2004 08:56:27 +0000 (09:56 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:46:13 +0000 (10:46 +0200)
* changed tape recording to only record input, not programmed actions
* YET TO COME ... added option ... for sp_sniksnak and sp_electron

ChangeLog
src/conf_gfx.c
src/conftime.h
src/files.c
src/game.c
src/init.c

index 83532d96aa1e424f9e68359f2e6da98096c0ca52..ef2f864552813a5f0544b85849a313df2a6d7a07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+2004-03-09
+       * changed tape recording to only record input, not programmed actions
+       * YET TO COME ... added option ... for sp_sniksnak and sp_electron
+
 2004-03-08
        * fixed totally broken (every 8th frame skipped) step-by-step recording
        * fixed bug with requester not displayed when quick-loading interrupted
+       * added option "can fall into acid (with gravity)" for player elements
+       * fixed bug with player not falling when snapping down with gravity
 
 2004-03-07
        * fixed bug which messed up key config when using keypad number keys
index c7afe9ea99c1010fbf0c13f4761d30f666190269..2981ce83d256182dad9ef992aefdce104749dcd0 100644 (file)
@@ -549,7 +549,8 @@ struct ConfigInfo image_config[] =
   { "sp_electron.xpos",                                "8"                     },
   { "sp_electron.ypos",                                "10"                    },
   { "sp_electron.frames",                      "8"                     },
-  { "sp_electron.delay",                       "2"                     },
+  { "sp_electron.delay",                       "4"                     },
+  { "sp_electron.global_sync",                 "true"                  },
   { "sp_electron.EDITOR",                      "RocksSP.pcx"           },
   { "sp_electron.EDITOR.xpos",                 "10"                    },
   { "sp_electron.EDITOR.ypos",                 "11"                    },
index e4f04ce0fd2da69fe5af2f8210659960c63a07ee..8605b78111360dcf53f8af625c1650c779cf7804 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-03-09 02:02]"
+#define COMPILE_DATE_STRING "[2004-03-10 01:26]"
index c5d8eb30691e232dcc0203f794525aead073b19f..154d228e6257993a10f00e67c448000976756128 100644 (file)
@@ -3174,7 +3174,9 @@ void LoadTapeFromFilename(char *filename)
   {
     tape.no_valid_file = TRUE;
 
+#if 0
     Error(ERR_WARN, "cannot read tape '%s' -- using empty tape", filename);
+#endif
 
     return;
   }
index 6a797d86e7a0ff2545d3009c56cf9d776f79a93b..f5cf3d8e25162c6d1b9f4a84699ac3f5068d3e0b 100644 (file)
@@ -3947,6 +3947,7 @@ inline static void TurnRoundExt(int x, int y)
     else if (element == EL_BD_BUTTERFLY)     /* && MovDir[x][y] == left_dir) */
       MovDelay[x][y] = 1;
   }
+#if 0
   else if (element == EL_SPACESHIP || element == EL_BD_FIREFLY ||
           element == EL_SP_SNIKSNAK || element == EL_SP_ELECTRON)
   {
@@ -3965,6 +3966,34 @@ inline static void TurnRoundExt(int x, int y)
     else if (element == EL_BD_FIREFLY)     /* && MovDir[x][y] == right_dir) */
       MovDelay[x][y] = 1;
   }
+#else
+  else if (element == EL_SPACESHIP || element == EL_BD_FIREFLY)
+  {
+    TestIfBadThingTouchesOtherBadThing(x, y);
+
+    if (ENEMY_CAN_ENTER_FIELD(element, left_x, left_y))
+      MovDir[x][y] = left_dir;
+    else if (!ENEMY_CAN_ENTER_FIELD(element, move_x, move_y))
+      MovDir[x][y] = right_dir;
+
+    if (element == EL_SPACESHIP        && MovDir[x][y] != old_move_dir)
+      MovDelay[x][y] = 9;
+    else if (element == EL_BD_FIREFLY)     /* && MovDir[x][y] == right_dir) */
+      MovDelay[x][y] = 1;
+  }
+  else if (element == EL_SP_SNIKSNAK || element == EL_SP_ELECTRON)
+  {
+    TestIfBadThingTouchesOtherBadThing(x, y);
+
+    if (ELEMENT_CAN_ENTER_FIELD_GENERIC(element, left_x, left_y, 0))
+      MovDir[x][y] = left_dir;
+    else if (!ELEMENT_CAN_ENTER_FIELD_GENERIC(element, move_x, move_y, 0))
+      MovDir[x][y] = right_dir;
+
+    if (MovDir[x][y] != old_move_dir)
+      MovDelay[x][y] = 9;
+  }
+#endif
   else if (element == EL_YAMYAM)
   {
     boolean can_turn_left  = YAMYAM_CAN_ENTER_FIELD(left_x, left_y);
@@ -7468,12 +7497,30 @@ void GameActions()
   if (!options.network && !setup.team_mode)
     local_player->effective_action = summarized_player_action;
 
+#if 1
+  for (i = 0; i < MAX_PLAYERS; i++)
+  {
+    tape_action[i] = stored_player[i].effective_action;
+
+    if (tape.recording && tape_action[i] && !tape.player_participates[i])
+      tape.player_participates[i] = TRUE;    /* player just appeared from CE */
+  }
+
+  /* only save actions from input devices, but not programmed actions */
+  if (tape.recording)
+    TapeRecordAction(tape_action);
+#endif
+
   for (i = 0; i < MAX_PLAYERS; i++)
   {
     int actual_player_action = stored_player[i].effective_action;
 
 #if 1
-    /* !!! TEST !!! */
+    /* !!! THIS BREAKS THE FOLLOWING TAPES: !!!
+       - rnd_equinox_tetrachloride 048
+       - rnd_equinox_tetrachloride_ii 096
+       - rnd_emanuel_schmieg 002
+    */
     if (stored_player[i].MovPos == 0)
       CheckGravityMovement(&stored_player[i]);
 #endif
@@ -7510,15 +7557,19 @@ void GameActions()
             stored_player[i].MovPos, actual_player_action, FrameCounter);
 #endif
 
+#if 1
+    PlayerActions(&stored_player[i], actual_player_action);
+#else
     tape_action[i] = PlayerActions(&stored_player[i], actual_player_action);
 
     if (tape.recording && tape_action[i] && !tape.player_participates[i])
       tape.player_participates[i] = TRUE;    /* player just appeared from CE */
+#endif
 
     ScrollPlayer(&stored_player[i], SCROLL_GO_ON);
   }
 
-#if 1
+#if 0
   if (tape.recording)
     TapeRecordAction(tape_action);
 #endif
index a78ee6118bb5241ef391f7eb193ee46af187798c..df191e0ab886fd2cc740db2a0edfe8a04ac685c0 100644 (file)
@@ -3378,6 +3378,13 @@ void InitElementPropertiesEngine(int engine_version)
       element_info[element].ignition_delay = 8;
     }
   }
+
+  /* set element properties that were handled incorrectly in older levels */
+  if (engine_version < VERSION_IDENT(3,0,9,0))
+  {
+    SET_PROPERTY(EL_SP_SNIKSNAK, EP_DONT_COLLIDE_WITH, FALSE);
+    SET_PROPERTY(EL_SP_ELECTRON, EP_DONT_COLLIDE_WITH, FALSE);
+  }
 #endif
 
   /* this is needed because some graphics depend on element properties */