   
BLAH BLAH BLAH...  

   Ok heres another release in as many weeks.. thats getting pretty busy for 
me!.  This time its sprites and sprite saving routines ( + Mouse) something
which all you coders out there should find pretty helpful.  It should be a
fairly simple task to change things so that it can save variable lengths (you
won't have to change the drawing routine at all).

THE CODE...

   I've only doc'd the stuff you really need to know about.. you can suss
other stuff out yourself.. it's not hard.

DISK.ASM
SAVE_SPRITE PROC     IN:    DS:[SI] -> the start of a 16x16 sprite.
                                                                  
             SPRITE.INC:  SCR_WIDTH -> the width of the screen to be used 
                                       when displaying the sprite in case
                                       you want a virtual screen which is 
                                       shorter/longer than normal.
                          CLEAR_CLR -> the colour which will appear as a 
                                       blank.

SPRTEST.ASM
DRAW_SPRITE PROC     IN:    DS:[SI] -> the start of the sprite (any size)
                            ES:[DI] -> where to display the sprite



FILES...

CAPTURE.BIN -> 64000 bytes of raw screen data followed by 768 bytes of raw
               palette data.. beats me how it ended up 65536 bytes long ??

PAL.BIN     -> 768 bytes of raw pal data.. used by sprtest.com


SPEED...

   Once again no the fastest way which things could be done so once again
I'll lend you my ideas on the subject.. only 1 this time tho..
 
   1. Hard Code it... that is write a routine which changes the sprite data
   into a combination of code & data.. like this..

   sprite data file goes like this  0006 06 22 22 22 22 22 22 0314 01 22 END
   displaying that sprite involves doing basically this

   adding 6 to start position          ;        ADD DI,6
   writing out the 6 bytes             ;        MOVSB * 6
   adding 314 to curr postion          ;        ADD DI,314
   writing out 1 byte                  ;        MOVSB
   and thats it..

   so your conversion program converts it to that code (basically a better
   example appears below) and stores the data (for the RUNS) just after it
   so you end up with this..
    
   SPRITE1:
      MOV SI,OFFSET DATA1
      
      ADD DI,6
      MOVSD
      MOVSW
      ADD DI,314
      MOVSB

   DATA1 db 22, 22, 22, 22, 22, 22, 22

   note the use of a MOVSD and MOVSW in the place of 6 MOVSB's.. 

   now then that will display the sprite much faster than the code I have 
   included so if you're looking at using lots of big sprites then you had 
   better get coding that conversion program (maybe I'll release one one day)


                                                - Rage / DELZ
