Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

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

Description

       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",
                                              "MUSIC");
          /* Play it and wait a moment for it. */
          play_midi(music_object->dat);
          ...
          /* Destroy unneeded music. */
          unload_datafile_object(music_object);

Name

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

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(3alleg4),          load_datafile(3alleg4),          set_color_conversion(3alleg4),
       find_datafile_object(3alleg4), register_datafile_object(3alleg4)

Allegro                                           version 4.4.3                    load_datafile_object(3alleg4)

Synopsis

#include<allegro.h>DATAFILE*load_datafile_object(constchar*filename,constchar*objectname);

See Also