home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / ICTARI07.ARJ / ictari.07 / ASSEMBLY / SPRITES / S_SPRITE.DOC < prev    next >
Text File  |  1993-09-03  |  2KB  |  60 lines

  1. SUB-ROUTINE NAME        s_sprite
  2. BRIEF DESCRIPTION       Display stationary sprite
  3. FILENAME                SPRITE.S
  4. OTHER RESOURCES
  5. LANGUAGE                Assembler (Devpac)
  6. AUTHOR                  Peter Hibbs
  7.  
  8. ENTRY PARAMETERS        d0=x co-ordinate of hot spot (0-319)
  9.                         d1=y co-ordinate of hot spot (0-199)
  10.                         d2=sprite number (1-nn)
  11.                         (screen) holds screen start address
  12.                         (sprite_tab..) holds sprite info
  13.  
  14. EXIT PARAMETERS         Sprite displayed on screen.
  15.  
  16. DETAILS -
  17.  
  18. This routine is similar to the  m_sprite  sub-routine except that it does
  19. not save the screen data  under  the  sprite.  It  can be used to display
  20. sprite images on screen  or  (in  conjunction  with  the screen switching
  21. techniques) can be used to display animated sprites.
  22.  
  23. Since this routine does not save  the  screen data, the spr_buffer is not
  24. required, otherwise the limitations of the m_sprite routine also apply to
  25. this one. This routine, however, is much  faster because it does not have
  26. save and restore the screen  images  each  time.  It should also be noted
  27. that if large stationary  sprites  are  being  used,  they  will be drawn
  28. faster if the x co-ordinate  falls  on  a  multiple of 16 pixel boundary,
  29. i.e. 0, 16, 32, 48, 64, 80, etc.
  30.  
  31. Before the routine is used, the  sprite_init  routine should be called to
  32. load the sprite file and initialise the  table and sprite data buffers. A
  33. typical code would be as follows -
  34.  
  35.                 bsr     sprite_init     set up table and buffers
  36.                 tst.l   d0              check for error
  37.                 bmi     error_label     branch if load error
  38.                 ..      ..
  39.  
  40.  
  41.                 move    #10,d0          set x co-ord
  42.                 move    #20,d1          set y co-ord
  43.                 move    #30,d2          use sprite number 30
  44.                 bsr     s_sprite        display sprite
  45.                 ..
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.