![]() |
|
Datafile Questions |
Jeff Bernard
Member #6,698
December 2005
![]() |
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
Member #4,800
July 2004
![]() |
1. Yes. -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
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
Member #6,698
December 2005
![]() |
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
Member #476
June 2000
![]() |
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
Member #6,698
December 2005
![]() |
Quote: Why bother? Because I read your answer wrong.:P Thanks a lot guys, this is all I need. -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
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
Member #6,698
December 2005
![]() |
Yes, that's exactly what I meant. -- |
|