Re: A92: SPRMAKER routine for Plusshell


[Prev][Next][Index][Thread]

Re: A92: SPRMAKER routine for Plusshell




> Does anyone have a working routine for Jimmy Mardell's SPRMAKER that will work
> with Plusshell?? The routine in the doc is for Fargo 1 and everytime I try to
> convert it it crashes my calc!

Here it comes!

PutSprite:
 movem.l d0-d3/a0-a2,-(a7)
 lea     sprites(PC),a0
 lsl.l   #6,d2
 adda.l  d2,a0
 lsl.w   #1,d1
 move.l  d1,d2
 lsl.w   #4,d2
 sub.w   d1,d2
 move.b  d0,d1
 and.w   #$FFF0,d0
 lsr.b   #3,d0
 add.w   d0,d2
 and.b   #$0F,d1
 sub.b   #16,d1
 neg     d1
 moveq   #15,d0
 move.l  gray4lib::plane1,a1 ; modified
 move.l  gray4lib::plane0,a2 ; modified
 adda.l  d2,a1
 adda.l  d2,a2
 move.l  #$FFFF0000,d3
 rol.l   d1,d3
PS_PutRow2:
 clr.l   d2
 move.w  (a0)+,d2
 lsl.l   d1,d2
 and.l   d3,(a1)
 or.l    d2,(a1)
 clr.l   d2
 move.w  (a0)+,d2
 lsl.l   d1,d2
 and.l   d3,(a2)
 or.l    d2,(a2)
 lea     30(a1),a1
 lea     30(a2),a2
 dbra    d0,PS_PutRow2
 movem.l (a7)+,d0-d3/a0-a2
 rts

-- 
 Don Barnes
   E-MAIL: don.barnes@wmich.edu
       IM: DonRBarnes
    EFNET: donman
      WEB: http://mf.calc.org





References: