X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fanim.c;h=1389dc4e8815451aaa2a49d6d78190f841871e22;hp=e836ff6a3aaf8ff85dabe6b0679111df38133f88;hb=HEAD;hpb=70df2b1709f05156b8bf6b142cc2a2e23205130b diff --git a/src/anim.c b/src/anim.c index e836ff6a..1389dc4e 100644 --- a/src/anim.c +++ b/src/anim.c @@ -531,10 +531,6 @@ static void InitGlobalAnimControls(void) anim->state = ANIM_STATE_INACTIVE; - // if draw order is undefined, set to default value "0" - if (anim->control_info.draw_order == ARG_UNDEFINED_VALUE) - anim->control_info.draw_order = 0; - part_nr = 0; for (p = 0; p < NUM_GLOBAL_ANIM_PARTS_ALL; p++) @@ -602,14 +598,15 @@ static void InitGlobalAnimControls(void) anim->has_base = TRUE; } - // 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; + // apply special settings to pointer-style animations + if (part->control_info.class == get_hash_from_key("pointer")) + { + // force pointer-style animations to be checked for clicks first + part->control_info.draw_order = 1000000; - // if draw order is undefined, inherit it from main animation - if (part->control_info.draw_order == ARG_UNDEFINED_VALUE) - part->control_info.draw_order = anim->control_info.draw_order; + // force pointer-style animations to pass-through clicks + part->control_info.style |= STYLE_PASSTHROUGH; + } } if (anim->num_parts > 0 || anim->has_base) @@ -788,7 +785,7 @@ static void DrawGlobalAnimationsExt(int drawing_target, int drawing_stage) int mode_nr; int i; - if (!setup.toons) + if (!setup.global_animations) return; if (drawing_stage == DRAW_GLOBAL_ANIM_STAGE_1 && @@ -898,6 +895,11 @@ static void DrawGlobalAnimationsExt(int drawing_target, int drawing_stage) int frame; int last_anim_random_frame = gfx.anim_random_frame; + if (!setup.toons && + part->graphic >= IMG_TOON_1 && + part->graphic <= IMG_TOON_20) + continue; + // when preparing source fading buffer, only draw animations to be stopped if (drawing_target == DRAW_TO_FADE_SOURCE && game_mode_anim_action[part->mode_nr] != ANIM_STOP)