diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 7b8852ddf..6478ff627 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -127,6 +127,10 @@ static uint32_t templenrepquot=1; static int32_t duke3d_m32_globalflags; +enum { + DUKE3D_NO_HARDCODED_FOGPALS = 1<<1, +}; + //////////////////// Key stuff //////////////////// #define eitherALT (keystatus[KEYSC_LALT] || keystatus[KEYSC_RALT]) @@ -9937,7 +9941,8 @@ void ExtPostInit(void) // This makes it possible to sensibly use Lunatic's engine.saveLookupDat(). palookup[0][239] = 239; - generatefogpals(); + if (!(duke3d_m32_globalflags & DUKE3D_NO_HARDCODED_FOGPALS)) + generatefogpals(); fillemptylookups(); } diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 2e6601d68..26d85e378 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10986,7 +10986,8 @@ static void G_PostLoadPalette(void) if (basepaltable[SLIMEPAL] != NULL) Bmemset(&basepaltable[SLIMEPAL][255*3], 0, 3); - generatefogpals(); + if (!(duke3d_globalflags & DUKE3D_NO_HARDCODED_FOGPALS)) + generatefogpals(); E_ReplaceTransparentColorWithBlack(); diff --git a/polymer/eduke32/source/global.h b/polymer/eduke32/source/global.h index 8d28c778e..9d2d2f4fe 100644 --- a/polymer/eduke32/source/global.h +++ b/polymer/eduke32/source/global.h @@ -59,6 +59,7 @@ G_EXTERN int32_t duke3d_globalflags; enum { DUKE3D_NO_WIDESCREEN_PINNING = 1<<0, + DUKE3D_NO_HARDCODED_FOGPALS = 1<<1, }; G_EXTERN DukeStatus_t sbar;