From: Holger Schemel Date: Fri, 9 Apr 2004 16:36:02 +0000 (+0200) Subject: rnd-20040409-1-src X-Git-Tag: 3.1.0^2~24 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8ed54ba814cb0a10e73cbc29c833f2c5d77e9907;p=rocksndiamonds.git rnd-20040409-1-src * 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 --- diff --git a/ChangeLog b/ChangeLog index 46ff5538..dd75aacd 100644 --- 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 diff --git a/src/conftime.h b/src/conftime.h index bbc9960a..b441a883 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-04-07 00:46]" +#define COMPILE_DATE_STRING "[2004-04-09 18:25]" diff --git a/src/game.c b/src/game.c index a19a1a86..e80a1d1b 100644 --- a/src/game.c +++ b/src/game.c @@ -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)) diff --git a/src/tape.c b/src/tape.c index f39c09ec..34474bde 100644 --- a/src/tape.c +++ b/src/tape.c @@ -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() diff --git a/src/tools.c b/src/tools.c index 4a4539b4..26ec6c22 100644 --- a/src/tools.c +++ b/src/tools.c @@ -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) {