gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Sprites...File Systems and Media

#117719 - Key_46 - Tue Feb 06, 2007 10:07 pm

Hi, i am trying to make a much-more-noob version of DSOrganize but some codes that i am trying to use are not working! ...i am using devKit and a R4DS(MicroSD) in a DSLite.

1.: gba_nds_fat working with dldi...in DLDI page there is a setup "tutorial", but i can't put it to work! Or a fatlib with directory and files management...

2.: drawing multiple Sprites...i want to draw sprites with diferent images (BMP), i am using the devKit's Sprite_Bitmap example but again nothing...:p

3.: does anyone know some good libs for image process?

Thanks

Key_46

#117732 - Lick - Wed Feb 07, 2007 12:27 am

Describing your problems as "not working", won't help us help you! In order to find solutions we will need more detailed information about the errors.

gba_nds_fat: if you look at the source of disc_io.c, you will find a function that attempts to discover the current device that is plugged in. You will need to prepend the piece of DLDI code before the first attempt, so that your program will look for the DLDI-specified device before all others. If you want to, you can even remove all the other drivers and only leave the DLDI driver in to make your binaries smaller. Actually, that's the only reason to use gba_nds_fat, because right now, libfat is the better solution as it has DLDI support built-in and it can also handle directory queries! Just update your DevKitARM installation to r20. Seriously, use libfat.

16-bit sprites: I am guessing that you say "nothing" as in "they don't appear on screen". The thing is, with 16-bit aka bitmap sprites (or backgrounds), you have to set the alpha-bit as well. Simply set bit15 of all your values to 1 when you copy to VRAM.

Imageformat library: I'm looking for one as well. :)
_________________
http://licklick.wordpress.com

#117770 - DragonMinded - Wed Feb 07, 2007 8:07 am

Lick: For an image library, have you fiddled with my own image loading library? It's not the best code for loading, but I don't know if you know about it...
_________________
Enter the mind of the dragon.

http://dragonminded.blogspot.com

Seriously guys, how hard is it to simply TRY something yourself?

#117818 - Key_46 - Wed Feb 07, 2007 9:35 pm

what directory queries, because any in my R20 version is related with directory listing...this can be a windows function, so please tell me :)

the problem with my sprites is that the data that i put in SPRITE_GFX (BMP), i put data like this>

for(int i = 0; i < 32*32; i++)
{
SPRITE_GFX[i] = RGB15(31,0,0);
}

for(int i = 0; i < 32*32; i++)
{
SPRITE_GFX[ (32*32) + i ] = RGB15(0,0,31);
}

i don't know to access this data... in SpriteEntry