define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / rom / graphics / addbob.c
blob5438d9bc40ff6d261d3d415c821b4bfcda349667
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function AddBob()
6 Lang: english
7 */
8 #include <graphics/gels.h>
9 #include <graphics/rastport.h>
10 #include "graphics_intern.h"
11 #include "gels_internal.h"
13 /*****************************************************************************
15 NAME */
16 #include <proto/graphics.h>
18 AROS_LH2(void, AddBob,
20 /* SYNOPSIS */
21 AROS_LHA(struct Bob *, bob, A0),
22 AROS_LHA(struct RastPort *, rp, A1),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 16, Graphics)
27 /* FUNCTION
28 The Bob is linked into the current gel list via AddVSprite.
29 The Bob's flags are set up.
31 INPUTS
32 Bob = pointer to Bob to be added to gel list
33 rp = pointer to RastPort that has an initilized GelsInfo linked
34 to it (see InitGels()).
36 RESULT
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 InitGels(), AddVSprite(), graphics/rastport.h, graphics/gels.h
47 INTERNALS
49 HISTORY
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 if (NULL != rp->GelsInfo) {
58 * Check whether the head and tail VSprite
59 * were alone before. If so, then give them
60 * a IntVSprite structure now.
62 if (rp->GelsInfo->gelHead->NextVSprite ==
63 rp->GelsInfo->gelTail) {
64 _CreateIntVSprite(rp->GelsInfo->gelHead, NULL, GfxBase);
65 _CreateIntVSprite(rp->GelsInfo->gelTail, NULL, GfxBase);
67 bob->Flags &= 0x00FF;
68 bob->Flags |= BWAITING;
69 AddVSprite (bob->BobVSprite, rp);
72 AROS_LIBFUNC_EXIT
73 } /* AddBob */