X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=e159b96ef2183c7d6c73aed8c0f709872fefe5d6;hb=727d3b5fc7cac6f59652eaa23f1ed9e991ae50bd;hp=ee6de4e8fd13b2ee20f78413c8c628b648c6e118;hpb=aeb435acf0e7c74ff293f4958cf969ff82eac89d;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index ee6de4e8..e159b96e 100644 --- a/src/game.c +++ b/src/game.c @@ -2702,6 +2702,9 @@ static void InitGameEngine() game_em.use_single_button = (game.engine_version > VERSION_IDENT(4,0,0,2)); + game_em.use_snap_key_bug = + (game.engine_version < VERSION_IDENT(4,0,1,0)); + /* ---------------------------------------------------------------------- */ /* set maximal allowed number of custom element changes per game frame */ @@ -4596,6 +4599,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]); @@ -14250,7 +14257,7 @@ static void FadeLevelMusic() { int music_nr = getLevelMusicNr(); char *curr_music = getCurrentlyPlayingMusicFilename(); - char *next_music = getMusicListEntry(music_nr)->filename; + char *next_music = getMusicInfoEntryFilename(music_nr); if (!strEqual(curr_music, next_music)) FadeMusic(); @@ -14266,7 +14273,7 @@ static void PlayLevelMusic() { int music_nr = getLevelMusicNr(); char *curr_music = getCurrentlyPlayingMusicFilename(); - char *next_music = getMusicListEntry(music_nr)->filename; + char *next_music = getMusicInfoEntryFilename(music_nr); if (!strEqual(curr_music, next_music)) PlayMusic(music_nr);