mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Convert many of the now-deprecated plString::Format calls to plFormat
This commit is contained in:
@ -280,7 +280,7 @@ bool pfConsole::MsgReceive( plMessage *msg )
|
||||
plString prefix = plProduct::ShortName();
|
||||
|
||||
// List all of the PNG indices we have taken up already...
|
||||
plString pattern = plString::Format("%s*.png", prefix.c_str());
|
||||
plString pattern = plFormat("{}*.png", prefix);
|
||||
std::vector<plFileName> images = plFileSystem::ListDir(screenshots, pattern.c_str());
|
||||
std::set<uint32_t> indices;
|
||||
std::for_each(images.begin(), images.end(),
|
||||
@ -298,7 +298,7 @@ bool pfConsole::MsgReceive( plMessage *msg )
|
||||
}
|
||||
|
||||
// Got our num, save the screenshot.
|
||||
plFileName fn = plString::Format("%s%04d.png", prefix.c_str(), num);
|
||||
plFileName fn = plFormat("{}{_04}.png", prefix, num);
|
||||
plPNG::Instance().WriteToFile(plFileName::Join(screenshots, fn), capMsg->GetMipmap());
|
||||
|
||||
AddLineF("Saved screenshot as '%s'", fn.AsString().c_str());
|
||||
@ -325,8 +325,8 @@ bool pfConsole::MsgReceive( plMessage *msg )
|
||||
{
|
||||
// Change the following line once we have a better way of reporting
|
||||
// errors in the parsing
|
||||
plString str = plString::Format("Error parsing %s", cmd->GetString());
|
||||
plString msg = plString::Format("%s:\n\nCommand: '%s'\n%s", fEngine->GetErrorMsg(), fEngine->GetLastErrorLine(),
|
||||
plString str = plFormat("Error parsing {}", cmd->GetString());
|
||||
plString msg = plFormat("{}:\n\nCommand: '{}'\n{}", fEngine->GetErrorMsg(), fEngine->GetLastErrorLine(),
|
||||
#ifdef HS_DEBUGGING
|
||||
"" );
|
||||
|
||||
|
@ -2872,7 +2872,7 @@ PF_CONSOLE_CMD( Camera, // groupName
|
||||
PF_CONSOLE_CMD( Camera, SwitchTo, "string cameraName", "Switch to the named camera")
|
||||
{
|
||||
char str[256];
|
||||
plString foo = plString::Format("%s_", (char*)params[0]);
|
||||
plString foo = plFormat("{}_", (char*)params[0]);
|
||||
plKey key = FindObjectByNameAndType(foo, "plCameraModifier1", "", str, true);
|
||||
PrintString(str);
|
||||
|
||||
@ -4204,7 +4204,7 @@ PF_CONSOLE_CMD( Access,
|
||||
{
|
||||
char str[256];
|
||||
char* preFix = params[0];
|
||||
plString name = plString::Format("%s_plMorphSequence_0", preFix);
|
||||
plString name = plFormat("{}_plMorphSequence_0", preFix);
|
||||
plKey key = FindObjectByName(name, plMorphSequence::Index(), "", str);
|
||||
PrintString(str);
|
||||
if (!key)
|
||||
@ -4229,7 +4229,7 @@ PF_CONSOLE_CMD( Access,
|
||||
{
|
||||
char str[256];
|
||||
char* preFix = params[0];
|
||||
plString name = plString::Format("%s_plMorphSequence_2", preFix);
|
||||
plString name = plFormat("{}_plMorphSequence_2", preFix);
|
||||
plKey key = FindObjectByName(name, plMorphSequence::Index(), "", str);
|
||||
PrintString(str);
|
||||
if (!key)
|
||||
@ -4250,7 +4250,7 @@ PF_CONSOLE_CMD( Access,
|
||||
{
|
||||
char str[256];
|
||||
char* preFix = params[0];
|
||||
plString name = plString::Format("%s_plMorphSequence_2", preFix);
|
||||
plString name = plFormat("{}_plMorphSequence_2", preFix);
|
||||
plKey key = FindObjectByName(name, plMorphSequence::Index(), "", str);
|
||||
PrintString(str);
|
||||
if (!key)
|
||||
@ -4405,7 +4405,7 @@ PF_CONSOLE_CMD( Access,
|
||||
|
||||
seq->Activate();
|
||||
|
||||
PrintString(plString::Format("%s Active\n", seq->GetKey()->GetName().c_str()).c_str());
|
||||
PrintString(plFormat("{} Active\n", seq->GetKey()->GetName()).c_str());
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Access,
|
||||
@ -4422,7 +4422,7 @@ PF_CONSOLE_CMD( Access,
|
||||
|
||||
seq->DeActivate();
|
||||
|
||||
PrintString(plString::Format("%s Unactive\n", seq->GetKey()->GetName().c_str()).c_str());
|
||||
PrintString(plFormat("{} Unactive\n", seq->GetKey()->GetName()).c_str());
|
||||
}
|
||||
|
||||
PF_CONSOLE_CMD( Access,
|
||||
@ -4444,8 +4444,7 @@ PF_CONSOLE_CMD( Access,
|
||||
seq->SetUseSharedMesh(true);
|
||||
seq->AddSharedMesh(item->fMeshes[plClothingItem::kLODHigh]);
|
||||
|
||||
PrintString(plString::Format("%s on item %s\n", seq->GetKey()->GetName().c_str(),
|
||||
(char *)params[0]).c_str());
|
||||
PrintString(plFormat("{} on item {}\n", seq->GetKey()->GetName(), (char *)params[0]).c_str());
|
||||
}
|
||||
|
||||
#include "pfSurface/plFadeOpacityMod.h"
|
||||
@ -6869,8 +6868,7 @@ PF_CONSOLE_CMD( Python,
|
||||
plString args;
|
||||
if (numParams > 1)
|
||||
{
|
||||
const char* tmp = params[1];
|
||||
args = plString::Format("(%s,)", tmp);
|
||||
args = plFormat("({},)", (char*)params[1]);
|
||||
}
|
||||
else
|
||||
args = "()";
|
||||
|
@ -298,14 +298,14 @@ static bool DumpSpecificMsgInfo(plMessage* msg, plString& info)
|
||||
const plPageInfo* pageInfo = plKeyFinder::Instance().GetLocationInfo(loc);
|
||||
|
||||
if (pageInfo)
|
||||
info += plString::Format("%s-%s ", pageInfo->GetAge().c_str(), pageInfo->GetPage().c_str());
|
||||
info += plFormat("{}-{} ", pageInfo->GetAge(), pageInfo->GetPage());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case plClientMsg::kLoadAgeKeys:
|
||||
case plClientMsg::kReleaseAgeKeys:
|
||||
info += plString::Format(" - Age: %s", clientMsg->GetAgeName().c_str());
|
||||
info += plFormat(" - Age: {}", clientMsg->GetAgeName());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@ -321,7 +321,7 @@ static bool DumpSpecificMsgInfo(plMessage* msg, plString& info)
|
||||
GetType(kOnRequest);
|
||||
GetType(kOnRemove);
|
||||
GetType(kOnReplace);
|
||||
info = plString::Format("Obj: %s RefType: %s", refMsg->GetRef()->GetKeyName().c_str(), typeName);
|
||||
info = plFormat("Obj: {} RefType: {}", refMsg->GetRef()->GetKeyName(), typeName);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user