{
int frame = 0;
+ if (delay < 1) // delay must be at least 1
+ delay = 1;
+
sync_frame += start_frame * delay;
if (mode & ANIM_LOOP) // looping animation
static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
{
boolean click_consumed = FALSE;
+ boolean anything_clicked = FALSE;
boolean any_part_clicked = FALSE;
boolean any_event_action = FALSE;
int mode_nr;
+ int i;
// check game modes in reverse draw order (to stop when clicked)
for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--)
part->old_anim_nr + 1, part->old_nr + 1);
#endif
- part->clicked = TRUE;
+ anything_clicked = part->clicked = TRUE;
click_consumed |= clickConsumed(part);
}
part->old_anim_nr + 1, part->old_nr + 1);
#endif
- part->clicked = TRUE;
+ anything_clicked = part->clicked = TRUE;
click_consumed |= clickConsumed(part);
}
part->old_anim_nr + 1, part->old_nr + 1);
#endif
- part->clicked = TRUE;
+ anything_clicked = part->clicked = TRUE;
click_consumed |= clickConsumed(part);
}
}
}
- if (click_consumed)
+ if (anything_clicked)
{
handle_click = TRUE;
- HandleGlobalAnim(ANIM_CONTINUE, game_status);
+ for (i = 0; i < NUM_GAME_MODES; i++)
+ HandleGlobalAnim(ANIM_CONTINUE, i);
handle_click = FALSE;
+
+ // prevent ignoring release event if processed within same game frame
+ StopProcessingEvents();
}
return (click_consumed || any_event_action);