Re: [AD] load_datafile_object using index |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
--- Elias Pschernig wrote:
> /* returns NULL on failure */
> DATAFILE_INDEX *generate_datafile_index(const char
> *name);
>
> /* pass the index generated above */
> load_datafile_object_indexed(const char *name,
> DATAFILE_INDEX *index, int item)
>
> /* frees the index again */
> destroy_datafile_index(index);
I vote for the current API's method of using load /
unload. No need to break consistencies..
> I.e., make this all transparent to the user.. since
> there will never be
> any need to manually read out the file offsets - so
> just hide it inside
> a DATAFILE_INDEX object. DATAFILE_INDEX would just
> be typedefed to long*
> for now, but later it could be a struct which also
> contains a hashtable
> of the NAME properties, and then we could have:
>
> load_datafile_object_named(const char *dfilename,
> DATAFILE_INDEX *index,
> char const *name)
>
> Without needing to change the API.
Thats always good :)
>
> --
> Elias Pschernig