Re: [AD] Custom packfiles

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Friday 31 December 2004 06:19, Chris wrote:
> Mm.. I'm not sure, honestly. I think if we're going to do something like 
> this, it should be as integrated as possible. The PACKFILE_VTABLE is a 
> good idea, but I think it'd be better if the user could supply callbacks 
> that'd effect the normal pack_* routines.

You mean like
 PACKFILE  *pack_fopen(const  char  *filename,  const  char *mode)
{
   if (pack_fopen_callback) {
      return pack_fopen_callback(filename, mode);
   }
   ...
}
?

I'm not entirely sure about this. While I like the idea of being able to 
just do something like 

> SAMPLE *smp = load_sample((const char*)memptr);

I agree with Peter that I don't really like the idea of a new `state' in 
Allegro. Maybe I'm just not yet used to the idea though.
One advantage I think this method could have is that it wouldn't be too 
hard to read normal datafiles, and we don't need the load_bmp_pf &al 
functions.

Evert





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/