Page 1 of 1

background map, how do i get a specific tilenumber

Posted: Sun Feb 08, 2009 6:38 pm
by Tomdev
hey everyone,
i want to get a tilenumber out of a bgmap, i mean something like this:

Code: Select all

int y = bgmap[1]
does someone know how to do this?

Re: background map, how do i get a specific tilenumber

Posted: Sun Feb 08, 2009 6:58 pm
by dovoto

Code: Select all

int bg = bgInit( ... ); 

u16 *map = bgGetMapPtr(bg);

int tile = map[x + y * bg_width_in_tiles];
background api documentation:
http://libnds.devkitpro.orga00101.html# ... 370e59b99c