[A83] Re: moving sprites


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

[A83] Re: moving sprites




Instead of flooding your source code with many 'inc a's, it's faster and
much smaller to do 'add a,6' for example...

Michael Vincent
Detached Solutions - www.detacheds.com
Radical Software - www.radicalsoft.org
www.michaelv.org
----- Original Message -----
From: <VertGuy@aol.com>
To: <assembly-83@lists.ticalc.org>
Sent: Saturday, March 16, 2002 11:20 AM
Subject: [A83] Re: moving sprites


>
> Well, I wouldn't want to give the whole thing out since it crashes at the
> moment...
> I like to make my programs one part at a time
>
> Here's the loop for shooting...
>
> SHOOT:
>     ld a,(spritex)
>     inc a
>     inc a
>     inc a
>     inc a
>     inc a
>     inc a
>     ld c,a
>     ld a,(spritey)
>     inc a
>     inc a
>     inc a
>     inc a
>     inc a
>     inc a
>     inc a
>     ld ix,STONE
>     ld b,4
>     bcall(_clrLCDfull)
>     call ionPutSprite
>     call ionFastCopy
>     ld h,l
>     ld c,a
>     jp LOOP2
> LOOP2:
>     bcall(_clrLCDfull)
>     ld a,(spritey)
>     ld l,a
>     ld a,(spritex)
>     ld b,10
>     ld ix,SHOT
>     call ionPutSprite
>     call ionFastCopy
>     ld l,h
>     ld h,l
>     ld a,c
>     cp 85
>     jp z,LOOP
>     inc a
>     ld c,a
>     ld b,4
>     ld ix,STONE
>     call ionPutSprite
>     call ionFastCopy
>     jp LOOP2
>




References: