+ ResetDelayCounterExt(&part->step_delay, anim_sync_frame);
+
+ part->initial_anim_sync_frame = (g->anim_global_sync ? 0 : anim_sync_frame);
+ part->step_frames = 0;
+
+ if (c->direction & MV_HORIZONTAL)
+ {
+ int pos_bottom = FULL_SYSIZE - g->height;
+
+ if (c->position == POS_TOP)
+ part->y = 0;
+ else if (c->position == POS_UPPER)
+ part->y = GetSimpleRandom(pos_bottom / 2);
+ else if (c->position == POS_MIDDLE)
+ part->y = pos_bottom / 2;
+ else if (c->position == POS_LOWER)
+ part->y = pos_bottom / 2 + GetSimpleRandom(pos_bottom / 2);
+ else if (c->position == POS_BOTTOM)
+ part->y = pos_bottom;
+ else
+ part->y = GetSimpleRandom(pos_bottom);
+
+ if (c->direction == MV_RIGHT)
+ {
+ part->step_xoffset = c->step_offset;
+ part->x = -g->width + part->step_xoffset;
+ }
+ else
+ {
+ part->step_xoffset = -c->step_offset;
+ part->x = FULL_SXSIZE + part->step_xoffset;
+ }
+
+ part->step_yoffset = 0;
+ }
+ else if (c->direction & MV_VERTICAL)
+ {
+ int pos_right = FULL_SXSIZE - g->width;
+
+ if (c->position == POS_LEFT)
+ part->x = 0;
+ else if (c->position == POS_RIGHT)
+ part->x = pos_right;
+ else
+ part->x = GetSimpleRandom(pos_right);
+
+ if (c->direction == MV_DOWN)
+ {
+ part->step_yoffset = c->step_offset;
+ part->y = -g->height + part->step_yoffset;
+ }
+ else
+ {
+ part->step_yoffset = -c->step_offset;
+ part->y = FULL_SYSIZE + part->step_yoffset;
+ }
+
+ part->step_xoffset = 0;
+ }
+ else
+ {
+ part->x = 0;
+ part->y = 0;
+
+ part->step_xoffset = 0;
+ part->step_yoffset = 0;
+ }
+
+ if (c->x != ARG_UNDEFINED_VALUE)
+ part->x = c->x;
+ if (c->y != ARG_UNDEFINED_VALUE)
+ part->y = c->y;
+
+ if (c->step_xoffset != ARG_UNDEFINED_VALUE)
+ part->step_xoffset = c->step_xoffset;
+ if (c->step_yoffset != ARG_UNDEFINED_VALUE)
+ part->step_yoffset = c->step_yoffset;
+ }
+
+ if ((part->x <= -g->width && part->step_xoffset <= 0) ||
+ (part->x >= FULL_SXSIZE && part->step_xoffset >= 0) ||
+ (part->y <= -g->height && part->step_yoffset <= 0) ||
+ (part->y >= FULL_SYSIZE && part->step_yoffset >= 0))
+ return TRUE;
+
+ if (part->step_frames_value != ARG_UNDEFINED_VALUE &&
+ part->step_frames >= part->step_frames_value)
+ return TRUE;
+
+ if (!DelayReachedExt(&part->step_delay, part->step_delay_value,
+ anim_sync_frame))
+ return FALSE;
+
+#if 0