X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fanim.c;h=1623cdc4685b6da6d5c8ae52c862e3256e41aa56;hb=39fb4fecfb8d4647d3563bdb18ce0065f6129522;hp=50cbba7b73521e650248525867e655b447f16e7e;hpb=ee8086c220663ad470ed61b1cef90eeb66be5cb1;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index 50cbba7b..1623cdc4 100644 --- a/src/anim.c +++ b/src/anim.c @@ -14,6 +14,8 @@ #include "anim.h" #include "main.h" #include "tools.h" +#include "events.h" +#include "screens.h" /* values for global toon animation definition */ @@ -915,7 +917,10 @@ static void PlayGlobalAnimMusic(struct GlobalAnimPartControlInfo *part) if (!setup.sound_music) return; - PlayMusic(music); + if (IS_LOOP_MUSIC(music)) + PlayMusicLoop(music); + else + PlayMusic(music); #if 0 printf("::: PLAY MUSIC %d.%d.%d: %d\n", @@ -1450,8 +1455,15 @@ static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part) if (anim_event_action == -1) return FALSE; - return (DoGadgetAction(anim_event_action) || - DoScreenAction(anim_event_action)); + boolean action_executed = (DoGadgetAction(anim_event_action) || + DoScreenAction(anim_event_action) || + DoKeysymAction(anim_event_action)); + + // check if further actions are allowed to be executed + if (part->control_info.style & STYLE_MULTIPLE_ACTIONS) + return FALSE; + + return action_executed; } static void InitGlobalAnim_Clickable() @@ -1537,7 +1549,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) if (!any_event_action && DoGlobalAnim_EventAction(part)) any_event_action = TRUE; - any_part_clicked = TRUE; + // determine if mouse clicks should be blocked from other animations + any_part_clicked = clickConsumed(part); if (isClickablePart(part, ANIM_EVENT_SELF)) {