|
Post by MPN on Apr 8, 2007 19:59:27 GMT -5
Is there a function that tells me what tile is underneath the current sprite? If not, do you have an example that could help me?
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Apr 26, 2007 22:30:29 GMT -5
i don't remember if there is actually a function for that (though i think there is one in my unreleased version), but anyways - you'll probably have to end up making some low levels routines that will deal with the vdp memory to read tiles tile data is stored in vdp memory locations: Scroll B = $E000 - $FFFF [8192 Bytes] Scroll A = $C000 - $DFFF [8192 Bytes] so, to read tile data, use (for plane b): my_tile = VdpRamRead(&hE000 + (x<<6+y)<<1) [AND] &h07FF
oooor, if that doesn't work, then try (for plane a): my_tile = VdpRamRead(&hC000 + (x<<6+y)<<1) [AND] &h07FF
this is all asuming that you don't scroll the planes around using the vdp scrolling features . i haven't tested thes routines hehe, so i wish you luck!
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Apr 26, 2007 22:31:59 GMT -5
wait, i'm stupid, there is a routine that does everything for you my_tile = ReadTile(x,y)
i dunno if it works though too, and i think it might only be for v0.21 (or whatever the version is for the latest release)
|
|