4
我對libdns完全陌生。我嘗試更改示例Graphics \ Backgrounds \ 256_color_bmp 以在子屏幕上顯示背景。在nds的子屏幕上繪製圖像
這是我的代碼。你有什麼想法缺少在子屏幕上顯示hey_typBitmap?我已經設法在頂部屏幕上顯示新圖像。
#include <nds.h>
#include <stdio.h>
#include "drunkenlogo.h"
#include "hey_typ.h"
int main(void)
{
videoSetMode(MODE_5_2D);
vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
videoSetModeSub(MODE_5_2D);
vramSetBankC(VRAM_C_SUB_BG_0x06200000);
int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0,0);
dmaCopy(hey_typBitmap, bgGetGfxPtr(bg3), 256*256);
dmaCopy(hey_typPal, BG_PALETTE, 256*2);
int bg2 = bgInit(2, BgType_Bmp8, BgSize_B8_256x256, 0,0);
dmaCopy(drunkenlogoBitmap, bgGetGfxPtr(bg2), 256*256);
dmaCopy(drunkenlogoPal, BG_PALETTE, 256*2);
while(1)swiWaitForVBlank();
return 0;
}