X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=de8e9df3543af507fb16cd291b9906030906db26;hb=49c6dea89a293093a952b991594980b469dd835a;hp=a17057c8fb5204f19b3693538591ade91b4a860a;hpb=c46bcfd8dd92fbf3ce134eed1e64078147d33b50;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index a17057c8..de8e9df3 100644 --- a/src/tools.c +++ b/src/tools.c @@ -127,7 +127,11 @@ void RedrawPlayfield(boolean force_redraw, int x, int y, int width, int height) if (game_status == GAME_MODE_PLAYING && level.game_engine_type == GAME_ENGINE_TYPE_EM) { +#if 1 + RedrawPlayfield_EM(force_redraw); +#else BlitScreenToBitmap_EM(backbuffer); +#endif } else if (game_status == GAME_MODE_PLAYING && !game.envelope_active) { @@ -1827,6 +1831,13 @@ void DrawPlayer(struct PlayerInfo *player) int last_player_frame = player->Frame; int frame = 0; +#if 1 + /* GfxElement[][] is set to the element the player is digging or collecting; + remove also for off-screen player if the player is not moving anymore */ + if (IN_LEV_FIELD(jx, jy) && !player_is_moving) + GfxElement[jx][jy] = EL_UNDEFINED; +#endif + if (!player->active || !IN_SCR_FIELD(SCREENX(last_jx), SCREENY(last_jy))) return; @@ -5118,6 +5129,14 @@ int getGameFrameDelay_EM(int native_em_game_frame_delay) return game_frame_delay_value; } +int getCenteredPlayer_EM() +{ + if (game.centered_to_player != game.centered_to_player_next) + game.centered_to_player = game.centered_to_player_next; + + return game.centered_to_player; +} + unsigned int InitRND(long seed) { if (level.game_engine_type == GAME_ENGINE_TYPE_EM)