projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed Android project to API level 23 to support Android 10
[rocksndiamonds.git]
/
src
/
anim.c
diff --git
a/src/anim.c
b/src/anim.c
index d5b3d74a7fe36163cb25939413f9dacf8c93b82d..3e2f1222ee1bc82b0ced39b0f20c0313cef0203a 100644
(file)
--- a/
src/anim.c
+++ b/
src/anim.c
@@
-242,6
+242,9
@@
int getAnimationFrame(int num_frames, int delay, int mode, int start_frame,
{
int frame = 0;
{
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
sync_frame += start_frame * delay;
if (mode & ANIM_LOOP) // looping animation
@@
-1764,6
+1767,7
@@
static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
boolean any_part_clicked = FALSE;
boolean any_event_action = FALSE;
int mode_nr;
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--)
// check game modes in reverse draw order (to stop when clicked)
for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--)
@@
-1863,9
+1867,13
@@
static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
{
handle_click = TRUE;
{
handle_click = TRUE;
- HandleGlobalAnim(ANIM_CONTINUE, game_status);
+ for (i = 0; i < NUM_GAME_MODES; i++)
+ HandleGlobalAnim(ANIM_CONTINUE, i);
handle_click = FALSE;
handle_click = FALSE;
+
+ // prevent ignoring release event if processed within same game frame
+ StopProcessingEvents();
}
return (click_consumed || any_event_action);
}
return (click_consumed || any_event_action);