background map, how do i get a specific tilenumber

Post Reply
Tomdev
Posts: 82
Joined: Thu Jan 08, 2009 9:15 pm

background map, how do i get a specific tilenumber

Post by Tomdev » Sun Feb 08, 2009 6:38 pm

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?

dovoto
Developer
Posts: 43
Joined: Fri Aug 12, 2005 10:01 pm
Contact:

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

Post by dovoto » Sun Feb 08, 2009 6:58 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests