2007-05-14 Matthew Allum <mallum@openedhand.com>

* clutter/clutter-behaviour-path.c:
        Fix bug where last knot position wouldn't get reached.

        * clutter/clutter-group.c:
        Add some docs

        * clutter/clutter-timeline.h:
        * clutter/clutter-timeline.c:
        Add clutter_timeline_copy (needed for ClutterEffect)

        * clutter/clutter-version.h.in:
        Export windowing system / GL backend etc defines.

        * clutter/Makefile.am:
        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        * clutter/clutter.h:

        * clutter/glx/clutter-backend-glx.c:
        Minor clean ups.

        * clutter/clutter-alpha.h:
        Add a fixme.

        * configure.ac:
        Add FPU define.

        * examples/Makefile.am:
        * examples/slider.c:
        Add Robs slider game.
This commit is contained in:
Matthew Allum
2007-05-14 09:11:23 +00:00
parent e121eb54c8
commit 23ac88ac70
15 changed files with 742 additions and 4 deletions

View File

@ -145,6 +145,8 @@ actor_apply_knot_foreach (ClutterBehaviour *behaviour,
{
ClutterKnot *knot = data;
CLUTTER_NOTE (BEHAVIOUR, "Setting actor to %ix%i", knot->x, knot->y);
clutter_actor_set_position (actor, knot->x, knot->y);
}
@ -172,8 +174,13 @@ path_alpha_to_position (ClutterBehaviourPath *behave,
total_len = path_total_length (behave);
offset = (alpha * total_len) / CLUTTER_ALPHA_MAX_ALPHA;
CLUTTER_NOTE (BEHAVIOUR, "alpha %i vs %i, len: %i vs %i",
alpha, CLUTTER_ALPHA_MAX_ALPHA,
offset, total_len);
if (offset == 0)
{
/* first knot */
clutter_behaviour_actors_foreach (behaviour,
actor_apply_knot_foreach,
priv->knots->data);
@ -182,6 +189,20 @@ path_alpha_to_position (ClutterBehaviourPath *behave,
priv->knots->data);
return;
}
if (offset == total_len)
{
/* Special case for last knot */
ClutterKnot *last_knot = (g_slist_last (priv->knots))->data;
clutter_behaviour_actors_foreach (behaviour,
actor_apply_knot_foreach,
last_knot);
g_signal_emit (behave, path_signals[KNOT_REACHED], 0, last_knot);
return;
}
for (l = priv->knots; l != NULL; l = l->next)
{
@ -192,6 +213,7 @@ path_alpha_to_position (ClutterBehaviourPath *behave,
ClutterKnot *next = l->next->data;
dist_to_next = node_distance (knot, next);
if (offset >= dist && offset < (dist + dist_to_next))
{
ClutterKnot new;