- implement cvar 'inter_classic_scaling' to render the intermission flat as if it were 320x200

This commit is contained in:
Rachael Alexanderson 2020-05-06 00:04:05 -04:00
parent 18f822bed7
commit 7c33239187
2 changed files with 11 additions and 1 deletions

View file

@ -37,6 +37,7 @@
#include "vm.h"
#include "c_cvars.h"
#include "v_draw.h"
#include "v_video.h"
#include "fcolormap.h"
static F2DDrawer drawer;
@ -752,6 +753,13 @@ void F2DDrawer::AddFlatFill(int left, int top, int right, int bottom, FGameTextu
fV1 = float(right - left) / (float)src->GetDisplayHeight() * fs;
break;
case -1: // classic flat scaling
float ar = 4.f / 3.f / (float)ActiveRatio((float)screen->GetWidth(), (float)screen->GetHeight());
fU1 = 0.f;
fV1 = 0.f;
fU2 = 320.f / 64.f * fs / ar;
fV2 = 200.f / 64.f * fs;
break;
}
dg.mVertIndex = (int)mVertices.Reserve(4);
auto ptr = &mVertices[dg.mVertIndex];

View file

@ -73,6 +73,8 @@ extern int NoWipe;
CVAR(Bool, nointerscrollabort, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
CVAR(Bool, inter_subtitles, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
CVAR(Bool, inter_classic_scaling, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG);
//==========================================================================
//
// This also gets used by the title loop.
@ -221,7 +223,7 @@ void DIntermissionScreen::Drawer ()
}
else
{
twod->AddFlatFill(0,0, twod->GetWidth(), twod->GetHeight(), TexMan.GetGameTexture(mBackground));
twod->AddFlatFill(0,0, twod->GetWidth(), twod->GetHeight(), TexMan.GetGameTexture(mBackground), (inter_classic_scaling ? -1 : 0));
}
}
else