- don't let environmental palettes (like underwater) affect the HUD and menu.

This commit is contained in:
Christoph Oelckers 2020-01-25 18:48:14 +01:00
parent 3d84384678
commit 99c4b6b6d7
2 changed files with 8 additions and 0 deletions

View file

@ -39,6 +39,7 @@
#include "m_png.h" #include "m_png.h"
#include "printf.h" #include "printf.h"
#include "templates.h" #include "templates.h"
#include "palette.h"
#include "glbackend/glbackend.h" #include "glbackend/glbackend.h"
#include "gl_load/gl_interface.h" #include "gl_load/gl_interface.h"
@ -431,7 +432,10 @@ void OpenGLFrameBuffer::Draw2D()
GLRenderer->mBuffers->BindCurrentFB(); GLRenderer->mBuffers->BindCurrentFB();
::DrawFullscreenBlends(); ::DrawFullscreenBlends();
DrawRateStuff(); DrawRateStuff();
auto savepal = curbasepal;
if (!GLInterface.NonTransparent255Enabled()) curbasepal = 0;
GLInterface.Draw2D(&twodgen); GLInterface.Draw2D(&twodgen);
curbasepal = savepal;
} }
} }

View file

@ -202,6 +202,10 @@ public:
{ {
g_nontransparent255 = on; g_nontransparent255 = on;
} }
bool NonTransparent255Enabled()
{
return g_nontransparent255;
}
void SetVertexBuffer(IVertexBuffer* vb, int offset1, int offset2); void SetVertexBuffer(IVertexBuffer* vb, int offset1, int offset2);
void SetIndexBuffer(IIndexBuffer* vb); void SetIndexBuffer(IIndexBuffer* vb);