According to melonDS, the sprite size is "too large". I am on Windows, using BlocksDS and NFlib. This is a screenshot of melonDS:
And this is the code :
I am trying to load an animated GFX which is 480 by 80 of which one "frame" is 80 by 80. If anyone has any suggestions then please feel free to reply. Thank you for all the help in advance.
Is 64 by 64 the maximum size for sprites?
And this is the code :
C:
#include <stdio.h>
#include <nds.h>
#include <filesystem.h>
#include <nf_lib.h>
#include <nf_basic.h>
#include <nf_sprite256.h>
#include <nf_2d.h>
int main(int argc, char **argv)
{
consoleDemoInit();
// Initialize NitroFS and set it as the root folder of the filesystem
nitroFSInit(NULL);
NF_SetRootFolder("NITROFS");
//Sets up graphics display
NF_Set2D(0, 0);
NF_Set2D(1, 0);
NF_InitSpriteBuffers();
NF_InitSpriteSys(0, 128);
NF_InitSpriteSys(1);
//Loading graphics to RAM
NF_LoadSpriteGfx("of40turret_-1", 0, 80, 80);
NF_LoadSpriteGfx("of40turret_0", 1, 80, 80);
NF_LoadSpriteGfx("of40turret_1", 2, 80, 80);
NF_LoadSpriteGfx("of40turret_2", 3, 80, 80);
NF_LoadSpriteGfx("of40hull", 4, 80, 80);
NF_LoadSpritePal("of40turret", 0);
NF_LoadSpritePal("of40hull", 1);
//Loading graphics to VRAM
NF_VramSpriteGfx(0, 1, 0, false);
NF_VramSpriteGfx(0, 4, 1, false);
NF_VramSpritePal(0, 0, 0);
NF_VramSpritePal(0, 1, 1);
//Creating sprite
NF_CreateSprite(0, 0, 0, 0, 88, -58);
NF_CreateSprite(0, 1, 1, 1, 88, -56);
//Setting sprite
NF_SpriteFrame(0, 0, 1);
NF_SpriteFrame(0, 1, 1);
NF_SpriteLayer(0, 0, 1);
NF_SpriteLayer(0, 1, 2);
while (1)
{
NF_SpriteOamSet(0);
NF_SpriteOamSet(1);
swiWaitForVBlank();
oamUpdate(&oamMain);
oamUpdate(&oamSub);
}
return 0;
}
I am trying to load an animated GFX which is 480 by 80 of which one "frame" is 80 by 80. If anyone has any suggestions then please feel free to reply. Thank you for all the help in advance.
Post automatically merged:
Is 64 by 64 the maximum size for sprites?
Last edited by wojota_,







