posixc.library: convert path unix2amiga in rmdir before passing to stdcio remove
[AROS.git] / rom / graphics / addanimob.c
blob8c7619d228c9df66b05b63698411a294c8465223
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function AddAnimOb()
6 Lang: english
7 */
8 #include <graphics/gels.h>
9 #include <graphics/rastport.h>
10 #include "graphics_intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH3(void, AddAnimOb,
19 /* SYNOPSIS */
20 AROS_LHA(struct AnimOb *, anOb, A0),
21 AROS_LHA(struct AnimOb ** , anKey, A1),
22 AROS_LHA(struct RastPort *, rp, A2),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 26, Graphics)
27 /* FUNCTION
28 Link the AnimOb into the list pointed to by AnimKey.
29 Calls AddBob with all components of a Bob and initializes
30 all the timers of the components of this AnimOb.
31 You have to provide a valid GelsInfo structure that is linked
32 to the RastPort (InitGels())
34 INPUTS
35 anOb = pointer to AnimOb structure to be added to list of
36 AnimObs
37 anKey = address of a pointer to the first AnimOb in the list
38 (when first calling this function the content of
39 this address has to be NULL!)
40 rp = pointer to a valid RastPort with initialized GelsInfo
41 structure
43 RESULT
45 NOTES
47 EXAMPLE
49 BUGS
51 SEE ALSO
52 InitGels(), Animate(), graphics/rastport.h, graphics/gels.h
54 INTERNALS
56 HISTORY
58 *****************************************************************************/
60 AROS_LIBFUNC_INIT
62 struct AnimComp * CurAnimComp;
64 /* this AnimOb becomes the first on in the list*/
65 if (NULL != *anKey)
67 anOb -> NextOb = (*anKey);
68 anOb -> PrevOb = NULL;
69 (*anKey) -> PrevOb = anOb;
71 *anKey = anOb;
73 CurAnimComp = anOb -> HeadComp;
75 while (NULL != CurAnimComp)
77 /* initialize the timer of each component's first sequence */
78 CurAnimComp -> Timer = CurAnimComp -> TimeSet;
79 AddBob(CurAnimComp -> AnimBob, rp);
80 /* visit the next component */
81 CurAnimComp = CurAnimComp -> NextComp;
84 AROS_LIBFUNC_EXIT
85 } /* AddAnimOb */