Hello, I'm new here and to DS programming in general, but I'm curious about the possibility of having it so the top screen will display two backgrounds at once, with one atop the other. I know it's possible because I've seen example code on the matter, but whenever I made an attempt at this I seemed to fail. The closest I got was getting it so the top layer (which had transparency written into GRIT) would blend with the first color it saw from the bottom layer (which was a gradient) and I figure that's a start but I'm pretty positive I'm missing something very important here. Here's what I wrote in terms of the two layers:
Code: Select all
videoSetMode(MODE_5_2D);
videoSetModeSub(MODE_5_2D);
vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
vramSetBankC(VRAM_C_SUB_BG_0x06200000);
int bg3 = bgInit(3,BgType_Bmp8,BgSize_B8_256x256,2,0); //background background
bgSetPriority(bg3,3);
bgUpdate();
dmaCopy(topwallBitmap,bgGetGfxPtr(bg3),topwallBitmapLen);
dmaCopy(topwallPal,BG_PALETTE,topwallPalLen);
int bg2 = bgInit(3,BgType_Bmp16,BgSize_B16_256x256,2,0); //foreground background
dmaCopy(goldBitmap,bgGetGfxPtr(bg2),goldBitmapLen);
Excuse me if my code seems very amateur, in my defense I am one. XD
Thank you for your help!