[A83] Re: Tile Checking


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

[A83] Re: Tile Checking




Assuming X and Y are pixels:  (hopefully this works)

ld a,(ypos)
and $F8
rra
ld c,a
add a,a
add a,c
ld c,a
ld b,0
ld a,(xpos)
rra
rra
rra
and $0F
add a,c
ld c,a
ld hl,map
add hl,bc
ld a,(hl)
;a = what's at xpos,ypos, hl= address of xpos,ypos

>From: Sk8a4good@aol.com
>Reply-To: assembly-83@lists.ticalc.org
>To: assembly-83@lists.ticalc.org
>Subject: [A83] Tile Checking
>Date: Fri, 13 Apr 2001 20:29:34 EDT
>
>
>I am using TCPAs TileMapping Routine, and I have a 8x8 sprite that is moved
>across the screen with the arrow keys.  If I want to check to see what tile
>the sprite is on, how would I do that?
>
>-Cole South
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com