mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Created M_DrawOptionsColorProfile to handle new background assets for color profile menu. SKINCOLOR_COLORPROFILE has been removed entirely, since it is no longer needed.
This commit is contained in:
parent
dccdffa537
commit
6ce4b76d9f
6 changed files with 75 additions and 28 deletions
|
|
@ -4397,8 +4397,6 @@ const char *COLOR_ENUMS[] = {
|
|||
"INTERMISSION1",
|
||||
"INTERMISSION2",
|
||||
"INTERMISSION3",
|
||||
|
||||
"COLORPROFILE",
|
||||
};
|
||||
|
||||
const char *const KARTHUD_LIST[] = {
|
||||
|
|
|
|||
|
|
@ -387,8 +387,6 @@ typedef enum
|
|||
SKINCOLOR_INTERMISSION1,
|
||||
SKINCOLOR_INTERMISSION2,
|
||||
SKINCOLOR_INTERMISSION3,
|
||||
|
||||
SKINCOLOR_COLORPROFILE,
|
||||
|
||||
SKINCOLOR_FIRSTFREESLOT,
|
||||
SKINCOLOR_LASTFREESLOT = SKINCOLOR_FIRSTFREESLOT + NUMCOLORFREESLOTS - 1,
|
||||
|
|
|
|||
|
|
@ -22265,7 +22265,6 @@ skincolor_t skincolors[MAXSKINCOLORS] = {
|
|||
{"Intermission 1", { 0, 80, 80, 80, 81, 81, 81, 84, 84, 85, 86, 86, 87, 87, 246, 248}, SKINCOLOR_NONE, 0, 0, false, UINT16_MAX}, // SKINCOLOR_INTERMISSION1
|
||||
{"Intermission 2", { 0, 81, 81, 81, 88, 88, 88, 89, 89, 140, 140, 141, 141, 142, 142, 142}, SKINCOLOR_NONE, 0, 0, false, UINT16_MAX}, // SKINCOLOR_INTERMISSION2
|
||||
{"Intermission 3", { 0, 144, 144, 144, 129, 129, 129, 130, 130, 146, 147, 147, 14, 16, 17, 19}, SKINCOLOR_NONE, 0, 0, false, UINT16_MAX}, // SKINCOLOR_INTERMISSION3
|
||||
{"Color Profile", { 35, 35, 73, 73, 112, 112, 255, 255, 152, 152, 181, 181, 181, 181, 0, 0}, SKINCOLOR_NONE, 0, 0, false, UINT16_MAX}, // SKINCOLOR_COLORPROFILE
|
||||
};
|
||||
|
||||
/** Patches the mobjinfo, state, and skincolor tables.
|
||||
|
|
|
|||
|
|
@ -1359,6 +1359,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);
|
||||
|
|
|
|||
|
|
@ -4377,6 +4377,57 @@ 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_BC%u", tick), 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)<<V_ALPHASHIFT);
|
||||
|
||||
}
|
||||
c = R_GetTranslationColormap(TC_DEFAULT, optionsmenu.currcolour, GTC_CACHE);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, tflag, back, c);
|
||||
}
|
||||
// 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
|
||||
else
|
||||
{
|
||||
if (eggahack)
|
||||
{
|
||||
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);
|
||||
|
||||
if (!solidbg)
|
||||
{
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, back_pause, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void M_DrawOptionsMovingButton(void)
|
||||
{
|
||||
patch_t *butt = W_CachePatchName("OPT_BUTT", PU_CACHE);
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
menuitem_t OPTIONS_VideoColorProfile[] =
|
||||
{
|
||||
|
||||
{IT_STRING | IT_CVAR, "Global Saturation", "Reduce the saturation of the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Saturation", "Reduce the saturation of the displayed image.",
|
||||
NULL, {.cvar = &cv_globalsaturation}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Global Gamma", "Increase or decrease the brightness of the displayed image.",
|
||||
{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,
|
||||
|
|
@ -30,73 +30,73 @@ menuitem_t OPTIONS_VideoColorProfile[] =
|
|||
{IT_HEADER, "Red...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Red Saturation", "Reduce the saturation of red in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Saturation", "Reduce the saturation of red in the displayed image.",
|
||||
NULL, {.cvar = &cv_rsaturation}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Red Gamma", "Increase or decrease the brightness of red in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Gamma", "Increase or decrease the brightness of red in the displayed image.",
|
||||
NULL, {.cvar = &cv_rgamma}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Red Hue", "Adjust the hue of red in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Hue", "Adjust the hue of red in the displayed image.",
|
||||
NULL, {.cvar = &cv_rhue}, 0, 0},
|
||||
|
||||
{IT_HEADER, "Yellow...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Yellow Saturation", "Reduce the saturation of yellow in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Saturation", "Reduce the saturation of yellow in the displayed image.",
|
||||
NULL, {.cvar = &cv_ysaturation}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Yellow Gamma", "Increase or decrease the brightness of yellow in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Gamma", "Increase or decrease the brightness of yellow in the displayed image.",
|
||||
NULL, {.cvar = &cv_ygamma}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Yellow Hue", "Adjust the hue of yellow in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Hue", "Adjust the hue of yellow in the displayed image.",
|
||||
NULL, {.cvar = &cv_yhue}, 0, 0},
|
||||
|
||||
{IT_HEADER, "Green...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Green Saturation", "Reduce the saturation of green in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Saturation", "Reduce the saturation of green in the displayed image.",
|
||||
NULL, {.cvar = &cv_gsaturation}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Green Gamma", "Increase or decrease the brightness of green in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Gamma", "Increase or decrease the brightness of green in the displayed image.",
|
||||
NULL, {.cvar = &cv_ggamma}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Green Hue", "Adjust the hue of green in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Hue", "Adjust the hue of green in the displayed image.",
|
||||
NULL, {.cvar = &cv_ghue}, 0, 0},
|
||||
|
||||
{IT_HEADER, "Cyan...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Cyan Saturation", "Reduce the saturation of cyan in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Saturation", "Reduce the saturation of cyan in the displayed image.",
|
||||
NULL, {.cvar = &cv_csaturation}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Cyan Gamma", "Increase or decrease the brightness of cyan in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Gamma", "Increase or decrease the brightness of cyan in the displayed image.",
|
||||
NULL, {.cvar = &cv_cgamma}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Cyan Hue", "Adjust the hue of cyan in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Hue", "Adjust the hue of cyan in the displayed image.",
|
||||
NULL, {.cvar = &cv_chue}, 0, 0},
|
||||
|
||||
{IT_HEADER, "Blue...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Blue Saturation", "Reduce the saturation of blue in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Saturation", "Reduce the saturation of blue in the displayed image.",
|
||||
NULL, {.cvar = &cv_bsaturation}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Blue Gamma", "Increase or decrease the brightness of blue in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Gamma", "Increase or decrease the brightness of blue in the displayed image.",
|
||||
NULL, {.cvar = &cv_bgamma}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Blue Hue", "Adjust the hue of blue in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Hue", "Adjust the hue of blue in the displayed image.",
|
||||
NULL, {.cvar = &cv_bhue}, 0, 0},
|
||||
|
||||
{IT_HEADER, "Magenta...", NULL,
|
||||
NULL, {NULL}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Magenta Saturation", "Reduce the saturation of magenta in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Saturation", "Reduce the saturation of magenta in the displayed image.",
|
||||
NULL, {.cvar = &cv_msaturation}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Magenta Gamma", "Increase or decrease the brightness of magenta in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Gamma", "Increase or decrease the brightness of magenta in the displayed image.",
|
||||
NULL, {.cvar = &cv_mgamma}, 0, 0},
|
||||
|
||||
{IT_STRING | IT_CVAR, "Magenta Hue", "Adjust the hue of magenta in the displayed image.",
|
||||
{IT_STRING | IT_CVAR, "Hue", "Adjust the hue of magenta in the displayed image.",
|
||||
NULL, {.cvar = &cv_mhue}, 0, 0},
|
||||
|
||||
};
|
||||
|
|
@ -106,13 +106,13 @@ menu_t OPTIONS_VideoColorProfileDef = {
|
|||
&OPTIONS_VideoDef,
|
||||
0,
|
||||
OPTIONS_VideoColorProfile,
|
||||
48, 80-8,
|
||||
SKINCOLOR_COLORPROFILE, 0,
|
||||
96, 80-8,
|
||||
SKINCOLOR_WHITE, 0,
|
||||
MBF_DRAWBGWHILEPLAYING,
|
||||
NULL,
|
||||
2, 5,
|
||||
M_DrawGenericOptions,
|
||||
M_DrawOptionsCogs,
|
||||
M_DrawOptionsColorProfile,
|
||||
M_OptionsTick,
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue