Re: A86: Enhanced Checking Routine?


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

Re: A86: Enhanced Checking Routine?




A. El-Helw wrote:
> 
> Hello,
>         I used a checking routine in Duckhunt to check if I hit the duck using the
> ops, loading one digit into A, into Op1, then another into Op2, and
> checking them... I'd repeat this process 6 times ... so if you are 3 pixels
> off 1 way or another it would give you the shot... is there an easier, less
> mem consuming way w/o ops?
> 
>                         Hit---X---Hit
> X = Duck
> - = Gun Pos for hit
> 
> P.S - this will probably be used on another game, but knowing would be
> helpful.
> 
>                                                 Thanks.
>                                                 Ahmed

load the x coords of the duck into a and compare it to the x coord of
the gun(x2), then compare it to a and if a<=x2 keep going, then check to
see that a+8>=x2, if that is good go to y and do the same thing


Follow-Ups: References: