These library functions are part of the monochrome graphics functions, thought to be easily portable.
The sprite functions are based on a special data structure permitting dynamic sprite sizes: the first two bytes define the sprite size, while the next ones describe the picture.
The bits are right-padded to fill the last byte in a row.
Pick up a sprite directly from the screen.
This functions isn't still working.
Draw a sprite of variable size it can behave in three different ways, to be specified in the “ortype” parameter:
the sprite will just be printed on the screen without deleting what's already there
the sprite will be XORed with the pictures already present on the screen
the sprite will be “printed in white”, eventually leaving a shape. This feature permits the use of “sprite masks”.
Saves the screen area in a sprite-like structure. Position and size are saved in it (taking 4 bytes), but the area granularity works at byte-level, to run faster.
char *background; background=malloc( 4 + (width/8+1) * (height) ); sprintf(background, "%c%c",width,height); bksave(x,y,back);
Restores the background area.
Get horizontal or vertical pixel bar, up to 16 pixel long, for a quick pattern recognition in graphics applications or games. (this function might not work correctly on all the target platforms) Note that point() and multipoint() are declared in “graphics.h”, but might be useful in games too.
This is a simple sprite editor for z88dk with it's main feature being that it automatically will generate code for you.
Its features make it very useful to create animated sprite arrays and to import external pictures into sprite structures.
The new Sprite Editor version is a little more handy:
A key reference sheet can be displayed in any moment by keeping F1 pressed.
The “import picture” function ('L' key) is very powerful, try it with your favourite picture format; when a 'SNA' file is being opened the editor tries to extract the Character set and UDG maps.
The brown “buttons” on the bottom bar can be repeatedly clicked by dragging the mouse.