X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=225d385cf3323002b1c1257e87aa966efcb7e9c6;hb=9583e9c55b889974e0df9a8ca1930efdf29bda29;hp=3b447821aafe06315a5286fd63386ebbd8e36234;hpb=cb97a0d81529dc81696e5df8e17083b30dfe633e;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 3b447821..225d385c 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -615,9 +615,17 @@ void GetOptions(char *argv[], void (*print_usage_function)(void)) if (option_arg == next_option) options_left++; - /* adjust path for level directory accordingly */ + /* adjust paths for sub-directories in base directory accordingly */ options.level_directory = getPath2(options.ro_base_directory, LEVELS_DIRECTORY); + options.graphics_directory = + getPath2(options.ro_base_directory, GRAPHICS_DIRECTORY); + options.sounds_directory = + getPath2(options.ro_base_directory, SOUNDS_DIRECTORY); + options.music_directory = + getPath2(options.ro_base_directory, MUSIC_DIRECTORY); + options.docs_directory = + getPath2(options.ro_base_directory, DOCS_DIRECTORY); } else if (strncmp(option, "-levels", option_len) == 0) { @@ -679,6 +687,11 @@ void GetOptions(char *argv[], void (*print_usage_function)(void)) options.execute_command = option_arg; if (option_arg == next_option) options_left++; + +#if 1 + /* when doing batch processing, always enable verbose mode (warnings) */ + options.verbose = TRUE; +#endif } else if (*option == '-') { @@ -1227,7 +1240,7 @@ void translate_keyname(Key *keysym, char **x11name, char **name, int mode) char c = name_ptr[6]; if (c >= '0' && c <= '9') - key = KSYM_0 + (Key)(c - '0'); + key = KSYM_KP_0 + (Key)(c - '0'); } else if (strncmp(name_ptr, "XK_F", 4) == 0 && strlen(name_ptr) <= 6) { @@ -1694,7 +1707,7 @@ static void FreeCustomArtworkList(struct ArtworkListInfo *, struct ListNodeInfo ***, int *); struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list, - struct ConfigInfo *suffix_list, + struct ConfigTypeInfo *suffix_list, char **ignore_tokens, int num_file_list_entries) { @@ -1829,7 +1842,7 @@ static boolean token_suffix_match(char *token, char *suffix, int start_pos) #define KNOWN_TOKEN_VALUE "[KNOWN_TOKEN_VALUE]" static void read_token_parameters(SetupFileHash *setup_file_hash, - struct ConfigInfo *suffix_list, + struct ConfigTypeInfo *suffix_list, struct FileInfo *file_list_entry) { /* check for config token that is the base token without any suffixes */ @@ -1882,7 +1895,7 @@ static void read_token_parameters(SetupFileHash *setup_file_hash, static void add_dynamic_file_list_entry(struct FileInfo **list, int *num_list_entries, SetupFileHash *extra_file_hash, - struct ConfigInfo *suffix_list, + struct ConfigTypeInfo *suffix_list, int num_suffix_list_entries, char *token) { @@ -1931,7 +1944,7 @@ static void LoadArtworkConfigFromFilename(struct ArtworkListInfo *artwork_info, char *filename) { struct FileInfo *file_list = artwork_info->file_list; - struct ConfigInfo *suffix_list = artwork_info->suffix_list; + struct ConfigTypeInfo *suffix_list = artwork_info->suffix_list; char **base_prefixes = artwork_info->base_prefixes; char **ext1_suffixes = artwork_info->ext1_suffixes; char **ext2_suffixes = artwork_info->ext2_suffixes;