1find_datafile_object(3)         Allegro manual         find_datafile_object(3)
2
3
4

NAME

6       find_datafile_object  -  Searches a datafile for an object with a name.
7       Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       DATAFILE *find_datafile_object(const DATAFILE *dat, const char *object‐
14       name);
15

DESCRIPTION

17       Searches  an  already  loaded datafile for an object with the specified
18       name. In the name you  can  use  `/'  and  `#'  separators  for  nested
19       datafile paths. Example:
20
21          char level_name[10];
22          DATAFILE *dat, *level;
23          ...
24          uszprintf(level_name, sizeof(buffer),
25                    "LEVEL_%02d", level_number);
26          level = find_datafile_object(dat, level_name);
27          if (!level)
28             abort_on_error("That level doesn't exist!");
29

RETURN VALUE

31       Returns  a  pointer  to  a  single  DATAFILE element whose `dat' member
32       points to the object, or NULL if the object could not be found.
33
34

SEE ALSO

36       load_datafile(3), load_datafile_object(3)
37
38
39
40Allegro                          version 4.4.3         find_datafile_object(3)
Impressum