Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

find_allegro_resource(3alleg4) [debian man page]

find_allegro_resource(3alleg4)					  Allegro manual				    find_allegro_resource(3alleg4)

NAME
find_allegro_resource - Searches for a support file in many places. Allegro game programming library. SYNOPSIS
#include <allegro.h> int find_allegro_resource(char *dest, const char *resource, const char *ext, const char *datafile, const char *objectname, const char *envvar, const char *subdir, int size); DESCRIPTION
Searches for a support file, eg. `allegro.cfg' or `language.dat'. Passed a resource string describing what you are looking for, along with extra optional information such as the default extension, what datafile to look inside, what the datafile object name is likely to be, any special environment variable to check, and any subdirectory that you would like to check as well as the default location, this function looks in a hell of a lot of different places :-). Pass NULL for the parameters you are not using. Check the documentation chapter specific to your platform for information on additional paths this function might search for. Also, don't forget about set_allegro_resource_path() to extend the searches. Example: char path[256]; int ret; ret = find_allegro_resource(path, "scores.cfg", NULL, NULL, NULL, NULL, NULL, sizeof(path)); if (ret == 0) { /* Found system wide scores file. */ } else { /* No previous scores, create our own file. */ } RETURN VALUE
Returns zero on success, and stores a full path to the file (at most size bytes) into the dest buffer. SEE ALSO
set_allegro_resource_path(3alleg4) Allegro version 4.4.2 find_allegro_resource(3alleg4)

Check Out this Related Man Page

load_datafile_object(3alleg4)					  Allegro manual				     load_datafile_object(3alleg4)

NAME
load_datafile_object - Loads a specific object from a datafile. Allegro game programming library. SYNOPSIS
#include <allegro.h> DATAFILE *load_datafile_object(const char *filename, const char *objectname); 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); 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), regis- ter_datafile_object(3alleg4) Allegro version 4.4.2 load_datafile_object(3alleg4)
Man Page