Go to the documentation of this file.
44 typedef enum { CONFIG, USER_DATA } sys_dir_type;
56 static string User_data_dir;
57 static string Global_data_dir;
58 static string Game_data_dir;
65 static void init (
string game_dir);
93 return Global_data_dir;
104 return Game_data_dir;
120 static string find_file (
const string & fname);
149 static bool directory_exist (
const string & dirname);
150 static bool file_exist (
const string & fname);
Declares some basic types.
Holds information about global settings.
static string user_data_dir()
Returns the absolute path to the user data directory (usually ~/.adonthell).
static void set_game_data_dir(string game_dir)
Specify an additional data directory containing game data.
static string find_directory(const string &dirname)
Finds a directory in the directories hierarchy, starting searching from game_data_dir(),...
static void init(string game_dir)
Initialise the game framework.
static string find_file(const string &fname)
Finds a file in the directories hierarchy, starting searching from game_data_dir(),...
static string get_system_dir(const sys_dir_type &type)
Return the OS-specific directory of the given type.
static string game_data_dir()
Returns the absolute path to the current game's directory (if any).
static string global_data_dir()
Returns the absolute path to the global data directory.