- added a new scaling mode to the level summary screen to scale to a given size.
In this mode the clean scaling factors are ignored and content is always scaled to fit the screen as efficently as possible. For the default summary screens an option was added to use this mode, which is a lot closer to the original look of this screen. It is not 100% identical because it still factors in the author, if given and long level names that may be broken into multiple lines of text.
This commit is contained in:
parent
fbf57e0c1d
commit
2016f56a7e
4 changed files with 161 additions and 94 deletions
|
|
@ -61,6 +61,7 @@ CVAR(Bool, wi_percents, true, CVAR_ARCHIVE)
|
|||
CVAR(Bool, wi_showtotaltime, true, CVAR_ARCHIVE)
|
||||
CVAR(Bool, wi_noautostartmap, false, CVAR_USERINFO | CVAR_ARCHIVE)
|
||||
CVAR(Int, wi_autoadvance, 0, CVAR_SERVERINFO)
|
||||
CVAR(Bool, wi_cleantextscale, true, CVAR_ARCHIVE)
|
||||
EXTERN_CVAR(Bool, inter_classic_scaling)
|
||||
|
||||
// States for the intermission
|
||||
|
|
@ -769,12 +770,35 @@ void WI_Start(wbstartstruct_t *wbstartstruct)
|
|||
}
|
||||
|
||||
WI_Screen = cls->CreateNew();
|
||||
|
||||
|
||||
ScaleOverrider s(twod);
|
||||
IFVIRTUALPTRNAME(WI_Screen, "StatusScreen", Start)
|
||||
{
|
||||
VMValue val[2] = { WI_Screen, wbstartstruct };
|
||||
VMCall(func, val, 2, nullptr, 0);
|
||||
}
|
||||
|
||||
if (!wi_cleantextscale)
|
||||
{
|
||||
// Only modify the original single player screens. Everything else must set itself up as intended
|
||||
if (cls->TypeName == NAME_DoomStatusScreen || cls->TypeName == NAME_RavenStatusScreen)
|
||||
{
|
||||
int w = screen->GetWidth();
|
||||
int h = screen->GetHeight();
|
||||
float ratio = ActiveRatio(w, h);
|
||||
int pixw = int(320 * (ratio * 0.75));
|
||||
if (pixw > 336) pixw -= 16; // leave a bit of space at the sides.
|
||||
|
||||
WI_Screen->IntVar(NAME_cwidth) = 320;
|
||||
WI_Screen->IntVar(NAME_cheight) = 200;
|
||||
WI_Screen->IntVar(NAME_scalemode) = FSMode_ScaleToFit43;
|
||||
WI_Screen->IntVar(NAME_scalefactorx) = 1;
|
||||
WI_Screen->IntVar(NAME_scalefactory) = 1;
|
||||
WI_Screen->IntVar(NAME_wrapwidth) = pixw;
|
||||
}
|
||||
}
|
||||
|
||||
GC::AddSoftRoot(WI_Screen);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue