X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsetup.c;h=3e5392498dbdb63474df4b3e75b19c22488452d5;hb=5892805548bddfab434b9f1a0d376e4bf2cb10a4;hp=d69c6537e238a42b925e202751fe558bf0216e2d;hpb=852a8eef1e8858a40da0be4093eba3deaf468f51;p=rocksndiamonds.git diff --git a/src/libgame/setup.c b/src/libgame/setup.c index d69c6537..3e539249 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -334,7 +334,9 @@ char *setLevelArtworkDir(TreeInfo *ti) checked_free(*artwork_path_ptr); if ((level_artwork = getTreeInfoFromIdentifier(ti, *artwork_set_ptr))) + { *artwork_path_ptr = getStringCopy(getSetupArtworkDir(level_artwork)); + } else { /* @@ -670,10 +672,8 @@ char *getCustomImageFilename(char *basename) #if defined(CREATE_SPECIAL_EDITION) free(filename); - /* !!! INSERT WARNING HERE TO REPORT MISSING ARTWORK FILES !!! */ -#if 0 - printf("::: MISSING ARTWORK FILE '%s'\n", basename); -#endif + if (options.debug) + Error(ERR_WARN, "cannot find artwork file '%s' (using fallback)", basename); /* 6th try: look for fallback artwork in old default artwork directory */ /* (needed to prevent errors when trying to access unused artwork files) */ @@ -743,6 +743,9 @@ char *getCustomSoundFilename(char *basename) #if defined(CREATE_SPECIAL_EDITION) free(filename); + if (options.debug) + Error(ERR_WARN, "cannot find artwork file '%s' (using fallback)", basename); + /* 6th try: look for fallback artwork in old default artwork directory */ /* (needed to prevent errors when trying to access unused artwork files) */ filename = getPath2(options.sounds_directory, SND_FALLBACK_FILENAME); @@ -811,6 +814,9 @@ char *getCustomMusicFilename(char *basename) #if defined(CREATE_SPECIAL_EDITION) free(filename); + if (options.debug) + Error(ERR_WARN, "cannot find artwork file '%s' (using fallback)", basename); + /* 6th try: look for fallback artwork in old default artwork directory */ /* (needed to prevent errors when trying to access unused artwork files) */ filename = getPath2(options.music_directory, MUS_FALLBACK_FILENAME); @@ -2681,6 +2687,10 @@ void setSetupInfo(struct TokenInfo *token_info, *(boolean *)setup_value = get_boolean_from_string(token_value); break; + case TYPE_SWITCH3: + *(int *)setup_value = get_switch3_from_string(token_value); + break; + case TYPE_KEY: *(Key *)setup_value = getKeyFromKeyName(token_value); break; @@ -3743,10 +3753,20 @@ char *getSetupValue(int type, void *value) strcpy(value_string, (*(boolean *)value ? "on" : "off")); break; + case TYPE_SWITCH3: + strcpy(value_string, (*(int *)value == AUTO ? "auto" : + *(int *)value == FALSE ? "off" : "on")); + break; + case TYPE_YES_NO: strcpy(value_string, (*(boolean *)value ? "yes" : "no")); break; + case TYPE_YES_NO_AUTO: + strcpy(value_string, (*(int *)value == AUTO ? "auto" : + *(int *)value == FALSE ? "no" : "yes")); + break; + case TYPE_ECS_AGA: strcpy(value_string, (*(boolean *)value ? "AGA" : "ECS")); break;