Your company here — click to reach over 10,000 unique daily visitors

load_datafile_object - Man Page

Loads a specific object from a datafile. Allegro game programming library.


#include <allegro.h>

DATAFILE *load_datafile_object(const char *filename, const char *objectname);


Loads a specific object from a datafile. This won't work if you strip the  object names from the file, and it will be very slow if you save the file  with global compression. Example:

   /* Load only the music from the datafile. */
   music_object = load_datafile_object("datafile.dat",
   /* Play it and wait a moment for it. */
   /* Destroy unneeded music. */

Return Value

Returns a pointer to a single DATAFILE element whose `dat' member points to the object, or NULL if there was an error or there was no object with the requested name. Remember to free this DATAFILE later to avoid memory leaks, but use the correct unloading function!

See Also

unload_datafile_object(3), load_datafile(3), set_color_conversion(3), find_datafile_object(3), register_datafile_object(3)

Referenced By

destroy_font(3), find_datafile_object(3), load_datafile(3), load_datafile_callback(3), load_datafile_object_indexed(3), register_datafile_object(3), unload_datafile_object(3).

version 4.4.3 Allegro manual