A82: Should this work
[Prev][Next][Index][Thread]
A82: Should this work
In a game that I am writing I need to find when a bullet hits an enemy
this is the routine that I wrote, but it didn't work. This routine
was supposed to check to see if the bullet is in an 8x8 sprite:
testkill:
ld bc,(bulletpos) ;the bullets position
ld de,(enemypos) ;the positition of the Sprite
ld a,d
cp b
ret nc
ld a,e
cp c
ret nc
ld a,d
add a,8
cp b
ret c
ld a,e
add a,8
cp c
ret c
call KillBullet
call KillEnemy
ld a,0
ret
Is something wrong with this
Andrew
==
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Andrew Weiland
greatyogi@yahoo.com
aweiland@juno.com
http://yogisplace.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com