[comp.sys.amiga] Using Bobs

dykimber@phoenix.Princeton.EDU (Daniel Yaron Kimberg) (12/13/87)

I've been trying to write a very simple program using Bobs, and have run into
some difficulties.  Of course it hasn't helped any that none of the manuals I
have agree on anything, or are internally consistent.  In any case, I am trying
to create a Bob to use in a custom screen.  I don't care about collision - the
bob is 32 pixels wide, in two bitplanes (the screen has 3), and there is nothing
particularly radical about what I'm trying to do, as far as I can tell.  The
code I've written always gurus on not enough memory, even though I'm not
allocating that much.  In addition, when I can get it to move around the screen,
the image bears no resemblance to what I put in the image data array.  Also,
contradictory to two of the three sources I used, the bob will move around on
the screen without my calling MgrCop() and LoadView(), or any of the functions
that call them.  I just use SortGList() and DrawGList().  Any other functions
seem to get the guru.  I believe that I am calling InitMasks() correctly, and
correctly allocating the savebuffer.  Also, I think the gel list is being
correctly initialized.  An interesting side effect is that when it runs to
completion, the chip memory fragments, and a second run will get the memory
guru.  Oh, I'm not double buffering, either.
    If anyone can offer any suggestions, examples of C source, or any help, I'd
appreciate it.  Please use e-mail, though - our site expires articles faster
than I can read them.  Thanks,
                                              -Dan