Holds information about global settings.
This static class should be the first to be initialised in your application, because many others depends on it's correct settings.
Definition at line 47 of file game.h.
string game::find_file |
( |
const string & |
fname) | |
|
|
static |
Finds a file in the directories hierarchy, starting searching from game_data_dir(), then global_data_dir() and finally user_data_dir().
If a matching file is found, the full absolute path is returned, else an empty string "" is returned. If the path was already absolute, it is returned immediatly.
- Parameters
-
fname | name of the find to search for. |
- Returns
- complete absolute path to the file if found, passed string if the given path was already absolute, or "" if the file wasn't found.
Definition at line 80 of file game.cc.
string game::find_directory |
( |
const string & |
dirname) | |
|
|
static |
Finds a directory in the directories hierarchy, starting searching from game_data_dir(), then global_data_dir() and finally user_data_dir().
If a matching directory is found, the full absolute path is returned, else an empty string "" is returned. If the path was already absolute, it is returned immediatly.
- Parameters
-
fname | name of the find to search for. |
- Returns
- complete absolute path to the directory if found, passed string if the given path was already absolute, or "" if the directory wasn't found.
Definition at line 102 of file game.cc.