Merge branch 'master' of https://github.com/ZDoom/gzdoom into gzdoom-update-4-12-1

This commit is contained in:
Rachael Alexanderson 2024-04-21 11:05:59 -04:00
commit 112c6cbccf
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
90 changed files with 1227 additions and 834 deletions

View file

@ -260,7 +260,7 @@ CUSTOM_CVAR (Int, fraglimit, 0, CVAR_SERVERINFO)
{
if (playeringame[i] && self <= D_GetFragCount(&players[i]))
{
Printf ("%s\n", GStrings("TXT_FRAGLIMIT"));
Printf ("%s\n", GStrings.GetString("TXT_FRAGLIMIT"));
primaryLevel->ExitLevel (0, false);
break;
}
@ -580,6 +580,7 @@ CVAR(Flag, sv_nolocaldrops, dmflags3, DF3_NO_LOCAL_DROPS);
CVAR(Flag, sv_nocoopitems, dmflags3, DF3_NO_COOP_ONLY_ITEMS);
CVAR(Flag, sv_nocoopthings, dmflags3, DF3_NO_COOP_ONLY_THINGS);
CVAR(Flag, sv_rememberlastweapon, dmflags3, DF3_REMEMBER_LAST_WEAP);
CVAR(Flag, sv_pistolstart, dmflags3, DF3_PISTOL_START);
//==========================================================================
//
@ -1114,7 +1115,7 @@ void D_Display ()
if (paused && multiplayer)
{
FFont *font = generic_ui? NewSmallFont : SmallFont;
FString pstring = GStrings("TXT_BY");
FString pstring = GStrings.GetString("TXT_BY");
pstring.Substitute("%s", players[paused - 1].userinfo.GetName());
DrawText(twod, font, CR_RED,
(twod->GetWidth() - font->StringWidth(pstring)*CleanXfac) / 2,
@ -1214,6 +1215,8 @@ void D_DoomLoop ()
{
try
{
GStrings.SetDefaultGender(players[consoleplayer].userinfo.GetGender()); // cannot be done when the CVAR changes because we don't know if it's for the consoleplayer.
// frame syncronous IO operations
if (gametic > lasttic)
{
@ -1312,7 +1315,7 @@ void D_PageDrawer (void)
if (Subtitle != nullptr)
{
FFont* font = generic_ui ? NewSmallFont : SmallFont;
DrawFullscreenSubtitle(font, GStrings[Subtitle]);
DrawFullscreenSubtitle(font, GStrings.CheckString(Subtitle));
}
if (Advisory.isValid())
{
@ -2179,7 +2182,7 @@ static void CheckCmdLine()
if (devparm)
{
Printf ("%s", GStrings("D_DEVSTR"));
Printf ("%s", GStrings.GetString("D_DEVSTR"));
}
// turbo option // [RH] (now a cvar)
@ -2656,11 +2659,6 @@ void Mlook_ReleaseHandler()
}
}
int StrTable_GetGender()
{
return players[consoleplayer].userinfo.GetGender();
}
bool StrTable_ValidFilter(const char* str)
{
if (gameinfo.gametype == GAME_Strife && (gameinfo.flags & GI_SHAREWARE) && !stricmp(str, "strifeteaser")) return true;
@ -3494,7 +3492,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& allw
for (int p = 0; p < 5; ++p)
{
// At this point we cannot use the player's gender info yet so force 'male' here.
const char *str = GStrings.GetString(startupString[p], nullptr, 0);
const char *str = GStrings.CheckString(startupString[p], nullptr, 0);
if (str != NULL && str[0] != '\0')
{
Printf("%s\n", str);
@ -3684,7 +3682,6 @@ static int D_DoomMain_Internal (void)
System_GetPlayerName,
System_DispatchEvent,
StrTable_ValidFilter,
StrTable_GetGender,
nullptr,
CheckSkipGameOptionBlock,
System_ConsoleToggled,