Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ncar!ames!ubvax!ardent!rap From: rap@ardent.UUCP (Rob Peck) Newsgroups: comp.sys.amiga Subject: Re: BOBS? Message-ID: <737@ardent.UUCP> Date: 30 Nov 88 22:01:21 GMT References: <3603@crash.cts.com> Organization: Dana Computer, Inc., Sunnyvale, CA Lines: 57 In article <3603@crash.cts.com>, billium@pro-charlotte.cts.com (Bill Blanke) writes: > (1) What do the structures that begin with ac_CompFlags and ao_NextOb > (This is with the assembly .i includes) do? I assume they're part of > an animation system. Could someone tell me how they work, and how > to use them? I think you can find information about these items in the Amiga ROM Kernel Manual, volume II, Libraries and Devices. There are few if any examples of AnimComp demos available in the public domain. Looks like time someone created a simple one for distribution. > (3) How do you use the DoubleBuffer structure. It would seem very easy > to enact, since its so small, and by programming BOBs, I've figured out > that you really have to have some sort of DoubleBuffering to make things > flicker free. Could someone describe to me how this structure works? > Double buffering bobs entails drawing rendering into one buffer while the other buffer is being displayed. By properly initializing the Double Buffering structure, you provide a place for the system to save the background that one bob is covering up in one buffer, while the Save Buffer (forgot exact terminology here) stores the background area for what you're drawing over in the current drawing buffer. Again I must suggest the RKM for what I believe is a fairly good description. (RJ and I wrote it). > I've only found two examples of even programming Bobs! Why is this? One > is from Prog. Guide to Amiga (It says its example is Double Buffered, but > later admits it isn't, still a good book though). Thanks for the compliment. The example was supposed to have been double buffered but I ran out of time. Perhaps some other experimenter has converted it to double-buffered and can post the modified code. I'd do it but don't quite have time right now. Just as a side-note, did anyone (other than me) realize that if you initialize a rastport and bitmap properly, you can point it to the data area that is reserved for a Bob's bitmap and actually draw stuff directly into the Bob while it is moving on the screen? It does require that you be careful with the ImageMask, perhaps deliberatly stuffing it with all 1 bits to allow full freedom of motion of a rectangular region, but thats a small price to pay. I happened across this as a solution to a particular problem, where I wanted to produce pair of playing cards bouncing around on the screen. Originally I just wanted to double-buffer outlines of the cards and fill the outlines with a pattern as I went along. However the area pattern is fixed with respect to the upperleft corner of a screen, so as the outlines moved, the patterns would change; instead of a playing card, they seemed like windows over a patterned background. I used double-buffered Bob's instead, (perhaps I can find that example), and drew the playing card pattern into the Bob bitmap using the special RastPort and BitMap I created. Thus wherever the Bob went, the pattern remained positioned relative to the Bob's edge, not the Screen's. The idea of this demo was to have the playing cards shuffle around on the screen for a little while, then to eventually bring up the words "If you play your cards right, maybe someone will buy you an Amiga". I'll see if I can find it, maybe the code would help someone using Bobs. Rob Peck