added function to force restarting global animations
[rocksndiamonds.git] / src / anim.c
index 3393d93912eef6cc0fb7e29cf1000c7cb157d8cd..3f0a727cf47f96aa22feb70efab694be8b98122b 100644 (file)
@@ -1997,6 +1997,17 @@ static void ResetGlobalAnim_Clicked(void)
   InitGlobalAnim_Clicked(-1, -1, ANIM_CLICKED_RESET);
 }
 
+void RestartGlobalAnims(void)
+{
+  int anim_status_last = global.anim_status;
+
+  global.anim_status = GAME_MODE_LOADING;
+
+  SDLRedrawWindow();
+
+  global.anim_status = anim_status_last;
+}
+
 boolean HandleGlobalAnimClicks(int mx, int my, int button, boolean force_click)
 {
   static boolean click_consumed = FALSE;