diff --git a/source/blood/src/credits.cpp b/source/blood/src/credits.cpp index f8e92bf66..a3f6cdf5c 100644 --- a/source/blood/src/credits.cpp +++ b/source/blood/src/credits.cpp @@ -253,6 +253,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav) inputState.ClearAllInput(); int nFrame = 0; + hw_int_useindexedcolortextures = false; do { gameHandleEvents(); @@ -275,6 +276,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav) nFrame++; Smacker_GetNextFrame(hSMK); } while(nFrame < nFrames); + hw_int_useindexedcolortextures = hw_useindexedcolortextures; Smacker_Close(hSMK); inputState.ClearAllInput(); diff --git a/source/build/include/build.h b/source/build/include/build.h index 2633884be..b5d50e39d 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -1119,6 +1119,7 @@ EXTERN_CVAR(Bool, hw_models) EXTERN_CVAR(Float, hw_shadescale) EXTERN_CVAR(Int, hw_anisotropy) EXTERN_CVAR(Int, hw_texfilter) +extern bool hw_int_useindexedcolortextures; EXTERN_CVAR(Bool, hw_useindexedcolortextures) EXTERN_CVAR(Bool, hw_parallaxskypanning) EXTERN_CVAR(Bool, r_voxels) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 7bde1a5d7..9fdee8c8c 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -23,12 +23,16 @@ CVAR(Bool, hw_detailmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, hw_glowmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, hw_polygonmode, 0, 0) CVARD(Bool, hw_animsmoothing, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable model animation smoothing") -CVARD(Bool, hw_hightile, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable hightile texture rendering") +CVARD(Bool, hw_hightile, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable hightile texture rendering") CVARD(Bool, hw_models, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable model rendering") CVARD(Bool, hw_parallaxskypanning, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable parallaxed floor/ceiling panning when drawing a parallaxing sky") CVARD(Bool, hw_shadeinterpolate, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable shade interpolation") CVARD(Float, hw_shadescale, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "multiplier for shading") -CVARD(Bool, hw_useindexedcolortextures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable indexed color texture rendering") +bool hw_int_useindexedcolortextures; +CUSTOM_CVARD(Bool, hw_useindexedcolortextures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable indexed color texture rendering") +{ + hw_int_useindexedcolortextures = self; +} CUSTOM_CVARD(Int, hw_texfilter, TEXFILTER_ON, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "changes the texture filtering settings") diff --git a/source/glbackend/gl_texture.cpp b/source/glbackend/gl_texture.cpp index 47e60f537..3993ffa01 100644 --- a/source/glbackend/gl_texture.cpp +++ b/source/glbackend/gl_texture.cpp @@ -160,7 +160,7 @@ bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int bool texbound[3] = {}; int MatrixChange = 0; - TextureType = hw_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR; + TextureType = hw_int_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR; int lookuppal = 0; VSMatrix texmat;