From d53801c85c23991a8c672175d033bae240829ce1 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 21 Apr 2016 18:50:30 +0100 Subject: [PATCH] Disable the corona-related consvars unless ALAM_LIGHTING macro is enabled --- src/hardware/hw_main.h | 2 ++ src/r_main.c | 2 ++ src/v_video.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index af7d821b..b0a14d3b 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -74,10 +74,12 @@ FUNCMATH UINT8 LightLevelToLum(INT32 l); extern CV_PossibleValue_t granisotropicmode_cons_t[]; +#ifdef ALAM_LIGHTING extern consvar_t cv_grdynamiclighting; extern consvar_t cv_grstaticlighting; extern consvar_t cv_grcoronas; extern consvar_t cv_grcoronasize; +#endif extern consvar_t cv_grfov; extern consvar_t cv_grmd2; extern consvar_t cv_grfog; diff --git a/src/r_main.c b/src/r_main.c index 1e40a85b..d5de2202 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1461,10 +1461,12 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_voodoocompatibility); CV_RegisterVar(&cv_grfogcolor); CV_RegisterVar(&cv_grsoftwarefog); +#ifdef ALAM_LIGHTING CV_RegisterVar(&cv_grstaticlighting); CV_RegisterVar(&cv_grdynamiclighting); CV_RegisterVar(&cv_grcoronas); CV_RegisterVar(&cv_grcoronasize); +#endif CV_RegisterVar(&cv_grmd2); #endif diff --git a/src/v_video.c b/src/v_video.c index b9bdb271..96d7fd8d 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -71,10 +71,12 @@ consvar_t cv_grgammagreen = {"gr_gammagreen", "127", CV_SAVE|CV_CALL, grgamma_co CV_Gammaxxx_ONChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grgammablue = {"gr_gammablue", "127", CV_SAVE|CV_CALL, grgamma_cons_t, CV_Gammaxxx_ONChange, 0, NULL, NULL, 0, 0, NULL}; +#ifdef ALAM_LIGHTING consvar_t cv_grdynamiclighting = {"gr_dynamiclighting", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grstaticlighting = {"gr_staticlighting", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grcoronas = {"gr_coronas", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grcoronasize = {"gr_coronasize", "1", CV_SAVE| CV_FLOAT, 0, NULL, 0, NULL, NULL, 0, 0, NULL}; +#endif static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}}; // console variables in development