2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Graphics function AddAnimOb()
8 #include <graphics/gels.h>
9 #include <graphics/rastport.h>
10 #include "graphics_intern.h"
12 /*****************************************************************************
15 #include <proto/graphics.h>
17 AROS_LH3(void, AddAnimOb
,
20 AROS_LHA(struct AnimOb
*, anOb
, A0
),
21 AROS_LHA(struct AnimOb
** , anKey
, A1
),
22 AROS_LHA(struct RastPort
*, rp
, A2
),
25 struct GfxBase
*, GfxBase
, 26, Graphics
)
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())
35 anOb = pointer to AnimOb structure to be added to list of
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
52 InitGels() Animate() graphics/rastport.h graphics/gels.h
58 *****************************************************************************/
61 AROS_LIBBASE_EXT_DECL(struct GfxBase
*,GfxBase
)
63 struct AnimComp
* CurAnimComp
;
65 /* this AnimOb becomes the first on in the list*/
68 anOb
-> NextOb
= (*anKey
);
69 anOb
-> PrevOb
= NULL
;
70 (*anKey
) -> PrevOb
= anOb
;
74 CurAnimComp
= anOb
-> HeadComp
;
76 while (NULL
!= CurAnimComp
)
78 /* initialize the timer of each component's first sequence */
79 CurAnimComp
-> Timer
= CurAnimComp
-> TimeSet
;
80 AddBob(CurAnimComp
-> AnimBob
, rp
);
81 /* visit the next component */
82 CurAnimComp
= CurAnimComp
-> NextComp
;