Page 1 of 1

[SOLVED] VDP_clearTileMapRect Question

Posted: Mon Mar 31, 2014 8:43 pm
by nolddor
VDP_clearTileMapRect(APLAN, 0, 0, 1, 1);

this command clear two x two tiles.... it's wrong??

Posted: Mon Mar 31, 2014 9:32 pm
by Stef
Right, it clears tile [0,0] to tile [1,1], do you have some problems by using it ?

Posted: Mon Mar 31, 2014 9:35 pm
by nolddor
if the seed is in 0,0 and clear 1 tile with and 1 tile height...

Should only clear the 0,0 tile... i think...

how do i clean the all the column zero for example?

Posted: Mon Mar 31, 2014 9:36 pm
by djcouchycouch
I imagine that because the API looks like

Code: Select all

void VDP_clearTileMapRect(u16 plan, u16 x, u16 y, u16 w, u16 h)
It leads one to believe that 0, 0, 1, 1 means draw at 0,0 with a size of 1.

Maybe it should be something like

Code: Select all

void VDP_clearTileMapRect(u16 plan, u16 x, u16 y, u16 x2, u16 y2)
or

Code: Select all

void VDP_clearTileMapRect(u16 plan, u16 left, u16 top, u16 right, u16 bottom)

Posted: Mon Mar 31, 2014 9:38 pm
by djcouchycouch
nolddor wrote:if the seed is in 0,0 and clear 1 tile with and 1 tile height...

Should only clear the 0,0 tile... i think...

how do i clean the all the column zero for example?
If you're only setting one tile, is there a function that just sets one tile?

Posted: Mon Mar 31, 2014 9:41 pm
by nolddor
Forget it, I was being silly... o.o"