*************************************************
*	this is a new version of this thing	*
* And hopefully the last, simply load in a 	*
* Single copy of each sprite one after the other*
* in sprites. the program will rotate them and	*
* calculate the mask resulting in a five bitplane
* image. Ser numsprites and sprite height and then
* wi the data out of finaldata, easy huh?
*************************************************
numsprites:	equ	1		;fill this in dummy
spriteheight:	equ	4		;must be power of 2

spritemassager:
	lea	sprites,a1
	lea	finaldata,a2	
	move.l	a2,a3
	move.w	#numsprites,d7		;main counter
	subq.w	#1,d7
spml1:
	moveq	#0,d5
spml2:
	move.l	a1,a0
	moveq	#spriteheight,d6
	subq.w	#1,d6
spml3:
	moveq	#0,d0
	moveq	#0,d4
	move.w	(a0),d4
	or.w	2(a0),d4
	or.w	4(a0),d4
	or.w	6(a0),d4	;get mask data
	eor.l	#-1,d4		;invert it
	ror.l	d5,d4		;rotate it
	move.w	d4,(a3)+
	swap	d4
	move.w	d4,8(a3)
*	addq.l	#2,a3
	move.w	(a0)+,d0
	ror.l	d5,d0
	move.w	d0,(a3)+
	swap	d0
	move.w	d0,8(a3)
*	addq.l	#2,a3
	moveq	#0,d0
	move.w	(a0)+,d0
	ror.l	d5,d0
	move.w	d0,(a3)+
	swap	d0
	move.w	d0,8(a3)
*	addq.l	#2,a3
	moveq	#0,d0
	move.w	(a0)+,d0
	ror.l	d5,d0
	move.w	d0,(a3)+
	swap	d0
	move.w	d0,8(a3)
*	addq.l	#2,a3
	moveq	#0,d0
	move.w	(a0)+,d0
	ror.l	d5,d0
	move.w	d0,(a3)+
	swap	d0
	move.w	d0,8(a3)
*	addq.l	#2,a3
	add.l	#10,a3
	dbf	d6,spml3	;do for height of sprite
	addq.l	#1,d5		;adjust rotation
	cmpi.l	#16,d5
	blt	spml2
	moveq	#spriteheight,d0
	asl.w	#3,d0
	add.w	d0,a1
	dbf	d7,spml1	;do for number of sprites
	sub.l	a2,a3
illegal

fd:
finaldata:	blk.w	25600,0

sprites:
	 dc.w	$0002,$011F,$00EF,$0110,$0108,$1498,$022F,$1CD6
	 dc.w	$8100,$5E8F,$0020,$7EDF,$8100,$C203,$8078,$FE87
	 dc.w	$A300,$7C00,$607E,$7C81,$3A00,$0500,$001F,$05FF
	 dc.w	$0600,$0100,$003F,$01C0,$01FF,$0000,$0000,$0000
	 dc.w	$C000,$3000,$3000,$0000,$4000,$4010,$FFE0,$3010
	 dc.w	$0000,$F003,$0FFC,$F003,$0000,$0FFE,$F000,$FFFE
	 dc.w	$01C0,$E600,$1800,$FE00,$0E00,$7100,$0000,$F100
	 dc.w	$30F8,$0FF8,$80F8,$4F08,$8000,$0000,$0000,$0000
	 dc.w	$3FFC,$3FFC,$3FFC,$3FFC,$4002,$4002,$7FFE,$7FFE
	 dc.w	$8001,$8009,$FFF7,$C003,$8001,$C001,$A003,$FFFD
	 dc.w	$8001,$C001,$BFFB,$FFFD,$8001,$E005,$9FF9,$FFFF
	 dc.w	$4002,$7FFE,$4002,$7FFE,$3FFC,$3FFC,$3FFC,$3FFC
	 dc.w	$0000,$8001,$8FF9,$9001,$57EA,$47EA,$57FE,$6802
	 dc.w	$3BDC,$03DC,$3BFE,$4400,$0000,$0000,$007F,$FF80
	 dc.w	$003E,$FE00,$7DFF,$83C1,$001C,$7FC0,$3BFE,$4422
	 dc.w	$400A,$7FE2,$57FE,$6816,$0000,$9FF1,$8009,$9FF9
	 dc.w	$3FFC,$3FFC,$3FFC,$3FFC,$0000,$7FFE,$7FFE,$7FFE
	 dc.w	$BFFD,$FFFF,$FFFF,$FFFF,$A005,$FFFF,$FFFF,$FFFF
	 dc.w	$A005,$FFFF,$FFFF,$FFFF,$BFFD,$FFFF,$FFFF,$FFFF
	 dc.w	$0000,$7FFE,$7FFE,$7FFE,$3FFC,$3FFC,$3FFC,$3FFC
	 dc.w	$3FFE,$3FFE,$3FFE,$3FFE,$7FFF,$79D7,$4629,$4001
	 dc.w	$E629,$FFFF,$8629,$8001,$DFFF,$F9D7,$8629,$8001
	 dc.w	$FFFF,$F9D7,$8629,$8001,$F9D7,$C629,$8629,$8001
	 dc.w	$7FFF,$79D7,$4629,$4001,$3FFE,$3FFE,$3FFE,$3FFE
	 dc.w	$0000,$0000,$07FF,$07FF,$0001,$0001,$17FF,$1801
	 dc.w	$0001,$0FFF,$5003,$6003,$0005,$1007,$AFFF,$C007
	 dc.w	$0005,$8007,$6007,$FFFF,$0001,$6003,$1FFF,$7FFF
	 dc.w	$0001,$1FFF,$0001,$1FFF,$0000,$0000,$07FF,$07FF
	 dc.w	$0000,$0000,$0FF8,$1000,$1FF8,$1FF8,$3FFC,$2000
	 dc.w	$0FF4,$2FF4,$7FFE,$5000,$0000,$8000,$780F,$FFF0
	 dc.w	$07EC,$7000,$3FEE,$4812,$07E8,$3000,$1FEC,$2814
	 dc.w	$07E0,$1000,$0FE8,$1818,$0000,$0FF0,$0000,$0FF0

masks:

