# (this must be set to "gmake" for some systems)
MAKE = make
-# directory for read-only game data (like graphics, sounds, levels)
+# directory for (read-only) game data (like graphics, sounds, levels)
# (this directory is usually the game's installation directory)
# default is '.' to be able to run program without installation
-# RO_GAME_DIR = .
+# BASE_PATH = .
# use the following setting for Debian / Ubuntu installations:
-# RO_GAME_DIR = /usr/share/games/rocksndiamonds
+# BASE_PATH = /usr/share/games/rocksndiamonds
# uncomment if system has no joystick include file
# JOYSTICK = -DNO_JOYSTICK
void (*print_usage_function)(void),
void (*print_version_function)(void))
{
- char *ro_base_path = getProgramMainDataPath(argv[0], RO_BASE_PATH);
+ char *base_path = getProgramMainDataPath(argv[0], BASE_PATH);
char **argvplus = checked_calloc((argc + 1) * sizeof(char **));
char **options_left = &argvplus[1];
options.server_host = NULL;
options.server_port = 0;
- options.ro_base_directory = ro_base_path;
- options.level_directory = getPath2(ro_base_path, LEVELS_DIRECTORY);
- options.graphics_directory = getPath2(ro_base_path, GRAPHICS_DIRECTORY);
- options.sounds_directory = getPath2(ro_base_path, SOUNDS_DIRECTORY);
- options.music_directory = getPath2(ro_base_path, MUSIC_DIRECTORY);
- options.docs_directory = getPath2(ro_base_path, DOCS_DIRECTORY);
- options.conf_directory = getPath2(ro_base_path, CONF_DIRECTORY);
+ options.base_directory = base_path;
+
+ options.level_directory = getPath2(base_path, LEVELS_DIRECTORY);
+ options.graphics_directory = getPath2(base_path, GRAPHICS_DIRECTORY);
+ options.sounds_directory = getPath2(base_path, SOUNDS_DIRECTORY);
+ options.music_directory = getPath2(base_path, MUSIC_DIRECTORY);
+ options.docs_directory = getPath2(base_path, DOCS_DIRECTORY);
+ options.conf_directory = getPath2(base_path, CONF_DIRECTORY);
options.execute_command = NULL;
options.special_flags = NULL;
if (option_arg == NULL)
FailWithHelp("option '%s' requires an argument", option_str);
- options.ro_base_directory = ro_base_path = getStringCopy(option_arg);
+ options.base_directory = base_path = getStringCopy(option_arg);
if (option_arg == next_option)
options_left++;
// adjust paths for sub-directories in base directory accordingly
- options.level_directory = getPath2(ro_base_path, LEVELS_DIRECTORY);
- options.graphics_directory = getPath2(ro_base_path, GRAPHICS_DIRECTORY);
- options.sounds_directory = getPath2(ro_base_path, SOUNDS_DIRECTORY);
- options.music_directory = getPath2(ro_base_path, MUSIC_DIRECTORY);
- options.docs_directory = getPath2(ro_base_path, DOCS_DIRECTORY);
- options.conf_directory = getPath2(ro_base_path, CONF_DIRECTORY);
+ options.level_directory = getPath2(base_path, LEVELS_DIRECTORY);
+ options.graphics_directory = getPath2(base_path, GRAPHICS_DIRECTORY);
+ options.sounds_directory = getPath2(base_path, SOUNDS_DIRECTORY);
+ options.music_directory = getPath2(base_path, MUSIC_DIRECTORY);
+ options.docs_directory = getPath2(base_path, DOCS_DIRECTORY);
+ options.conf_directory = getPath2(base_path, CONF_DIRECTORY);
}
else if (strncmp(option, "-levels", option_len) == 0)
{
if (strSuffix(command_filename_1, ".exe"))
command_filename_1[strlen(command_filename_1) - 4] = '\0';
- char *ro_base_path = getProgramMainDataPath(command_filename, RO_BASE_PATH);
- char *conf_directory = getPath2(ro_base_path, CONF_DIRECTORY);
+ char *base_path = getProgramMainDataPath(command_filename, BASE_PATH);
+ char *conf_directory = getPath2(base_path, CONF_DIRECTORY);
char *command_basepath = getBasePath(command_filename);
char *command_basename = getBaseNameNoSuffix(command_filename);
config_filename_2 = getStringCat2(command_filename_2, ".conf");
config_filename_3 = getPath2(conf_directory, SETUP_FILENAME);
- checked_free(ro_base_path);
+ checked_free(base_path);
checked_free(conf_directory);
checked_free(command_basepath);