X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=13f264e8614f3c3a9cde745e95c2de62096dae69;hb=29e6de4784938ea9f21d47edc97bbf971ca66d83;hp=b8d863fe232597b2b32f3c43132b2d10c6255980;hpb=e6b3efaee4f084e66f2fa709402f25fc67536952;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index b8d863fe..13f264e8 100644 --- a/src/game.c +++ b/src/game.c @@ -3060,6 +3060,11 @@ static void InitGameEngine() strEqual(setup.engine_snapshot_mode, STR_SNAPSHOT_MODE_EVERY_COLLECT) ? SNAPSHOT_MODE_EVERY_COLLECT : SNAPSHOT_MODE_OFF); game.snapshot.save_snapshot = FALSE; + + /* ---------- initialize level time for Supaplex engine ------------------- */ + /* Supaplex levels with time limit currently unsupported -- should be added */ + if (level.game_engine_type == GAME_ENGINE_TYPE_SP) + level.time = 0; } int get_num_special_action(int element, int action_first, int action_last) @@ -4599,6 +4604,10 @@ void InitPlayerGfxAnimation(struct PlayerInfo *player, int action, int dir) static void ResetGfxFrame(int x, int y) { + // profiling showed that "autotest" spends 10~20% of its time in this function + if (DrawingDeactivatedField()) + return; + int element = Feld[x][y]; int graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]);