[SOLVED] VDP_clearTileMapRect Question

SGDK only sub forum

Moderator: Stef

Post Reply
nolddor
Very interested
Posts: 102
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

[SOLVED] VDP_clearTileMapRect Question

Post by nolddor »

VDP_clearTileMapRect(APLAN, 0, 0, 1, 1);

this command clear two x two tiles.... it's wrong??
Last edited by nolddor on Tue Apr 01, 2014 6:47 am, edited 3 times in total.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef »

Right, it clears tile [0,0] to tile [1,1], do you have some problems by using it ?
nolddor
Very interested
Posts: 102
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

Post 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?
Last edited by nolddor on Mon Mar 31, 2014 9:36 pm, edited 1 time in total.
djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post 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)
djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post 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?
nolddor
Very interested
Posts: 102
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

Post by nolddor »

Forget it, I was being silly... o.o"
Post Reply