X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fanim.c;h=d5b3d74a7fe36163cb25939413f9dacf8c93b82d;hb=22d06801587ab712d58e2843877e993ccdde0b46;hp=9ab9f6dcf4356b4d9ec45300daed590a5103fa37;hpb=1c7bb353048c08f4f49c31c81d480c94363bd9ce;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index 9ab9f6dc..d5b3d74a 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1164,7 +1164,7 @@ static void InitGlobalAnim_Triggered(struct GlobalAnimPartControlInfo *part, if (isClickablePart(part2, mask)) { part2->triggered = TRUE; - *click_consumed = clickConsumed(part); // click was on "part"! + *click_consumed |= clickConsumed(part); // click was on "part"! #if DEBUG_ANIM_EVENTS printf("::: => %d.%d TRIGGERED BY %s OF %d.%d\n", @@ -1760,6 +1760,7 @@ static void InitGlobalAnim_Clickable(void) 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; @@ -1803,8 +1804,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) part->old_anim_nr + 1, part->old_nr + 1); #endif - part->clicked = TRUE; - click_consumed = clickConsumed(part); + anything_clicked = part->clicked = TRUE; + click_consumed |= clickConsumed(part); } // always handle "unclick:any" events (releasing anywhere on screen) ... @@ -1816,8 +1817,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) part->old_anim_nr + 1, part->old_nr + 1); #endif - part->clicked = TRUE; - click_consumed = clickConsumed(part); + anything_clicked = part->clicked = TRUE; + click_consumed |= clickConsumed(part); } // ... but only handle the first (topmost) clickable animation @@ -1837,7 +1838,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) any_event_action = TRUE; // determine if mouse clicks should be blocked from other animations - any_part_clicked = clickConsumed(part); + any_part_clicked |= clickConsumed(part); if (isClickablePart(part, ANIM_EVENT_SELF)) { @@ -1846,8 +1847,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) part->old_anim_nr + 1, part->old_nr + 1); #endif - part->clicked = TRUE; - click_consumed = clickConsumed(part); + anything_clicked = part->clicked = TRUE; + click_consumed |= clickConsumed(part); } // check if this click is defined to trigger other animations @@ -1858,7 +1859,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) } } - if (click_consumed) + if (anything_clicked) { handle_click = TRUE;