New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / graphics / addbob.c
blobccb005a3bfcc8e1920dfb9a87f07cca4734e3c69
1 /*
2 Copyright © 1995-2001, 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
54 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
56 if (NULL != rp->GelsInfo) {
59 * Check whether the head and tail VSprite
60 * were alone before. If so, then give them
61 * a IntVSprite structure now.
63 if (rp->GelsInfo->gelHead->NextVSprite ==
64 rp->GelsInfo->gelTail) {
65 _CreateIntVSprite(rp->GelsInfo->gelHead, NULL, GfxBase);
66 _CreateIntVSprite(rp->GelsInfo->gelTail, NULL, GfxBase);
68 bob->Flags &= 0x00FF;
69 bob->Flags |= BWAITING;
70 AddVSprite (bob->BobVSprite, rp);
73 AROS_LIBFUNC_EXIT
74 } /* AddBob */