sprites help.
Posted: Fri Mar 27, 2009 4:20 pm
hi everyone
i'm trying to load a sprite using this code
what do i need to change to make it work?
note: i'm new to libnds's sprites
i'm trying to load a sprite using this code
Code: Select all
#include <nds.h>
#include "drunkenlogo.h"
int main(void) {
videoSetMode(MODE_0_2D);
vramSetBankA(VRAM_A_MAIN_SPRITE);
u16* gfx = oamAllocateGfx(&oamMain, SpriteSize_64x64, SpriteColorFormat_256Color);
dmaCopy(drunkenlogoBitmap, gfx, 32*32);
dmaCopy(drunkenlogoPal, SPRITE_PALETTE, 512);
while(1) {
oamSet(&oamMain,0,32,32,0,0,SpriteSize_64x64,SpriteColorFormat_256Color,gfx,-1,false,false,false,false,false);
swiWaitForVBlank();
oamUpdate(&oamMain);
}
return 0;
}
note: i'm new to libnds's sprites