gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > 2 Backgrounds in Tile Mode 0

#163143 - gusano - Tue Sep 23, 2008 8:50 pm

Hi,

could someone please point me in the right direction as how to use and render two tiled 256 color backgrounds on the main screen in Mode 0? Does anyone have some code for this? Also, how can I make sure the top background tiles use transparency correctly with the bottom background? (chroma keying)


Last edited by gusano on Wed Sep 24, 2008 11:54 pm; edited 1 time in total

#163147 - tepples - Tue Sep 23, 2008 11:10 pm

The transparent color should be index 0.

Do the 256-color backgrounds use the same palette? It's easier if they do, but it's possible (using an extra VRAM bank, not available on GBA) if they don't.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#163154 - gusano - Wed Sep 24, 2008 1:22 am

Yeah, both use the same palette... they also use the same tiles... I want to use two backgrounds to render an isometric map.. I'm loading my tileset from a PNG file... so as far as I'm concerned, when converting with GRIT, it should contain the transparent color in index 0 of its palette.h, right?