added some performance tuning for "autotest" and warp mode
[rocksndiamonds.git] / src / game.c
index b8d863fe232597b2b32f3c43132b2d10c6255980..e159b96ef2183c7d6c73aed8c0f709872fefe5d6 100644 (file)
@@ -4599,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]);