Remove r_swtruecolor variable as it is redundant

This commit is contained in:
Magnus Norddahl 2017-02-01 21:42:08 +01:00
commit 93166fa150
18 changed files with 49 additions and 69 deletions

View file

@ -49,7 +49,7 @@ void PolyDrawArgs::SetTexture(FTexture *texture)
textureWidth = texture->GetWidth();
textureHeight = texture->GetHeight();
auto viewport = swrenderer::RenderViewport::Instance();
if (viewport->r_swtruecolor)
if (viewport->RenderTarget->IsBgra())
texturePixels = (const uint8_t *)texture->GetPixelsBgra();
else
texturePixels = texture->GetPixels();
@ -63,7 +63,7 @@ void PolyDrawArgs::SetTexture(FTexture *texture, uint32_t translationID, bool fo
FRemapTable *table = TranslationToTable(translationID);
if (table != nullptr && !table->Inactive)
{
if (swrenderer::RenderViewport::Instance()->r_swtruecolor)
if (swrenderer::RenderViewport::Instance()->RenderTarget->IsBgra())
translation = (uint8_t*)table->Palette;
else
translation = table->Remap;