A86: Find_Pixel Help And More! Please Help!


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

A86: Find_Pixel Help And More! Please Help!




Okay. I know you guys have helped me alot already but theres a few more 
questions I need answered. First I need to know how to pixel test 
8 rows down from the place where my sprite is. If it's on I need the 
program to go back to the main loop. If it's not then you need to go 
down 8 rows. Can Someone give me an example of how to use  the FindPixel 
below to do that? Thanks Alot.

InFuZeD at Zone TI - "Making Basic Programming Worth While"

P.S. does Find_Pixel read the GRAPH_MEM or the LCD?
If the graph mem then I need major help!

;------------------------------------------------------
;   FIND_PIXEL by CLEM
;
;   121 cycles  27 bytes    Destroyes : none
;------------------------------------------------------

Find_Pixel:
    ld h,63
    ld a,c
    add a,a
    add a,a
    ld l,a
    ld a,b
    rra
    add hl,hl
    rra
    add hl,hl
    rra
    or l
    ld l,a
    ld a,b
    and 7
    cpl
    rlca
    rlca
    rlca
    ld (FP_Bit+1),a
    xor a
FP_Bit:
    set 0,a
    ret


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com