diff --git a/src/sdhlt/sdHLRAD/qrad.cpp b/src/sdhlt/sdHLRAD/qrad.cpp index a15559d1..32157a07 100644 --- a/src/sdhlt/sdHLRAD/qrad.cpp +++ b/src/sdhlt/sdHLRAD/qrad.cpp @@ -28,6 +28,7 @@ * every surface must be divided into at least two g_patches each axis */ +bool g_pre25update = DEFAULT_PRE25UPDATE; bool g_fastmode = DEFAULT_FASTMODE; typedef enum { @@ -2695,6 +2696,7 @@ static void Usage() Banner(); Log("\n-= %s Options =-\n\n", g_Program); + Log(" -pre25 : Optimize compile for pre-Half-Life 25th anniversary update.\n"); Log(" -console # : Set to 0 to turn off the pop-up console (default is 1)\n"); Log(" -lang file : localization file\n"); Log(" -waddir folder : Search this folder for wad files.\n"); @@ -2817,6 +2819,7 @@ static void Settings() Log("threads [ %17d ] [ %17d ]\n", g_numthreads, DEFAULT_NUMTHREADS); } + Log("pre-25th anniversary [ %17s ] [ %17s ]\n", g_pre25update ? "on" : "off", DEFAULT_PRE25UPDATE ? "on" : "off"); Log("verbose [ %17s ] [ %17s ]\n", g_verbose ? "on" : "off", DEFAULT_VERBOSE ? "on" : "off"); Log("log [ %17s ] [ %17s ]\n", g_log ? "on" : "off", DEFAULT_LOG ? "on" : "off"); Log("developer [ %17d ] [ %17d ]\n", g_developer, DEFAULT_DEVELOPER); @@ -3393,7 +3396,7 @@ int main(const int argc, char** argv) } else if (!strcasecmp(argv[i], "-limiter")) { - if (i + 1 < argc) //added "1" .--vluzacn + if (i + 1 < argc) //"1" was added to check if there is another argument afterwards (expected value) //seedee { g_limitthreshold = atof(argv[++i]); } @@ -3873,7 +3876,11 @@ int main(const int argc, char** argv) Usage(); } } - + else if (!strcasecmp(argv[i], "-pre25")) //Pre25 should be after everything else to override + { + g_pre25update = true; + g_limitthreshold = 188.0; + } else if (argv[i][0] == '-') { Log("Unknown option \"%s\"\n", argv[i]); diff --git a/src/sdhlt/sdHLRAD/qrad.h b/src/sdhlt/sdHLRAD/qrad.h index 6151de68..ba59d572 100644 --- a/src/sdhlt/sdHLRAD/qrad.h +++ b/src/sdhlt/sdHLRAD/qrad.h @@ -43,6 +43,7 @@ #include #endif +#define DEFAULT_PRE25UPDATE false #define DEFAULT_FASTMODE false #define DEFAULT_METHOD eMethodSparseVismatrix #define DEFAULT_LERP_ENABLED true @@ -52,9 +53,9 @@ #define DEFAULT_AMBIENT_RED 0.0 #define DEFAULT_AMBIENT_GREEN 0.0 #define DEFAULT_AMBIENT_BLUE 0.0 -// 188 is the fullbright threshold for pre-Anniversary update Goldsrc, regardless of the brightness and gamma settings in the graphic options. +// 188 is the fullbright threshold for Goldsrc before 25th anniversary, regardless of the brightness and gamma settings in the graphic options. This is no longer necessary // However, hlrad can only control the light values of each single light style. So the final in-game brightness may exceed 188 if you have set a high value in the "custom appearance" of the light, or if the face receives light from different styles. -#define DEFAULT_LIMITTHRESHOLD 255.0 +#define DEFAULT_LIMITTHRESHOLD 255.0 // We override to 188 with pre25 argument. //seedee #define DEFAULT_TEXSCALE true #define DEFAULT_CHOP 64.0 #define DEFAULT_TEXCHOP 32.0