Browse Source

library: add ClipSprite8/16/32 routines (with explicit register parameters) and some documentation.
These routines are based on an implementation by Joey Adams, contributed to TIGCC in 2005 (at the same time as the Sprite* merged in GCC4TI several weeks ago).

git-svn-id: file:///var/svn/tigccpp/trunk@1361 9552661e-59e3-4036-b4f2-dbe53926924f

debrouxl 14 years ago
parent
commit
1fff1ecc6c

+ 85 - 0
tigcc/archive/clipsprite16.s

@@ -0,0 +1,85 @@
+
+.globl ClipSprite16
+.text
+.even
+ClipSprite16:
+	movem.l %d3-%d5,-(%a7)
+
+	tst.w %d1
+	bge.s .L__cs16_1
+	add.w %d1,%d2
+	add.w %d1,%d1
+	suba.w %d1,%a0
+	moveq #0,%d1
+.L__cs16_1:
+	move.w %d1,%d5
+	add.w %d2,%d1
+	sub.w #128,%d1
+	ble.s .L__cs16_2
+	sub.w %d1,%d2
+.L__cs16_2:
+	mulu.w #30,%d5
+	adda.w %d5,%a1
+	move.w %d0,%d1
+	not.w %d0
+	and.w #15,%d0
+	moveq #-1,%d4
+	addq.w #1,%d0
+	asr.w #4,%d1
+	add.w %d1,%d1
+	bge.s .L__cs16_3
+	cmp.w #-2,%d1
+	blt.s .L__cs16_rts
+	clr.w %d4
+	swap %d4
+.L__cs16_3:
+	cmp.w #28,%d1
+	blt.s .L__cs16_5
+	beq.s .L__cs16_4
+.L__cs16_rts:
+	movem.l (%a7)+,%d3-%d5
+	rts
+.L__cs16_4:
+	clr.w %d4
+.L__cs16_5:
+	adda.w %d1,%a1
+
+	subq.w #1,%d3
+	moveq #0,%d5
+	not.w %d5
+	lsl.l %d0,%d5
+	and.l %d4,%d5
+	not.l %d5 |ANDing flag used in RPLC mode
+	bra.s .L__cs16_loopentry | 2
+
+.L__cs16_AND:
+	not.w %d1
+	lsl.l %d0,%d1
+	and.l %d4,%d1
+	not.l %d1
+	and.l %d1,(%a1)
+
+.L__cs16_loop:
+	lea 30(%a1),%a1 | 4
+
+.L__cs16_loopentry:
+	subq.w #1,%d2
+	blt.s .L__cs16_rts
+
+	moveq #0,%d1
+	move.w (%a0)+,%d1
+	cmp.w #1,%d3
+	beq.s .L__cs16_AND
+	lsl.l %d0,%d1
+	and.l %d4,%d1
+	tst.w %d3
+	blt.s .L__cs16_XOR
+	beq.s .L__cs16_OR
+|RPLC
+	and.l %d5,(%a1)
+.L__cs16_OR:
+	or.l %d1,(%a1)
+	bra.s .L__cs16_loop
+.L__cs16_XOR:
+	eor.l %d1,(%a1)
+	bra.s .L__cs16_loop

+ 226 - 0
tigcc/archive/clipsprite32.s

@@ -0,0 +1,226 @@
+
+.globl ClipSprite32
+.text
+.even
+ClipSprite32:
+	movem.l %d3-%d7,-(%a7)
+
+	tst.w %d1
+	bge.s .L__cs32_1
+	add.w %d1,%d2
+	asl.w #2,%d1
+	suba.w %d1,%a0
+	moveq #0,%d1
+.L__cs32_1:
+	move.w %d1,%d3
+	add.w %d2,%d1
+	sub.w #128,%d1
+	ble.s .L__cs32_2
+	sub.w %d1,%d2
+.L__cs32_2:
+	move.w %d3,%d1
+	mulu.w #30,%d1
+	adda.w %d1,%a1
+	move.w %d0,%d1
+	move.w %d0,%d5
+	asr.w #4,%d1
+	add.w %d1,%d1
+	adda.w %d1,%a1
+
+	and.w #15,%d0
+	moveq #16,%d6 | 2
+	sub.w %d0,%d6 | 2
+
+	moveq #-1,%d4
+	lsl.w %d6,%d4
+	moveq #-1,%d3
+	lsr.l %d0,%d3
+
+	tst.w %d5
+	bge.s .L__cs32_3
+	swap %d3
+	clr.w %d3
+	swap %d3
+	cmp.w #-16,%d5
+	bge.s .L__cs32_3
+	moveq #0,%d3
+	cmp.w #-32,%d5
+	bgt.s .L__cs32_3
+.L__cs32_rts:
+	movem.l (%a7)+,%d3-%d7
+	rts
+
+.L__cs32_3:
+	cmp.w #240-32,%d5
+	ble.s .L__cs32_4
+	moveq #0,%d4
+	cmp.w #240-16,%d5
+	blt.s .L__cs32_4
+	clr.w %d3
+	cmp.w #240,%d5
+	bge.s .L__cs32_rts
+
+.L__cs32_4:
+	move.l %d3,%d6
+	move.w %d4,%d7
+	not.l %d6
+	not.w %d7
+	move.l %d6,.L__cs32_leftmaskdropoff+2
+	move.w 2(%a7),%d5
+	subq.w #2,%d5
+	bne.s .L__cs32_notand
+	move.l %d6,%d3
+	move.w %d7,%d4
+.L__cs32_notand:
+	lea -26(%a1),%a1
+.L__cs32_loop:
+	subq.w #1,%d2
+	blt.s .L__cs32_rts
+	lea 26(%a1),%a1
+	move.l (%a0)+,%d1
+	ror.l %d0,%d1
+	move.l %d1,%d6
+	swap %d6
+	tst.w %d5
+	beq.s .L__cs32_Am
+	and.l %d3,%d1 |left side
+	and.w %d4,%d6 |right side
+	cmpi.w #-1,%d5
+	beq.s .L__cs32_Om
+	bgt.s .L__cs32_Rm
+	|XOR
+	eor.l %d1,(%a1)+
+	eor.w %d6,(%a1)
+	bra.s .L__cs32_loop
+.L__cs32_Rm:	|RPLC
+  .L__cs32_leftmaskdropoff:
+	and.l #0xDEED,(%a1)
+	or.l %d1,(%a1)+
+	and.w %d7,(%a1)
+	or.w %d6,(%a1)
+	bra.s .L__cs32_loop
+.L__cs32_Om:	|OR
+	or.l %d1,(%a1)+
+	or.w %d6,(%a1)
+	bra.s .L__cs32_loop
+.L__cs32_Am:	|AND
+	or.l %d3,%d1 |left side
+	or.w %d4,%d6 |right side
+	and.l %d1,(%a1)+
+	and.w %d6,(%a1)
+	bra.s .L__cs32_loop
+
+
+| This one works, but uses 2 longword operations, where 1 longword + 1 word operations are enough.
+/*
+	.xdef ClipSprite32
+
+.text
+ClipSprite32:
+	movem.l %d3-%d7,-(%a7)
+
+	tst.w %d1
+	bge.s .L__cs32_nonegY
+	add.w %d1,%d2
+	asl.w #2,%d1
+	suba.w %d1,%a0
+	moveq #0,%d1
+.L__cs32_nonegY:
+	move.w %d1,%d3
+	add.w %d2,%d1
+	sub.w #128,%d1
+	ble.s .L__cs32_nooverY
+	sub.w %d1,%d2
+.L__cs32_nooverY:
+	move.w %d3,%d1
+	mulu.w #30,%d1
+	adda.w %d1,%a1
+	move.w %d0,%d1
+	move.w %d0,%d5
+	asr.w #4,%d1
+	add.w %d1,%d1
+	adda.w %d1,%a1
+
+	and.w #15,%d0
+	move.w %d0,%d6
+	eor.w #31,%d6
+	addq.w #1,%d6
+
+	moveq #-1,%d4
+	lsl.l %d6,%d4
+	moveq #-1,%d3
+	lsr.l %d0,%d3
+
+	tst.w %d5
+	bge.s .L__cs32_nonegX
+	swap %d3
+	clr.w %d3
+	swap %d3
+	cmp.w #-16,%d5
+	bge.s .L__cs32_nonegX
+	moveq #0,%d3
+	cmp.w #-32,%d5
+	bgt.s .L__cs32_nonegX
+.L__cs32_rts:
+	movem.l (%a7)+,%d3-%d7
+	rts
+
+.L__cs32_nonegX:
+	cmp.w #240-32,%d5
+	ble.s .L__cs32_nooverX
+	moveq #0,%d4
+	cmp.w #240-16,%d5
+	blt.s .L__cs32_nooverX
+	clr.w %d3
+	cmp.w #240,%d5
+	bge.s .L__cs32_rts
+
+.L__cs32_nooverX:
+	move.l %d3,%d6
+	move.l %d4,%d7
+	not.l %d6
+	not.l %d7
+	move.l %d6,.L__cs32_leftmaskdropoff+2
+	move.w 4+5*4(%a7),%d5
+	subq.w #2,%d5
+	bne.s .L__cs32_notand
+	move.l %d6,%d3
+	move.l %d7,%d4
+.L__cs32_notand:
+	lea -26(%a1),%a1
+.L__cs32_loop:
+	subq.w #1,%d2
+	blt.s .L__cs32_rts
+	lea 26(%a1),%a1
+	move.l (%a0)+,%d1
+	ror.l %d0,%d1
+	move.l %d1,%d6
+	tst.w %d5
+	beq.s .L__cs32_Am
+	and.l %d3,%d1 |left side
+	and.l %d4,%d6 |right side
+	cmpi.w #-1,%d5
+	beq.s .L__cs32_Om
+	bgt.s .L__cs32_Rm
+	|XOR
+	eor.l %d1,(%a1)+
+	eor.l %d6,(%a1)
+	bra.s .L__cs32_loop
+.L__cs32_Rm:	|RPLC
+  .L__cs32_leftmaskdropoff:
+	and.l #0xDEED,(%a1)
+	or.l %d1,(%a1)+
+	and.l %d7,(%a1)
+	or.l %d6,(%a1)
+	bra.s .L__cs32_loop
+.L__cs32_Om:	|OR
+	or.l %d1,(%a1)+
+	or.l %d6,(%a1)
+	bra.s .L__cs32_loop
+.L__cs32_Am:	|AND
+	or.l %d3,%d1 |left side
+	or.l %d4,%d6 |right side
+	and.l %d1,(%a1)+
+	and.l %d6,(%a1)
+	bra.s .L__cs32_loop
+*/

+ 85 - 0
tigcc/archive/clipsprite8.s

@@ -0,0 +1,85 @@
+
+.globl ClipSprite8
+.text
+.even
+ClipSprite8:
+	movem.l %d3-%d5,-(%a7)
+
+	tst.w %d1
+	bge.s .L__cs8_1
+	add.w %d1,%d2
+
+	suba.w %d1,%a0
+	moveq #0,%d1
+.L__cs8_1:
+	move.w %d1,%d5
+	add.w %d2,%d1
+	sub.w #128,%d1
+	ble.s .L__cs8_2
+	sub.w %d1,%d2
+.L__cs8_2:
+	mulu.w #30,%d5
+	adda.w %d5,%a1
+	move.w %d0,%d1
+	not.w %d0
+	and.w #15,%d0
+	moveq #-1,%d4
+	add.w #9,%d0
+	asr.w #4,%d1
+	add.w %d1,%d1
+	bge.s .L__cs8_3
+	cmp.w #-2,%d1
+	blt.s .L__cs8_rts
+	clr.w %d4
+	swap %d4
+.L__cs8_3:
+	cmp.w #28,%d1
+	blt.s .L__cs8_5
+	beq.s .L__cs8_4
+.L__cs8_rts:
+	movem.l (%a7)+,%d3-%d5
+	rts
+.L__cs8_4:
+	clr.w %d4
+.L__cs8_5:
+	adda.w %d1,%a1
+
+	subq.w #1,%d3
+	moveq #0,%d5
+	not.b %d5
+	lsl.l %d0,%d5
+	and.l %d4,%d5
+	not.l %d5 |ANDing flag used in RPLC mode
+	bra.s .L__cs8_loopentry | 2
+
+.L__cs8_AND:
+	not.b %d1
+	lsl.l %d0,%d1
+	and.l %d4,%d1
+	not.l %d1
+	and.l %d1,(%a1)
+
+.L__cs8_loop:
+	lea 30(%a1),%a1 | 4
+
+.L__cs8_loopentry:
+	subq.w #1,%d2
+	blt.s .L__cs8_rts
+
+	moveq #0,%d1
+	move.b (%a0)+,%d1
+	cmp.w #1,%d3
+	beq.s .L__cs8_AND
+	lsl.l %d0,%d1
+	and.l %d4,%d1
+	tst.w %d3
+	blt.s .L__cs8_XOR
+	beq.s .L__cs8_OR
+|RPLC
+	and.l %d5,(%a1)
+.L__cs8_OR:
+	or.l %d1,(%a1)
+	bra.s .L__cs8_loop
+.L__cs8_XOR:
+	eor.l %d1,(%a1)
+	bra.s .L__cs8_loop

+ 4 - 1
tigcc/archive/tigcc.tpr

@@ -435,7 +435,10 @@ GNU Assembler File 216 Folder=startup
 GNU Assembler File 217=sprite8.s
 GNU Assembler File 218=sprite16.s
 GNU Assembler File 219=sprite32.s
-GNU Assembler File 220=ptrtohandle.s
+GNU Assembler File 220=clipsprite8.s
+GNU Assembler File 221=clipsprite16.s
+GNU Assembler File 222=clipsprite32.s
+GNU Assembler File 223=ptrtohandle.s
 Text File 1=License.txt
 Text File 2=startup\Startup.txt
 Text File 2 Folder=startup

+ 28 - 0
tigcc/doc/System/Include/sprites.h/ClipSprite16.hsf

@@ -0,0 +1,28 @@
+[Main]
+Name=ClipSprite16
+Type=Function
+Subtype=tigcc.a
+Header Files=sprites.h
+Definition=void ClipSprite16 (short x, short y, short height, const unsigned short *sprite, void *vm_addr, short mode);
+Real Definition=extern void ClipSprite16(short asm("d0"),short asm("d1"),short asm("d2"),__cpushort asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
+See Also=sprites.h/Sprite16
+
+[Library Call]
+Asm=1
+
+[Registers]
+x=d0
+y=d1
+height=d2
+sprite=a0
+vm_addr=a1
+mode=d3
+
+[Description]
+Safely draws a sprite with a width of 16 pixels or less on the screen.
+
+[Explanation]
+ClipSprite16 works exactly like <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>, but it doesn't draw out of the boundaries of a 240x128 screen,
+unlike Sprite16 if given <CODE>x &lt; 0</CODE>, <CODE>y &lt; 0</CODE>, <CODE>x &gt; 224</CODE> or <CODE>y &gt; 128 - height</CODE>.
+<BR><BR>
+See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites.

+ 28 - 0
tigcc/doc/System/Include/sprites.h/ClipSprite32.hsf

@@ -0,0 +1,28 @@
+[Main]
+Name=ClipSprite32
+Type=Function
+Subtype=tigcc.a
+Header Files=sprites.h
+Definition=void ClipSprite32 (short x, short y, short height, const unsigned long *sprite, void *vm_addr, short mode);
+Real Definition=extern void ClipSprite32(short asm("d0"),short asm("d1"),short asm("d2"),__cpulong asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
+See Also=sprites.h/Sprite32
+
+[Library Call]
+Asm=1
+
+[Registers]
+x=d0
+y=d1
+height=d2
+sprite=a0
+vm_addr=a1
+mode=d3
+
+[Description]
+Safely draws a sprite with a width of 32 pixels or less on the screen.
+
+[Explanation]
+ClipSprite32 works exactly like <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>, but it doesn't draw out of the boundaries of a 240x128 screen,
+unlike Sprite32 if given <CODE>x &lt; 0</CODE>, <CODE>y &lt; 0</CODE>, <CODE>x &gt; 208</CODE> or <CODE>y &gt; 128 - height</CODE>.
+<BR><BR>
+See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites.

+ 27 - 0
tigcc/doc/System/Include/sprites.h/ClipSprite8.hsf

@@ -0,0 +1,27 @@
+[Main]
+Name=ClipSprite8
+Type=Function
+Subtype=tigcc.a
+Header Files=sprites.h
+Definition=void ClipSprite8 (short x, short y, short height, const unsigned char *sprite, void *vm_addr, short mode);
+See Also=sprites.h/Sprite8
+
+[Library Call]
+Asm=1
+
+[Registers]
+x=d0
+y=d1
+height=d2
+sprite=a0
+vm_addr=a1
+mode=d3
+
+[Description]
+Safely draws a sprite with a width of 8 pixels or less on the screen.
+
+[Explanation]
+ClipSprite8 works exactly like <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A>, but it doesn't draw out of the boundaries of a 240x128 screen,
+unlike Sprite8 if given <CODE>x &lt; 0</CODE>, <CODE>y &lt; 0</CODE>, <CODE>x &gt; 232</CODE> or <CODE>y &gt; 128 - height</CODE>.
+<BR><BR>
+See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites.

+ 3 - 1
tigcc/doc/System/Include/sprites.h/Sprite16.hsf

@@ -5,6 +5,7 @@ Subtype=tigcc.a
 Header Files=sprites.h
 Definition=void Sprite16 (short x, short y, short height, const unsigned short *sprite, void *vm_addr, short mode);
 Real Definition=extern void Sprite16(short asm("d0"),short asm("d1"),short asm("d2"),__cpushort asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
+See Also=sprites.h/ClipSprite16
 
 [Library Call]
 Asm=1
@@ -26,4 +27,5 @@ Sprite16 works exactly like <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A>, but
 So, to define a sprite (or sprite mask), use something like
 <PRE>static const unsigned short sprite[] = {...};
 </PRE>
-See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites.
+See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites, and
+<A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A> for a version that handles out-of-screen sprites gracefully.

+ 3 - 1
tigcc/doc/System/Include/sprites.h/Sprite32.hsf

@@ -5,6 +5,7 @@ Subtype=tigcc.a
 Header Files=sprites.h
 Definition=void Sprite32 (short x, short y, short height, const unsigned long *sprite, void *vm_addr, short mode);
 Real Definition=extern void Sprite32(short asm("d0"),short asm("d1"),short asm("d2"),__cpulong asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
+See Also=sprites.h/ClipSprite32
 
 [Library Call]
 Asm=1
@@ -46,4 +47,5 @@ ExtGraph or Genlib.
 </LI>
 </UL>
 <BR><BR>
-See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites.
+See <A HREF="$$LINK(sprites.h/Sprite8)">Sprite8</A> for more info about sprites, and
+<A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A> for a version that handles out-of-screen sprites gracefully.

+ 15 - 9
tigcc/doc/System/Include/sprites.h/Sprite8.hsf

@@ -4,6 +4,7 @@ Type=Function
 Subtype=tigcc.a
 Header Files=sprites.h
 Definition=void Sprite8 (short x, short y, short height, const unsigned char *sprite, void *vm_addr, short mode);
+See Also=sprites.h/ClipSprite8
 
 [Library Call]
 Asm=1
@@ -20,10 +21,11 @@ mode=d3
 Draws a sprite with a width of 8 pixels or less on the screen.
 
 [Explanation]
-Sprite8 draws a sprite with a width of 8 pixels or less on the screen.
-Use <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A> or <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> for wider sprites.
-This routine is many times faster than TIOS routines like
-<A HREF="$$LINK(graph.h/DrawIcon)">DrawIcon</A>, <A HREF="$$LINK(graph.h/BitmapPut)">BitmapPut</A>, etc.
+Sprite8 draws a sprite with a width of 8 pixels or less on the screen. See <A HREF="$$LINK(sprites.h/ClipSprite8)">ClipSprite8</A>
+for a version that handles out-of-screen sprites gracefully, and <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>, <A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A>,
+<A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> or <A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A> for wider sprites.
+This routine is much faster than TIOS routines such as <A HREF="$$LINK(graph.h/DrawIcon)">DrawIcon</A>,
+<A HREF="$$LINK(graph.h/BitmapPut)">BitmapPut</A>, etc.
 <I>x</I> and <I>y</I> are the coordinates of the upper left corner of the sprite.
 <I>height</I> is the height of the sprite. <I>sprite</I> is a pointer to the array of
 unsigned characters which define the shape of the sprite (line by line). <I>vm_addr</I> is the pointer
@@ -83,11 +85,15 @@ Here the sprite mask is <CODE>{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}</
 be inverted before passing it to the Sprite8 function. For this purpose, the operator '~' may be
 very useful. Note that '~' is "bitwise NOT". Of course, ~0xFF is the same as 0x00, but this notation
 makes the program more clear (and it does not increase the code size, because the inverting will
-be performed at compilation time). And if you want to use <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A> or
-<A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>, the notation ~0xFF will still be valid in a short int array, or in a long int array
-if you add the <B>'L'</B> suffix (see the respective info about <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>).
-Without this notation, you must use 0x00 in Sprite8, but 0xFF00 in <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>, and
-0xFFFFFF00 in <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>. This is why a notation like ~0xFF is more universal.
+be performed at compilation time). And if you want to use <A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>,
+<A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A>, <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> or
+<A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A>, the notation ~0xFF will still be valid in a short int
+array, or in a long int array if you add the <B>'L'</B> suffix (see the respective info about
+<A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A> and <A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A>).
+Without this notation, you must use 0x00 in Sprite8, but 0xFF00 in
+<A HREF="$$LINK(sprites.h/Sprite16)">Sprite16</A>/<A HREF="$$LINK(sprites.h/ClipSprite16)">ClipSprite16</A>, and
+0xFFFFFF00 in <A HREF="$$LINK(sprites.h/Sprite32)">Sprite32</A>/<A HREF="$$LINK(sprites.h/ClipSprite32)">ClipSprite32</A>.
+This is why a notation like ~0xFF is more universal.
 <BR><BR>
 Starting from TIGCC v0.91, you can use binary numbers to define your sprites. On the one hand,
 it makes the program incompatible with other C dialects as well as previous (ancient) versions of

+ 3 - 0
tigcc/include/C/sprites.h

@@ -5,6 +5,9 @@
 
 /* Begin Auto-Generated Part */
 enum SprtModes{SPRT_XOR,SPRT_OR,SPRT_AND,SPRT_RPLC};
+extern void ClipSprite8(short asm("d0"),short asm("d1"),short asm("d2"),const unsigned char* asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
+extern void ClipSprite16(short asm("d0"),short asm("d1"),short asm("d2"),__cpushort asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
+extern void ClipSprite32(short asm("d0"),short asm("d1"),short asm("d2"),__cpulong asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
 extern void Sprite8(short asm("d0"),short asm("d1"),short asm("d2"),const unsigned char* asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
 extern void Sprite16(short asm("d0"),short asm("d1"),short asm("d2"),__cpushort asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;
 extern void Sprite32(short asm("d0"),short asm("d1"),short asm("d2"),__cpulong asm("a0"),void* asm("a1"),short asm("d3"))__ATTR_LIB_ASM__;