[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

To add a Bob to the system GEL list, use the AddBob() routine.  The Bob
and VSprite structures must be correct and cohesive when this call is
made.  See the makeBob() and makeVSprite() routines in the animtools.c
file listed at the end of this chapter for a detailed example of setting
up Bobs and VSprites.  See the setupGelSys() function for a more complete
example of the initialization of the GELs system.

For example:

    struct GelsInfo myGelsInfo = {0};
    struct VSprite dummySpriteA = {0}, dummySpriteB = {0};
    struct Bob myBob = {0};
    struct RastPort rastport = {0};

    /* Done ONCE, for this GelsInfo.  See setupGelSys() at the end of this
    ** chapter for a more complete initialization of the Gel system
    */
    InitGels(&dummySpriteA, &dummySpriteB, &myGelsInfo);

    /* Initialize the Bob members here, then AddBob() */
    AddBob(&myBob, &rastport);