- use the Dim function to draw the palette tester.

This looks better, consumes less resources and removes one ugly special texture from the engine.
This commit is contained in:
Christoph Oelckers 2018-07-14 18:28:12 +02:00
commit ed856085f4
3 changed files with 24 additions and 164 deletions

View file

@ -59,8 +59,6 @@ EXTERN_CVAR(Float, vid_brightness)
EXTERN_CVAR(Float, vid_contrast)
EXTERN_CVAR(Int, screenblocks)
void V_DrawPaletteTester(int pal);
//==========================================================================
//
// DCanvas :: CalcGamma
@ -182,6 +180,30 @@ void DFrameBuffer::SetSize(int width, int height)
Height = ViewportScaledHeight(width, height);
}
//==========================================================================
//
//
//
//==========================================================================
void V_DrawPaletteTester(int paletteno)
{
int blocksize = screen->GetHeight() / 50;
int t = paletteno;
int k = 0;
for (int i = 0; i < 16; ++i)
{
for (int j = 0; j < 16; ++j)
{
int palindex = (t > 1) ? translationtables[TRANSLATION_Standard][t - 2]->Remap[k] : k;
PalEntry pe = GPalette.BaseColors[palindex];
k++;
screen->Dim(pe, 1.f, j*blocksize, i*blocksize, blocksize, blocksize);
}
}
}
//==========================================================================
//
// DFrameBuffer :: DrawRateStuff