mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Merge remote-tracking branch 'origin/master' into vulkan2
This commit is contained in:
commit
536aa98e87
3 changed files with 28 additions and 16 deletions
|
@ -1930,20 +1930,32 @@ level_info_t *FMapInfoParser::ParseMapHeader(level_info_t &defaultinfo)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
levelinfo->LevelName = sc.String;
|
// Workaround to allow localizazion of IWADs which do not have a string label here (e.g. HACX.WAD)
|
||||||
|
// This checks for a string labelled with the MapName and if that is identical to what got parsed here
|
||||||
if (HexenHack)
|
// the string table entry will be used.
|
||||||
|
auto c = GStrings.GetLanguageString(levelinfo->MapName, FStringTable::default_table);
|
||||||
|
if (c && !strcmp(c, sc.String))
|
||||||
{
|
{
|
||||||
// Try to localize Hexen's map names.
|
levelinfo->flags |= LEVEL_LOOKUPLEVELNAME;
|
||||||
int fileno = Wads.GetLumpFile(sc.LumpNum);
|
levelinfo->LevelName = levelinfo->MapName;
|
||||||
auto fn = Wads.GetWadName(fileno);
|
}
|
||||||
if (fn && (!stricmp(fn, "HEXEN.WAD") || !stricmp(fn, "HEXDD.WAD")))
|
else
|
||||||
|
{
|
||||||
|
levelinfo->LevelName = sc.String;
|
||||||
|
|
||||||
|
if (HexenHack)
|
||||||
{
|
{
|
||||||
FStringf key("TXT_%.5s_%s", fn, levelinfo->MapName.GetChars());
|
// Try to localize Hexen's map names. This does not use the above feature to allow these names to be unique.
|
||||||
if (GStrings.exists(key))
|
int fileno = Wads.GetLumpFile(sc.LumpNum);
|
||||||
|
auto fn = Wads.GetWadName(fileno);
|
||||||
|
if (fn && (!stricmp(fn, "HEXEN.WAD") || !stricmp(fn, "HEXDD.WAD")))
|
||||||
{
|
{
|
||||||
levelinfo->flags |= LEVEL_LOOKUPLEVELNAME;
|
FStringf key("TXT_%.5s_%s", fn, levelinfo->MapName.GetChars());
|
||||||
levelinfo->LevelName = key;
|
if (GStrings.exists(key))
|
||||||
|
{
|
||||||
|
levelinfo->flags |= LEVEL_LOOKUPLEVELNAME;
|
||||||
|
levelinfo->LevelName = key;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1120,9 +1120,9 @@ void M_StartupEpisodeMenu(FGameStartup *gs)
|
||||||
// center the menu on the screen if the top space is larger than the bottom space
|
// center the menu on the screen if the top space is larger than the bottom space
|
||||||
int totalheight = posy + AllEpisodes.Size() * ld->mLinespacing - topy;
|
int totalheight = posy + AllEpisodes.Size() * ld->mLinespacing - topy;
|
||||||
|
|
||||||
if (totalheight < 190 || AllEpisodes.Size() == 1)
|
if (totalheight < CleanHeight-10 || AllEpisodes.Size() == 1)
|
||||||
{
|
{
|
||||||
int newtop = (200 - totalheight + topy) / 2;
|
int newtop = (CleanHeight - totalheight + topy) / 2;
|
||||||
int topdelta = newtop - topy;
|
int topdelta = newtop - topy;
|
||||||
if (topdelta < 0)
|
if (topdelta < 0)
|
||||||
{
|
{
|
||||||
|
@ -1631,9 +1631,9 @@ void M_StartupSkillMenu(FGameStartup *gs)
|
||||||
// center the menu on the screen if the top space is larger than the bottom space
|
// center the menu on the screen if the top space is larger than the bottom space
|
||||||
int totalheight = posy + MenuSkills.Size() * ld->mLinespacing - topy;
|
int totalheight = posy + MenuSkills.Size() * ld->mLinespacing - topy;
|
||||||
|
|
||||||
if (totalheight < 190 || MenuSkills.Size() == 1)
|
if (totalheight < CleanHeight-10 || MenuSkills.Size() == 1)
|
||||||
{
|
{
|
||||||
int newtop = (200 - totalheight + topy) / 2;
|
int newtop = (CleanHeight - totalheight + topy) / 2;
|
||||||
int topdelta = newtop - topy;
|
int topdelta = newtop - topy;
|
||||||
if (topdelta < 0)
|
if (topdelta < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2530,7 +2530,7 @@ OptionMenu "OpenGLOptions" protected
|
||||||
|
|
||||||
OptionMenu "VR3DMenu" protected
|
OptionMenu "VR3DMenu" protected
|
||||||
{
|
{
|
||||||
Title "GLPREFMNU_VRMODE"
|
Title "$GLPREFMNU_VRMODE"
|
||||||
Option "$GLMNU_3DMODE", vr_mode, "VRMode"
|
Option "$GLMNU_3DMODE", vr_mode, "VRMode"
|
||||||
IfOption(Windows)
|
IfOption(Windows)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue