home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / l / libstore / !LibStore / Index / SpriteLib / Sprites < prev   
Encoding:
Text File  |  1993-03-14  |  1.8 KB  |  47 lines

  1. This library may be used to create, maintain, load and save sprite files.
  2.  
  3. Procedures:
  4.  
  5. DEFPROCstartup_sprites - call this to set up the areas of memory needed for
  6. mode translation.
  7.  
  8. DEFPROCsetup_spritearea(size%,RETURN spritearea%) - sets up a sprite area of
  9. size size%. Returns where it has created this in the variable passed in
  10. spritearea% (Note that this does not need to be defined).
  11.  
  12. DEFPROCload_sprites(filename$,spritearea%) - loads the sprites contained in
  13. filname$ into spritearea%.
  14.  
  15. DEFPROCsave_sprites(filename$,spritearea%) - saves the sprites contained in
  16. spritearea% to filename$.
  17.  
  18. DEFPROCdisplay_sprite(plot_action%,x%,y%,name$,spritearea%) - displays the
  19. sprite name$. Plot_action% is the GCOL code to plot it in (EG 3 for EOR, 8
  20. for with mask, etc)
  21.  
  22. DEFPROCsetup_table(spritearea%,spritename$) - sets up the translation table
  23. for a sprite, so that it can be displayed in the current mode. Needs
  24. Colourtrans 0.52 or later.
  25.  
  26. DEFPROCshow_sprite(spritearea%,spritename$,x%,y%) - plots the sprite using
  27. the current translation table at x%,y%. This will show a sprite that has
  28. been created, say, in MODE 15 in MODE12, so long as PROCsetup_table has been
  29. called while in MODE 12.
  30.  
  31. DEFPROCcreate_sprite(spritearea%,spritename$,xsize%,ysize%,mode%) - creates
  32. a sprite.
  33.  
  34. DEFPROCcreate_mask(spritearea%,spritename$) - gives a sprite a mask.
  35.  
  36. DEFPROCdraw_on_sprite(spritearea%,spritename$) - redirects screen output to
  37. a sprite. It is important not to corrupt the variables r0,r1,r2,r3 during
  38. the time screen output is directed to the sprite, because these contain the
  39. only way back.
  40.  
  41. DEFPROCoffsprite - resets plotting to the screen. In x0%, y0%, x1%, y1% it
  42. will return the coordinates that contain the box that has been changed.
  43.  
  44. DEFPROCdraw_on_mask(spritearea%,spritename$) - Redirects screen output to
  45. the mask of a sprite.
  46.  
  47.