loading pictures and sprites by FAT

Post Reply
lazyprogramer
Posts: 85
Joined: Mon Sep 27, 2010 5:26 pm

loading pictures and sprites by FAT

Post by lazyprogramer » Fri Nov 12, 2010 8:51 pm

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?

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: loading pictures and sprites by FAT

Post by WinterMute » Fri Nov 12, 2010 11:33 pm

http://devkitpro.org/wiki/PAlib

We don't support PALib users, at all, sorry.
Help keep devkitPro toolchains free, Donate today

Personal Blog

lazyprogramer
Posts: 85
Joined: Mon Sep 27, 2010 5:26 pm

Re: loading pictures and sprites by FAT

Post by lazyprogramer » Sat Nov 13, 2010 12:42 pm

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?

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: loading pictures and sprites by FAT

Post by zeromus » Sat Nov 13, 2010 6:15 pm

use fopen and then do whatever you do right now to open them not from fat

lazyprogramer
Posts: 85
Joined: Mon Sep 27, 2010 5:26 pm

Re: loading pictures and sprites by FAT

Post by lazyprogramer » Sun Nov 14, 2010 1:21 pm

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...?

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: loading pictures and sprites by FAT

Post by zeromus » Sun Nov 14, 2010 8:02 pm

You already know how to load them not from fat? I am skeptical.

ex-peluo
Posts: 19
Joined: Wed Apr 15, 2009 10:44 pm

Re: loading pictures and sprites by FAT

Post by ex-peluo » Sun Nov 14, 2010 10:02 pm

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?

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: loading pictures and sprites by FAT

Post by elhobbs » Mon Nov 15, 2010 3:10 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests