1set_allegro_resource_path(3) Allegro manual set_allegro_resource_path(3)
2
3
4
6 set_allegro_resource_path - Sets a specific resource search path. Alle‐
7 gro game programming library.
8
10 #include <allegro.h>
11
12
13 int set_allegro_resource_path(int priority, const char *path);
14
16 Sometimes Allegro doesn't look in enough places to find a resource. For
17 those special cases, you can call this function before loading your
18 resource with additional paths to search for. You set up the priori‐
19 ties, higher numbers are searched for first. To modify an already setup
20 path, call this function with the same priority and the new path. To
21 remove an already setup path, call this function with the priority of
22 the path and NULL as the path parameter. Example:
23
24 set_allegro_resource_path(10, "my_game/configs");
25 set_allegro_resource_path(0, "users/configs/");
26 set_allegro_resource_path(-45, "temp");
27
28 These custom paths will be valid until you call allegro_exit(). You can
29 call this function before install_allegro(), but after set_uformat() if
30 you want to use a text encoding format other than the default.
31
33 Returns non-zero on success, zero if the path could not be added or you
34 wanted to remove a path and the priority used didn't have any associ‐
35 ated path. Modification of existing paths always succeeds.
36
37
39 find_allegro_resource(3)
40
41
42
43Allegro version 4.4.3 set_allegro_resource_path(3)