                Paul Robson's 12x12 Sprite and Tile routines
                ============================================

Hi, this is a routine which might prove useful to someone, it does
12x12 tiles and 12x12 sprites. The tiles and sprites are packed
so they fit in 18 bytes (12x12 bits = 144 bits = 144/8 = 18 bytes)

They are relatively but not jaw droppingly quick. I wrote it for a
project which is likely still to happen, but in a different way.

There are basically two functions.

GRDrawSprite draws a sprite at coordinates (H,L) for the sprite whose
graphic data is at BC. At present they are OR drawn, it would not be
complicated to extend it to use sprite masks. 12x12Bak.z80 is broadly
the same code but has GRDrawSpriteMasked which does a very simple mask
(the whole 12x12 underneath area is blanked), just include that file
instead and set all the GRDrawSprite calls to GRDrawSpriteMasked.

GRTileLine draws a line of 7 tiles (make it 8 easily :)) at screen position
HL (must be on a byte boundary). The tile array base is passed in BC
(i.e. it points to a sequence of bytes identifying the tiles). The
routine expects to find a set of 18 byte 12x12 tiles at label
"Tiles".

See the demo program Boot.Z80.

Also enclosed is a program TE.EXE which will edit the sprite/tile files
.SPR and generates .INC files for inclusion into TASM source. To use
it just type TE DEMO.SPR or whatever. You do it with a mouse. If it is
a sprite type it automatically generates sprites rotated through 90
180 and 270 degrees (as the routine cannot do this on the fly).

Source is included (and is for TC2, which you can download from the
Borland Community Museum for free)

Paul Robson (autismuk@aol.com)
The oldest TCPA swinger in town........ think I'll edit that 37 :)
25th June 2001.

