Re: A86: Enhanced Checking Routine?


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

Re: A86: Enhanced Checking Routine?





Ok, I understand 99% of this. .. my only question is... is pixel y and
pixel x = the other x/y coordinate of the othersprite [gun for example] ?
					-Ahmed

At 05:29 PM 12/20/97 +0000, you wrote:
>
>heres a quick runthrough of it:
>
> Collision routine(C) Trey Jazz 1997
> ld a,<leftmost pixel of sprite one>
> sub 1 ;use this so the carry will work right
> ld b,<x coord of pixel>
> cp b
> jr nc,no_hit
> add a,7      ;load the rightmost pixel
> sub b        ;subtract the location of the second sprite from it
> jr c,no_hit  ;outside of the sprite to the right so go to no_hit
> ld a,<sprite one y coord>
> sub 1
> ld b,<pixel y coord>
> cp b
> jr nc,no_hit
> add a,7
> sub b
> jr c,no_hit
>good_hit:
>
>
>note: use the middle of the X for the second sprite location
>
>well there ya go
>


Follow-Ups: References: