Re: [AD] Datafile Patch

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


>Joerg Sharky-X Rueppel <sharky-x@xxxxxxxxxx> writes:
>> here's a patch for datafile.c which adds the function:
>> 
>> DATAFILE* get_datafile_object(DATAFILE* dat, char *name);
>> 
>> which returns the pointer to the first datafile object with the given name.
>> It also recurses through nested datafiles.
>
>I like the idea, but I'm not so sure about how it does the recursion: I 
>think it should either just look in the parent datafile, or if it is going 
>to recurse, it should split up the name based on # and / characters, 
>treating it as a proper file path (like how pack_fopen_datafile_object() 
>behaves), rather than just flattening out the nesting structure before 
>starting the search.
Don't we already have load_datafile_object for that?

I was working on a similar function which included caching of the names
and file-positions to speed up both load_datafile_object and
pack_fopen_special_file (low-level pack_fopen function)

At some point I had it working, but I aciidentally deleted it
during the speedhack ;-(

Will I still try to rewrite that or is Joerg going to do that?
(what about it Joerg?)

Martijn Versteegh




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