bblitlib
A buffer is a Blitz object, numbered from 0, with chip memory for the
background under shapes. BBlit first saves the area of the used bitmap
that the shape will cover into the buffer, then draws the shape like
Blit. UnBuffer puts all saved areas back, the newest first, and
empties the buffer. Unlike queued blits, this restores any background,
not only colour 0.
Buffer sets the buffer up with a number of bytes; it needs room for the
area under every shape drawn until the next UnBuffer, in all bitplanes
of the bitmap.
As in the original, only runtime error checking notices that the buffer is too small (#73).
Based on the bblitlib guide by Acid Software.
Library number 146. It manages Buffer objects, by default at most 10 (the compiler options set the maximum).
Commands
BBlit
Saves the area of the used bitmap under the shape into the buffer, then draws the shape like Blit. With Excessonoff, the bitplanes beyond the shape’s depth are set or cleared under the shape, as with Blit.
Statement. Help text: Buffer#,Shape#,X,Y[,Excessonoff]
2 forms:
.w, .w, .w, .w.w, .w, .w, .w, .w
BBlitMode
The blit mode of the following BBlit commands, as BlitMode; the start value is the cookie mode.
Statement. Help text: BLTCON0
Arguments: .w
Buffer
Sets the buffer up with Memorylen bytes of chip memory; an old buffer of the object is freed. With runtime error checking, a buffer that is too small gives the error “Buffer Overflow”.
Statement. Help text: Buffer#,Memorylen
Arguments: .w, .l
FlushBuffer
Empties the buffer without putting the background back, so that the next UnBuffer does nothing.
Statement. Help text: Buffer#
Arguments: .w
ShowStencil
Puts back the saved background through a stencil, only where the stencil has pixels; the buffer stays as it is. This lets shapes move between background and foreground. The bitmap holds both, the stencil only the foreground, and after the BBlit commands ShowStencil draws the foreground over the shapes again.
Statement. Help text: Buffer#,Stencil#
Arguments: .w, .w
UnBuffer
Puts back the background of all shapes drawn with BBlit, the newest first, and empties the buffer.
Statement. Help text: Buffer#
Arguments: .w