![]() |
![]()
| ![]() |
![]()
NAMEload_datafile_callback - Loads a datafile into memory, calling a hook per object. Allegro game programming library. SYNOPSIS#include <allegro.h> DATAFILE *load_datafile_callback(const char *filename, void (*callback)(DATAFILE *d)); DESCRIPTIONLoads a datafile into memory, calling the specified hook function once for each object in the file, passing it a pointer to the object just read. You can use this to implement very simple loading screens where every time the hook is called, the screen is updated to let the user know your program is still loading from disk:
RETURN VALUEReturns a pointer to the DATAFILE or NULL on error. Remember to free this DATAFILE later to avoid memory leaks. SEE ALSOload_datafile(3), unload_datafile(3), load_datafile_object(3), set_color_conversion(3), fixup_datafile(3), packfile_password(3), find_datafile_object(3), register_datafile_object(3)
|