#168381 - opearn - Sun Apr 26, 2009 2:03 pm
i'm trying to make a simple image viewer app,
i need to add my integer and u8 string together to use with dmacopy.
i want to use numbers as my imge names so i can easily use code like this:
heres my code so far.
thanks in advance for your help[/code]
i need to add my integer and u8 string together to use with dmacopy.
i want to use numbers as my imge names so i can easily use code like this:
Code: |
if (keysHeld()&KEY_RIGHT){
picno+=1 } |
heres my code so far.
Code: |
#include <nds.h>
#include <stdio.h> #include "0.h" #include "1.h" picno = 0; int main(void) { //init video modes videoSetMode( MODE_5_2D ); videoSetModeSub( MODE_5_2D ); vramSetMainBanks(VRAM_A_MAIN_BG_0x06000000,VRAM_B_MAIN_BG_0x06020000,VRAM_C_SUB_BG_0x06200000,VRAM_D_LCD); //init bgs int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0,0); dmaCopy(picno+(u8*)"Bitmap", bgGetGfxPtr(bg3), 256*256); dmaCopy(picno+(u8*)"Pal", BG_PALETTE, 256*2); while(1){ swiWaitForVBlank(); } return 0; } |
thanks in advance for your help[/code]