From 69bc200c3c753b5d6d7cb21b43b8534623a479a7 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Sun, 25 Jun 2023 04:28:00 -0300 Subject: [PATCH] Add tc_colormaps cvar --- src/r_main.c | 10 ++++++++-- src/r_state.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index a56e9286e..d56b4fc58 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -180,6 +180,10 @@ consvar_t cv_homremoval = CVAR_INIT ("homremoval", "No", CV_SAVE, homremoval_con consvar_t cv_maxportals = CVAR_INIT ("maxportals", "2", CV_SAVE, maxportals_cons_t, NULL); +#ifdef TRUECOLOR +consvar_t cv_tccolormaps = CVAR_INIT ("tc_colormaps", "Off", CV_SAVE, CV_OnOff, NULL); +#endif + consvar_t cv_renderstats = CVAR_INIT ("renderstats", "Off", 0, CV_OnOff, NULL); void SplitScreen_OnChange(void) @@ -1474,8 +1478,8 @@ void R_RenderPlayerView(player_t *player) } #ifdef TRUECOLOR - tc_colormaps = false; - tc_spritecolormaps = truecolor; + tc_colormaps = truecolor && cv_tccolormaps.value; + tc_spritecolormaps = tc_colormaps; #endif R_SetupFrame(player); @@ -1659,6 +1663,8 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_maxportals); + CV_RegisterVar(&cv_tccolormaps); + CV_RegisterVar(&cv_movebob); // Frame interpolation/uncapped diff --git a/src/r_state.h b/src/r_state.h index 1450eb3dc..5e20e5423 100644 --- a/src/r_state.h +++ b/src/r_state.h @@ -96,6 +96,8 @@ extern mobj_t *r_viewmobj; extern consvar_t cv_allowmlook; extern consvar_t cv_maxportals; +extern consvar_t cv_tccolormaps; + extern angle_t clipangle; extern angle_t doubleclipangle;