6 * © 1991-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Steel library.
13 * Steel is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Steel is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Steel. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
43 * void res_init(char *progname)
46 * Sets up res to use a certain path for resources. Mainly for
47 * compatibility with older applications.
50 * char *progname == the program name (sets up path as <progname$Dir>)
53 void res_init(char *progname);
56 * void res_setPrefix(char *prefix)
59 * Sets up a full prefix for resources. This means you can keep resources
60 * in separate directories.
63 * char *prefix == the prefix
66 void res_setPrefix(char *prefix);
69 * BOOL res_fileExists(char *name)
72 * Informs the caller if a given file exists
75 * char *name == the name of the file
78 * TRUE if the file really does exist
81 BOOL res_fileExists(char *name);
84 * int res_findname(const char *resname,char *buf)
87 * Returns a full pathname for the resource file as given in the buffer.
88 * This is for compatibility reasons. If I was writing this fresh, I
89 * would return a pointer to an internal static object, but Acorn know
92 * Some new functionality has been added. It will look for files first in
93 * the directory set up using res_init or res_setPrefix, and then in the
94 * 'Resources' subdirectory. If neither is present, then the name returned
95 * is in the main application directory.
97 * Also, under RISC OS 3, it will search for files with mode prefixes, so
98 * you can use multiple sprite files for different resolutions. Isn't this
102 * const char *resname == the leafname of the resource file.
103 * char *buf == where to put the result.
106 * TRUE for compatibility with the Acorn version. What good it does, I
107 * don't know. This is in all a very odd routine indeed.
110 int res_findname(const char *resname,char *buf);
113 * char *res_name(const char *resname)
116 * Translates the name given as for res_findname and returns a pointer to
117 * the translated string
120 char *res_name(const char *resname);
123 * FILE *res_openfile(const char *resname,const char *mode)
126 * Opens a resource file in a given ANSI mode. It does this without the
127 * odd adding on of numbers to the end that the Acorn one does (I hope!)
130 * const char *resname == leafname of file to open
131 * const char *mode == pointer to ANSI mode string
134 * A standard ANSI-type FILE pointer.
137 FILE *res_openfile(const char *resname,const char *mode);