rnd-20060112-1-src
[rocksndiamonds.git] / src / libgame / toons.c
index fd2bb8e5cd3acdd5f890abf17b9aeae48a9f12a5..6f4fd2f7c49e3e79b7d0b340ded7ade00cf45829 100644 (file)
@@ -69,6 +69,10 @@ int getAnimationFrame(int num_frames, int delay, int mode, int start_frame,
     else
       frame = gfx.anim_random_frame % num_frames;
   }
+  else if (mode & (ANIM_CE_VALUE | ANIM_CE_SCORE))
+  {
+    frame = sync_frame % num_frames;
+  }
 
   if (mode & ANIM_REVERSE)             /* use reverse animation direction */
     frame = num_frames - frame - 1;
@@ -88,7 +92,7 @@ static int get_toon_direction(char *direction_string_raw)
                   strcmp(direction_string, "right") == 0 ? MV_RIGHT :
                   strcmp(direction_string, "up")    == 0 ? MV_UP :
                   strcmp(direction_string, "down")  == 0 ? MV_DOWN :
-                  MV_NO_MOVING);
+                  MV_NONE);
 
   free(direction_string);
 
@@ -306,7 +310,7 @@ void HandleAnimation(int mode)
   static int toon_nr = 0;
   int draw_mode;
 
-  if (!setup.toons)
+  if (!setup.toons || screen_info.num_toons == 0)
     return;
 
   /* this may happen after reloading graphics and redefining "num_toons" */