+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
-#define COMPILE_DATE_STRING "[2004-04-07 00:46]"
+#define COMPILE_DATE_STRING "[2004-04-09 18:25]"
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 &&
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) ||
if (!IN_LEV_FIELD(nextx, nexty) || !IS_FREE(nextx, nexty))
return MF_NO_ACTION;
#endif
+#endif
#if 1
if (!ACCESS_FROM(element, opposite_direction))
/* 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;
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);
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()
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)
{