From: Holger Schemel Date: Tue, 14 Jan 2003 00:55:50 +0000 (+0100) Subject: rnd-20030114-1-src X-Git-Tag: 3.0.0^2~176 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a19647f4f265bb23bc249aa28a10d1d47a6179e1;p=rocksndiamonds.git rnd-20030114-1-src --- diff --git a/CHANGES b/CHANGES index 0134d5fe..01355225 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +Pre-Release Version 2.2.0rc3 [?? ??? ????] +------------------------------------------ + Pre-Release Version 2.2.0rc2 [13 JAN 2003] ------------------------------------------ - added support for stereo WAV sound files diff --git a/src/conftime.h b/src/conftime.h index 95387954..0c754ac9 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-01-13 02:38]" +#define COMPILE_DATE_STRING "[2003-01-14 01:48]" diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 9865b9d6..a555a200 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1533,6 +1533,71 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list, return file_list; } +static void CheckArtworkConfig(struct ArtworkListInfo *artwork_info) +{ + struct FileInfo *file_list = artwork_info->file_list; + struct ConfigInfo *suffix_list = artwork_info->suffix_list; + int num_file_list_entries = artwork_info->num_file_list_entries; + int num_suffix_list_entries = artwork_info->num_suffix_list_entries; + char *filename = getCustomArtworkConfigFilename(artwork_info->type); + struct SetupFileList *setup_file_list; + char *known_token_value = "[KNOWN_TOKEN]"; + int i, j; + + if (!options.verbose) + return; + + if (filename == NULL) + return; + + if ((setup_file_list = loadSetupFileList(filename)) == NULL) + return; + + for (i=0; ivalue, known_token_value) != 0) + { + Error(ERR_RETURN, "custom artwork configuration warning:"); + Error(ERR_RETURN, "- config file: '%s'", filename); + Error(ERR_RETURN, "- config token: '%s'", setup_file_list->token); + Error(ERR_WARN, "token not recognized"); + } + + setup_file_list = setup_file_list->next; + } + + freeSetupFileList(setup_file_list); +} + static void LoadArtworkConfig(struct ArtworkListInfo *artwork_info) { struct FileInfo *file_list = artwork_info->file_list; @@ -1561,47 +1626,47 @@ static void LoadArtworkConfig(struct ArtworkListInfo *artwork_info) if (filename == NULL) return; - if ((setup_file_list = loadSetupFileList(filename))) + if ((setup_file_list = loadSetupFileList(filename)) == NULL) + return; + + for (i=0; i '%s'\n", file_list[i].filename); - else - printf("-> UNDEFINED [-> '%s']\n", file_list[i].default_filename); - } -#endif + for (i=0; i '%s'\n", file_list[i].filename); + else + printf("-> UNDEFINED [-> '%s']\n", file_list[i].default_filename); } +#endif } static void deleteArtworkListEntry(struct ArtworkListInfo *artwork_info, @@ -1784,6 +1849,7 @@ void ReloadCustomArtworkList(struct ArtworkListInfo *artwork_info) struct FileInfo *file_list = artwork_info->file_list; int i; + CheckArtworkConfig(artwork_info); LoadArtworkConfig(artwork_info); #if 0 diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 5cd8c700..7754e5e4 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -1069,8 +1069,8 @@ char *getTokenValue(struct SetupFileList *setup_file_list, char *token) return getTokenValue(setup_file_list->next, token); } -static void setTokenValue(struct SetupFileList *setup_file_list, - char *token, char *value) +void setTokenValue(struct SetupFileList *setup_file_list, + char *token, char *value) { if (!setup_file_list) return; diff --git a/src/libgame/setup.h b/src/libgame/setup.h index 657467f4..cc26e2bf 100644 --- a/src/libgame/setup.h +++ b/src/libgame/setup.h @@ -215,6 +215,7 @@ boolean checkCookieString(const char *, const char *); char *getFormattedSetupEntry(char *, char *); void freeSetupFileList(struct SetupFileList *); char *getTokenValue(struct SetupFileList *, char *); +void setTokenValue(struct SetupFileList *, char *, char *); struct SetupFileList *loadSetupFileList(char *); void checkSetupFileListIdentifier(struct SetupFileList *, char *); void setSetupInfo(struct TokenInfo *, int, char *);