Re: A86: Re: collisions


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

Re: A86: Re: collisions




could some one let me know whats going on in this procedure?  i dont 
understand any of it :(  where do I stick this in my code?  after it draws 
the sprites?  how does it know what sprites it is looking at for the 
collision?

thanks,
-=-=1414=-=-



> ; bc = (x1,y1), de = (x2,y2)
>  ; returns: no carry = collision
>  CheckCollision:
>   ld a,d
>   add a,7
>   cp b
>   ret c
>   ld a,b
>   add a,7
>   cp d
>   ret c
>   ld a,e
>   add a,7
>   cp c
>   ret c
>   ld a,c
>   add a,7
>   cp e
>   ret


Follow-Ups: