' ****************************************
' MY SILLY SPRITE ROUTINE
'
' NO COLLISION DETECTION. VERY EASY TO ADD
'
' ****************************************
' BY PAUL MACKAY / i LIKE THE TEXT MODE BETTER FOR SPEED, BUT THIS LOOKS BETTER
REM 8XSPRITES
(SPRITE N0#
,DATA,DATA,X
,Y
,COLOUR N#
,ANIMATION NO#
) :
REM PRIORITY
IS (1 LOW
, 8 HIGH
) = (1,2,3,4 BEHIND TEXT
AND 5,6,7,8 IN FONT OF TEXT
) ANIMATION
= ANY AMOUNT
) BUT
ONLY 8 DISPLAYED AT A TIME:
DIM X
(8),Y
(8),X1
(I
),Y1
(I
) SWIDTH = 64 * 8: SHEIGHT = 16 * 16
SPRITEMEM%(I, J, K) = L
REM SET COLOURS
FOR SPRITES
AND CHARACTER NUMBERS
SPRITE X(1), Y(1), 21, 1, 0
SPRITE X(2), Y(2), 32, 2, 0
SPRITE X(3), Y(3), 43, 3, 0
SPRITE X(4), Y(4), 54, 4, 0
SPRITE X(5), Y(5), 65, 5, 0
SPRITE X(6), Y(6), 76, 6, 0
SPRITE X(7), Y(7), 87, 7, 0
SPRITE X(8), Y(8), 98, 8, 0
X(I) = X(I) + X1(I)
Y(I) = Y(I) + Y1(I)
B = SPRITEPO%(I, 3)
SPRITE X(I), Y(I), B, I, 1
SUB SPRITE
(XCOL%
, YCOL%
, COL%
, SPRITENO%
, SPRITEONOFF%
) CLS: SPRITEPO%
(SPRITENO%
, 1) = XCOL%: SPRITEPO%
(SPRITENO%
, 2) = YCOL%: SPRITEPO%
(SPRITENO%
, 3) = COL%: SPRITEPO%
(SPRITENO%
, 4) = SPRITEONOFF%
REM SPRITES
1 TO 4 BEHIND TEXT.
4 HAVING HIGHEST PRIORITY
CURRENT% = SPRITEPO%(IPX, 3)
XCOL% = SPRITEPO%(IPX, 1)
YCOL% = SPRITEPO%(IPX, 2)
L = SPRITEMEM%(IPX, J, K)
'PSET (K + YCOL% - 1, J + XCOL% - 1), 0
IF SPRITEPO%
(IPX
, 4) = 1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