home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / gamesuite / !FSPConv / Help / PreMenu < prev    next >
Encoding:
Text File  |  1994-02-19  |  3.4 KB  |  84 lines

  1. Preshift Menu Help
  2. ==================
  3.  
  4. Preshifting is a technique used to increase the speed of sprite plotting.
  5. A preshifted sprite can be written to the screen 4 pixels at a time instead
  6. of one.
  7.  
  8. **NOTE** : PRESHIFTING IS ONLY AVILABLE IN FSP2 FORMAT FILES.
  9.  
  10. Up to four copies of the sprite may need to be stored - if you want to plot
  11. a sprite at ANY horizontal position you will need all four.
  12.  
  13. Let's say that n is an integer. If you want to plot your sprite at x
  14. coordinates which are 4n+0 (eg 0,4,8,12,16...) you must switch on the toggle icon marked '0' for that sprite.  If you want to plot the sprite at x
  15. coordinates of 4n+1 (1,5,9,13,17...) you must switch on the toggle marked
  16. '1' and so on.
  17.  
  18. Using preshifting with all toggles 0-3 on will mean a lot of memory is used
  19. for the sprite file, but the sprite can be plotted in any position.  If the
  20. sprite isn't going to move horizontally, you can save memory by just setting
  21. the '0' toggle.
  22.  
  23. Note that the settings of the preshifting controls will affect every FRAME
  24. of the sprite that is showing, but the controls must be set individually
  25. for each separate sprite.
  26.  
  27. Advanced Use
  28. ============
  29.  
  30. To get the best from FastSpr you'll have to know a bit about how it works.
  31. A sprite can be plotted using up to three techniques.
  32.  
  33. (1) The STRB block
  34. ==================
  35.  
  36. This moves pixels to the screen one pixel at a time.  It can write any shape
  37. of sprite, but only manages one pixel every 6 cycles (ARM 2).  This is the
  38. method used exclusively in FSP1 format files.  This technique can also clip
  39. a sprite to any horizontal position.  Stores 4 bytes in the file per pixel.
  40.  
  41. (2) The STR block
  42. =================
  43.  
  44. This moves pixels to the screen four at a time.  It can only write a 
  45. horizontal line of four pixels which start where the x coordinate is a
  46. multiple of 4.  It can only clip to windows where the horizontal coordinates
  47. are multiples of 4.  Speed is roughly one pixel every two cycles.  Stores 2
  48. bytes in the file per pixel.
  49.  
  50. (3 The STM block
  51. =================
  52.  
  53. This moves pixels to the screen 12 or 28 at a time.  It can only write a 
  54. horizontal line of 12 or 28 pixels which start where the x coordinate is a
  55. multiple of 4.  It can only clip to windows where the horizontal coordinates
  56. are multiples of 4.  Speed is about 1 pixel per cycle.  Stores just over one
  57. byte in the file per pixel.
  58.  
  59. Note that there are a lot of other overheads such as clipping tables, which
  60. increase the size of the file further.
  61.  
  62. FSPConv compiles files which will plot as much of the sprite as possible
  63. using (3), plot as much of the rest as possible with (2), and plot what's
  64. left with (1).
  65.  
  66. You may permit or forbid FSPConv to use (2) and (3) for a particular sprite
  67. with the toggles at the bottom of the sprite window.  Points to note:
  68.  
  69. •  If you switch off the STR and STM block you are no longer using
  70.    preshifting at all.  The sprite will be plotted as if it were from an
  71.    FSP1 format file and the settings of the toggles 0-3 are ignored.
  72.  
  73. •  Solid sprites of 15 (or just over) or 31 (or just over) pixels in width
  74.    can be plotted very quickly using STM blocks.
  75.  
  76. •  Transparent areas may reduce the plotting speed as STR or STM blocks are
  77.    more difficult to produce (as there are fewer continuous horizontal lines
  78.    of pixels) and the rest will need to be plotted using an STRB block.
  79.    
  80. You can make a big difference to the size of your sprite file with the pre-
  81. shifting controls.  Experiment to find the ideal set for your application.   
  82.    
  83.    
  84.