#137004 - Jeremysr - Tue Aug 07, 2007 8:24 am
Hi, after using DSLua and PAlib for a while I decided to try using just libnds. So far for my game I'm using framebuffer mode for the top screen and it works good, but now I want to use the same sort of mode for the bottom screen. From this tutorial I found out I have to use an extended background for the sub screen. So I tried it and tried filling the sub screen with white, but it just remains black. So can someone tell me what I'm doing wrong?
Code: |
#include "tiledata.h"
#include "fontdata.h" #include "tile.h" #include "font.h" #include "levels.h" #include "run.h" int main(void) { // int won; // int program[] = { 2,2,2,5 }; int i; irqInit(); irqEnable(IRQ_VBLANK); // Main screen turn on videoSetMode(MODE_FB0); vramSetBankA(VRAM_A_LCD); // Sub screen turn on videoSetModeSub(MODE_5_2D | DISPLAY_BG2_ACTIVE); vramSetBankC(VRAM_C_SUB_BG); BG2_CR = BG_BMP16_256x256; // loadLevel(0); // won = run(program); // // if (won) { // printStringCenter("You Won!"); // } else { // printStringCenter("You Lost!"); // } for (i = 0; i < 256*256; i++) VRAM_C[i] = RGB15(31, 31, 31) | BIT(15); while (1) { swiWaitForVBlank(); } } |