Datafile Questions
Jeff Bernard

1. Is it possible to store bitmaps into a datafile that have different pallettes? It'd be cool if I could store all my images in one file, but my variety has caused me to use different pallettes for them.

2. Is is possible to load a datafile object as a FILE*, or should I just go ahead and define a custom type?

Michael Faerber

1. Yes.
2. Not entirely sure, but probably yes too.

Thomas Fjellstrom
Quote:

2. Is is possible to load a datafile object as a FILE*, or should I just go ahead and define a custom type?

Yes, but you'd have to parse the data file yourself to get anything out of it.

Jeff Bernard

Ha, maybe I should've elaborated a bit on the questions, but thanks for answering them. Ok, so let's go into a little more detail:

1. Maybe I'm just doing something wrong, but I try loading a bitmap into a datafile using grabber.exe. I do 'Read Bitmap' and then grab it. I create another bitmap in the datafile, 'Read Bitmap' and grab it. However, it changes what the first bitmap looked like (the colors and such). Did the first one actually not change, or what's going on with that?

2. Ok, I'm satisfied with this. I'll just write my custom routine then.

Thomas Fjellstrom

You need to import the images as a PALETTE entry as well as a BITMAP, bitmaps arnt stored with their palette's in a datafile.

Quote:

2. Ok, I'm satisfied with this. I'll just write my custom routine then.

Why bother?

Jeff Bernard
Quote:

Why bother?

Because I read your answer wrong.:P

Thanks a lot guys, this is all I need.

Thomas Fjellstrom

I'm sorry, what did you mean by "datafile object"? the entire datafile? or just a single item in the datafile? Because the latter is possible, pack_fopen("datafile.dat#objectname", "r");

Jeff Bernard

Yes, that's exactly what I meant.

Thread #587293. Printed from Allegro.cc