diff --git a/src/k_menu.h b/src/k_menu.h index 9fec6b6ba..d90be3674 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -462,6 +462,9 @@ extern menu_t OPTIONS_VideoDef; extern menuitem_t OPTIONS_VideoModes[]; extern menu_t OPTIONS_VideoModesDef; +extern menuitem_t OPTIONS_VideoColorProfile[]; +extern menu_t OPTIONS_VideoColorProfileDef; + extern menuitem_t OPTIONS_VideoAdvanced[]; extern menu_t OPTIONS_VideoAdvancedDef; @@ -1145,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); @@ -1356,6 +1360,7 @@ void M_DrawPlaybackMenu(void); // Options menus: void M_DrawOptionsCogs(void); +void M_DrawOptionsColorProfile(void); void M_DrawOptionsMovingButton(void); // for sick transitions... void M_DrawOptions(void); void M_DrawGenericOptions(void); diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 45e72a35f..d76cdf507 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -978,7 +978,7 @@ void M_Drawer(void) { M_DrawGonerBack(); } - else if (!WipeInAction && currentMenu != &PAUSE_PlaybackMenuDef) + else if (!WipeInAction && currentMenu != &PAUSE_PlaybackMenuDef && currentMenu != &OPTIONS_VideoColorProfileDef) { V_DrawFadeScreen(122, 3); } @@ -4408,6 +4408,62 @@ void M_DrawOptionsCogs(void) } } +// Hacking up M_DrawOptionsCogs to try and make something better suited for changing the color profile. - Freaky Mutant Man +void M_DrawOptionsColorProfile(void) +{ + boolean eggahack = ( + currentMenu->prevMenu == &PLAY_MP_HostDef + || ( + currentMenu->prevMenu + && currentMenu->prevMenu->prevMenu == &PLAY_MP_HostDef + ) + ); + boolean solidbg = M_GameTrulyStarted() && !eggahack; + UINT32 tick = ((optionsmenu.ticker/10) % 3) + 1; + + // 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_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 + + if (optionsmenu.fade) + { + c2 = R_GetTranslationColormap(TC_DEFAULT, optionsmenu.lastcolour, GTC_CACHE); + V_DrawFixedPatch(0, 0, FRACUNIT, 0, back, c2); + + // prepare fade flag: + tflag = min(V_90TRANS, (optionsmenu.fade)<