diff --git a/src/k_menu.h b/src/k_menu.h index fbb34dcc886e4061971aedc1d31b526416768f21..8b70d09c542498b58bb5fec2ce91c777b15a29d6 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -1148,6 +1148,7 @@ void M_RefreshAdvancedVideoOptions(void); void M_HandleItemToggles(INT32 choice); // For item toggling void M_EraseData(INT32 choice); // For data erasing void M_CheckProfileData(INT32 choice); // check if we have profiles. +void M_ColorProfileDefault(INT32 choice); // For the reset button in the color profile menu. // profile selection menu void M_ProfileSelectInit(INT32 choice); diff --git a/src/k_menudraw.c b/src/k_menudraw.c index c8538d3288d7053e5619d0c358c781ad7b897ea1..ae95c879896aa5fcdd31cde0d8eef7f598c88f6b 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -4393,7 +4393,9 @@ void M_DrawOptionsColorProfile(void) // the background isn't drawn outside of being in the main menu state. if (gamestate == GS_MENU && solidbg) { - patch_t *back = W_CachePatchName(va("OPT_BC%u", tick), PU_CACHE); + patch_t *back = W_CachePatchName(va("OPT_BG%u", tick), PU_CACHE); + patch_t *colorp_photo = W_CachePatchName("COL_PHO", PU_CACHE); + patch_t *colorp_bar = W_CachePatchName("COL_BAR", PU_CACHE); INT32 tflag = 0; UINT8 *c; UINT8 *c2; // colormap for the one we're changing @@ -4409,6 +4411,8 @@ void M_DrawOptionsColorProfile(void) } c = R_GetTranslationColormap(TC_DEFAULT, optionsmenu.currcolour, GTC_CACHE); V_DrawFixedPatch(0, 0, FRACUNIT, tflag, back, c); + V_DrawFixedPatch(243<<FRACBITS, 67<<FRACBITS, FRACUNIT, 0, colorp_bar, NULL); + V_DrawFixedPatch(0, 0, FRACUNIT, 0, colorp_photo, NULL); //M_DrawCharSelectSprite( //figure this out later } // Given the need for accessibility, I don't want the background to be drawn transparent here - a clear color reference is needed for proper utilization. - Freaky Mutant Man @@ -4419,12 +4423,12 @@ void M_DrawOptionsColorProfile(void) M_DrawEggaChannelAlignable(true); } - patch_t *back_pause = W_CachePatchName(va("OPT_BAC%u", tick), PU_CACHE); - V_DrawFixedPatch(0, 0, FRACUNIT, 0, back_pause, NULL); + patch_t *colorp_bar = W_CachePatchName("COL_BAR", PU_CACHE); + V_DrawFixedPatch(243<<FRACBITS, 67<<FRACBITS, FRACUNIT, 0, colorp_bar, NULL); if (!solidbg) { - V_DrawFixedPatch(0, 0, FRACUNIT, 0, back_pause, NULL); + V_DrawFixedPatch(243<<FRACBITS, 67<<FRACBITS, FRACUNIT, 0, colorp_bar, NULL); } } } diff --git a/src/menus/options-video-colorprofile.c b/src/menus/options-video-colorprofile.c index d9a9065048f4cafcede8f89995f05aa4174f00cc..7507cf89012fd7d49f900986df44043e5f989b96 100644 --- a/src/menus/options-video-colorprofile.c +++ b/src/menus/options-video-colorprofile.c @@ -24,8 +24,8 @@ menuitem_t OPTIONS_VideoColorProfile[] = {IT_STRING | IT_CVAR, "Gamma", "Increase or decrease the brightness of the displayed image.", NULL, {.cvar = &cv_globalgamma}, 0, 0}, - {IT_NOTHING|IT_SPACE, NULL, NULL, - NULL, {NULL}, 0, 0}, + {IT_STRING | IT_CALL, "Reset All", "Reset the color profile to default settings.", + NULL, {.routine = M_ColorProfileDefault}, 0, 0}, {IT_HEADER, "Red...", NULL, NULL, {NULL}, 0, 0}, @@ -118,3 +118,31 @@ menu_t OPTIONS_VideoColorProfileDef = { NULL, NULL, }; + +// Set all color profile settings to the default values. +void M_ColorProfileDefault(INT32 choice) +{ + (void)choice; + + // The set value army approaches - gotta be a better way to handle this. + CV_SetValue(&cv_globalsaturation, 10); + CV_SetValue(&cv_rsaturation, 10); + CV_SetValue(&cv_ysaturation, 10); + CV_SetValue(&cv_gsaturation, 10); + CV_SetValue(&cv_csaturation, 10); + CV_SetValue(&cv_bsaturation, 10); + CV_SetValue(&cv_msaturation, 10); + CV_SetValue(&cv_globalgamma, 0); + CV_SetValue(&cv_rgamma, 0); + CV_SetValue(&cv_ygamma, 0); + CV_SetValue(&cv_ggamma, 0); + CV_SetValue(&cv_cgamma, 0); + CV_SetValue(&cv_bgamma, 0); + CV_SetValue(&cv_mgamma, 0); + CV_SetValue(&cv_rhue, 0); + CV_SetValue(&cv_yhue, 4); + CV_SetValue(&cv_ghue, 8); + CV_SetValue(&cv_chue, 12); + CV_SetValue(&cv_bhue, 16); + CV_SetValue(&cv_mhue, 20); +}