rnd-20040409-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 9 Apr 2004 16:36:02 +0000 (18:36 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:46:51 +0000 (10:46 +0200)
* added possibility to push/press accessible elements from a side that
  is not accessible
* fixed bug with not setting actual date when appending to tape

ChangeLog
src/conftime.h
src/game.c
src/tape.c
src/tools.c

index 46ff55382c65b4474b05058e6d018006f1938438..dd75aacd58b384458905686894dc789d8074d274 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-09
+       * added possibility to push/press accessible elements from a side that
+         is not accessible
+       * fixed bug with not setting actual date when appending to tape
+
 2004-04-07
        * fixed bug with incorrectly initialized custom element editor graphics
 
index bbc9960acd3ec6715b75bb17963deca2b28c2eb3..b441a8835e62c9287b2eaaadcb4d8529d76941a0 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-04-07 00:46]"
+#define COMPILE_DATE_STRING "[2004-04-09 18:25]"
index a19a1a86ca48b6b20856ea284592fd3b73361fcc..e80a1d1b82c46e514f25d1ca0b3e63844e5918b6 100644 (file)
@@ -10524,12 +10524,18 @@ int DigField(struct PlayerInfo *player,
 
     default:
 
+#if 1
+      if (IS_WALKABLE(element) && ACCESS_FROM(element, opposite_direction))
+#else
       if (IS_WALKABLE(element))
+#endif
       {
        int sound_action = ACTION_WALKING;
 
+#if 0
        if (!ACCESS_FROM(element, opposite_direction))
          return MF_NO_ACTION;  /* field not accessible from this direction */
+#endif
 
 #if 1
        if (element == EL_EMPTY_SPACE &&
@@ -10567,13 +10573,18 @@ int DigField(struct PlayerInfo *player,
 
        break;
       }
+#if 1
+      else if (IS_PASSABLE(element) && canPassField(x, y, move_direction))
+#else
       else if (IS_PASSABLE(element))
+#endif
       {
-#if 1
+#if 0
        if (!canPassField(x, y, move_direction))
          return MF_NO_ACTION;
 #else
 
+#if 0
 #if 1
        if (!IN_LEV_FIELD(nextx, nexty) || IS_PLAYER(nextx, nexty) ||
            !IS_WALKABLE_FROM(Feld[nextx][nexty], move_direction) ||
@@ -10583,6 +10594,7 @@ int DigField(struct PlayerInfo *player,
        if (!IN_LEV_FIELD(nextx, nexty) || !IS_FREE(nextx, nexty))
          return MF_NO_ACTION;
 #endif
+#endif
 
 #if 1
        if (!ACCESS_FROM(element, opposite_direction))
index f39c09ec7fff453a585f929008695f5936cf844b..34474bde1eba4b333a6ba1c7e7c7b8457cdccc3f 100644 (file)
@@ -654,10 +654,16 @@ void TapeDeactivateDisplayOff(boolean redraw_display)
 /* tape control functions                                                    */
 /* ========================================================================= */
 
-void TapeErase()
+static void TapeSetDate()
 {
   time_t epoch_seconds = time(NULL);
-  struct tm *time = localtime(&epoch_seconds);
+  struct tm *now = localtime(&epoch_seconds);
+
+  tape.date = 10000 * (now->tm_year % 100) + 100 * now->tm_mon + now->tm_mday;
+}
+
+void TapeErase()
+{
   int i;
 
   tape.length = 0;
@@ -670,13 +676,14 @@ void TapeErase()
   tape.pos[tape.counter].delay = 0;
   tape.changed = TRUE;
 
-  tape.date = 10000*(time->tm_year % 100) + 100*time->tm_mon + time->tm_mday;
   tape.random_seed = InitRND(NEW_RANDOMIZE);
 
   tape.file_version = FILE_VERSION_ACTUAL;
   tape.game_version = GAME_VERSION_ACTUAL;
   tape.engine_version = level.game_version;
 
+  TapeSetDate();
+
 #if 0
   printf("::: tape.engine_version = level.game_version = %d \n",
         level.game_version);
@@ -749,7 +756,10 @@ static void TapeAppendRecording()
   tape.recording = TRUE;
   tape.changed = TRUE;
 
-  DrawVideoDisplay(VIDEO_STATE_PLAY_OFF | VIDEO_STATE_REC_ON,0);
+  TapeSetDate();
+
+  DrawVideoDisplay(VIDEO_STATE_DATE_ON, tape.date);
+  DrawVideoDisplay(VIDEO_STATE_PLAY_OFF | VIDEO_STATE_REC_ON, 0);
 }
 
 void TapeHaltRecording()
index 4a4539b49faf310e2b806c893eae6c2d85fe3040..26ec6c22bf8f801bbba920c036e588cc5475c467 100644 (file)
@@ -878,11 +878,16 @@ void DrawPlayer(struct PlayerInfo *player)
   else if (player_is_moving && IS_ACCESSIBLE_UNDER(last_element))
     DrawLevelFieldThruMask(last_jx, last_jy);
 
-  /* ... and the field the player is entering */
-  if (IS_ACCESSIBLE_INSIDE(element))
-    DrawLevelField(jx, jy);
-  else if (IS_ACCESSIBLE_UNDER(element))
-    DrawLevelFieldThruMask(jx, jy);
+#if 1
+  if (!player->is_pushing)
+#endif
+  {
+    /* ... and the field the player is entering */
+    if (IS_ACCESSIBLE_INSIDE(element))
+      DrawLevelField(jx, jy);
+    else if (IS_ACCESSIBLE_UNDER(element))
+      DrawLevelFieldThruMask(jx, jy);
+  }
 
   if (setup.direct_draw)
   {