removed explicitly setting draw order for pointer-style animations
[rocksndiamonds.git] / src / anim.c
index 08abd6680cc7b2bc30b4e0ade4711ce7e3732667..a23d6e581de1c2f23c1b780d91e1f771c92f1247 100644 (file)
@@ -602,19 +602,10 @@ static void InitGlobalAnimControls(void)
          anim->has_base = TRUE;
        }
 
-       // apply special settings for pointer-style animations
-       if (part->control_info.class == get_hash_from_key("pointer"))
-       {
-         // force animation to be on top (must set anim and part control)
-         if (anim->control_info.draw_order == 0)
-           anim->control_info.draw_order = 1000000;
-         if (part->control_info.draw_order == 0)
-           part->control_info.draw_order = 1000000;
-
-         // force animation to pass-through clicks (must set part control)
-         if (part->control_info.style == STYLE_DEFAULT)
-           part->control_info.style |= STYLE_PASSTHROUGH;
-       }
+       // force pointer-style animations to pass-through clicks
+       if (part->control_info.class == get_hash_from_key("pointer") &&
+           part->control_info.style == STYLE_DEFAULT)
+         part->control_info.style |= STYLE_PASSTHROUGH;
       }
 
       if (anim->num_parts > 0 || anim->has_base)
@@ -2120,7 +2111,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
   int mode_nr;
   int i;
 
-  for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++)
+  // check game modes in reverse draw order (to stop when clicked)
+  for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--)
   {
     struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr];
     int anim_nr;