Page 1 of 1

loading pictures and sprites by FAT

Posted: Fri Nov 12, 2010 8:51 pm
by lazyprogramer
Hi

I'm using PAlib (but also libnds).
And I want you to find out how to load pictures, bgs, sprites,... BY FAT?
Please can you help?

Re: loading pictures and sprites by FAT

Posted: Fri Nov 12, 2010 11:33 pm
by WinterMute
http://devkitpro.org/wiki/PAlib

We don't support PALib users, at all, sorry.

Re: loading pictures and sprites by FAT

Posted: Sat Nov 13, 2010 12:42 pm
by lazyprogramer
Why not?

Tehn I don't will nit use for palib, okay?
But please can you say me how to open such files:
.png, .gif,...
BY FAT?

Re: loading pictures and sprites by FAT

Posted: Sat Nov 13, 2010 6:15 pm
by zeromus
use fopen and then do whatever you do right now to open them not from fat

Re: loading pictures and sprites by FAT

Posted: Sun Nov 14, 2010 1:21 pm
by lazyprogramer
use fopen and then do whatever you do right now to open them not from fat
That's what I know allready, but isn't there something like a buffer for those formats?
I mean I can normaly only print a text wich is from a file...?

Re: loading pictures and sprites by FAT

Posted: Sun Nov 14, 2010 8:02 pm
by zeromus
You already know how to load them not from fat? I am skeptical.

Re: loading pictures and sprites by FAT

Posted: Sun Nov 14, 2010 10:02 pm
by ex-peluo
First you must have the .bmp file specification. The header, the palette and the pixels that point to the palette. After that, you must know if you are going to use tiled bg or bmp bg and if .bmp is 4 or 8 bpp. If bg is tiled, you must divide image into blocks of 8x8 pixels (tiles), each tile is pointed by a the map. After thin in load files from FAT, the question is, do you understand how to show graphics in NDS with libnds?

Re: loading pictures and sprites by FAT

Posted: Mon Nov 15, 2010 3:10 am
by elhobbs
Lazyprogrammer - I may be off base, but I would advise you against learning to program in c/c++ on the ds. Windows and Linux have more robust tools for development and debugging. The lack of a visual debugger makes it hard to learn to program on the ds. I think you may want to start out with an easier platform then come back to the ds when you have a little more experience. Regardless, best of luck.