home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 39 / af039a.adf / draw.s < prev    next >
Text File  |  1992-09-17  |  985b  |  33 lines

  1.  
  2. ********************************************************************************
  3. *                   oo                              oo                           *
  4. *                 \(  )/      Bullfrog Demo      \(  )/                           *
  5. *                 ^ ^^ ^         Drawing            ^ ^^ ^                           *
  6. ********************************************************************************
  7.  
  8. ;All draw routines in here please.
  9.  
  10. _draw_all
  11.     move.w    man_x,d0                            ;x position
  12.     asr.w    #FOUR,d0                            ;scale position
  13.     move.w    man_y,d1                            ;y position
  14.     move.w    man_frame,d2                        ;sprite to draw
  15.     asr.w    #FOUR,d2                            ;slow down animation speed
  16.     lea        _man,a1                                ;gfx data
  17.     jsr        _simple_draw
  18.     rts
  19.  
  20. ********************************************************************************
  21. ;very simple interface for tutorial
  22. ;d0,d1 x,y pos d2 sprite no and a1 points at data
  23.  
  24. _simple_draw
  25.     movem.l    a0-a6/d0-d7,-(sp)
  26.     mulu    #240,d2
  27.     adda.l    d2,a1
  28.     moveq.w    #24,d2                            ;sprite height
  29.     move.l    _w_screen,a0
  30.     jsr        _s16_draw                        ;d0=x,d1=y,d2=height,a0=screen,a1=data
  31.     movem.l    (sp)+,a0-a6/d0-d7
  32.     rts
  33.