mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Convert many of the now-deprecated plString::Format calls to plFormat
This commit is contained in:
@ -724,16 +724,16 @@ void plAnimStage::DumpDebug(bool active, int &x, int &y, int lineHeight, plDebug
|
||||
str << " ";
|
||||
|
||||
if(fLoops)
|
||||
str << plString::Format("loop(%d/%d)", fCurLoop, fLoops);
|
||||
str << "loop(" << fCurLoop << '/' << fLoops << ')';
|
||||
|
||||
str << plString::Format("time: (%f/%f)", fLocalTime, fLength);
|
||||
str << "time: (" << fLocalTime << '/' << fLength << ')';
|
||||
|
||||
if(active)
|
||||
debugTxt.DrawString(x, y, str.GetString().c_str(), 0, 255, 0);
|
||||
debugTxt.DrawString(x, y, str.GetString(), 0, 255, 0);
|
||||
else if(fAnimInstance)
|
||||
debugTxt.DrawString(x, y, str.GetString().c_str());
|
||||
debugTxt.DrawString(x, y, str.GetString());
|
||||
else
|
||||
debugTxt.DrawString(x, y, str.GetString().c_str(), 255, 255, 0);
|
||||
debugTxt.DrawString(x, y, str.GetString(), 255, 255, 0);
|
||||
|
||||
y += lineHeight;
|
||||
}
|
||||
|
@ -2654,7 +2654,7 @@ int plArmatureMod::RefreshDebugDisplay()
|
||||
|
||||
void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt)
|
||||
{
|
||||
debugTxt.DrawString(x, y, plString::Format("Armature <%s>:", fRootName.c_str()), 255, 128, 128);
|
||||
debugTxt.DrawString(x, y, plFormat("Armature <{}>:", fRootName), 255, 128, 128);
|
||||
y += lineHeight;
|
||||
|
||||
plSceneObject * SO = GetTarget(0);
|
||||
@ -2677,8 +2677,8 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugTe
|
||||
plKey world = nil;
|
||||
if (fController)
|
||||
world = fController->GetSubworld();
|
||||
debugTxt.DrawString(x, y, plString::Format("In world: %s Frozen: %s",
|
||||
world ? world->GetName().c_str() : "nil", frozen));
|
||||
debugTxt.DrawString(x, y, plFormat("In world: {} Frozen: {}",
|
||||
world ? world->GetName() : "nil", frozen));
|
||||
y+= lineHeight;
|
||||
|
||||
plString details;
|
||||
@ -2747,11 +2747,11 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugTe
|
||||
|
||||
debugTxt.DrawString(x, y, "Relevance Regions:");
|
||||
y += lineHeight;
|
||||
debugTxt.DrawString(x, y, plString::Format(" In: %s",
|
||||
plRelevanceMgr::Instance()->GetRegionNames(fRegionsImIn).c_str()));
|
||||
debugTxt.DrawString(x, y, plFormat(" In: {}",
|
||||
plRelevanceMgr::Instance()->GetRegionNames(fRegionsImIn)));
|
||||
y += lineHeight;
|
||||
debugTxt.DrawString(x, y, plString::Format(" Care about: %s",
|
||||
plRelevanceMgr::Instance()->GetRegionNames(fRegionsICareAbout).c_str()));
|
||||
debugTxt.DrawString(x, y, plFormat(" Care about: %s",
|
||||
plRelevanceMgr::Instance()->GetRegionNames(fRegionsICareAbout)));
|
||||
y += lineHeight;
|
||||
}
|
||||
}
|
||||
@ -2792,7 +2792,7 @@ void plAvBoneMap::AddBoneMapping(uint32_t boneID, const plSceneObject *SO)
|
||||
|
||||
void plArmatureMod::DebugDumpMoveKeys(int &x, int &y, int lineHeight, plDebugText &debugTxt)
|
||||
{
|
||||
debugTxt.DrawString(x, y, plString::Format("Mouse Input Map: %s",
|
||||
debugTxt.DrawString(x, y, plFormat("Mouse Input Map: {}",
|
||||
plAvatarInputInterface::GetInstance()->GetInputMapName()));
|
||||
y += lineHeight;
|
||||
|
||||
|
@ -117,7 +117,7 @@ void plArmatureBehavior::DumpDebug(int &x, int &y, int lineHeight, plDebugText &
|
||||
details = plString::Format("%20s %3s time: %5.2f %s", animName.c_str(), onOff, time, blendBar);
|
||||
}
|
||||
else
|
||||
details = plString::Format(" Behavior %2d %3s %s", fIndex, onOff, blendBar);
|
||||
details = plFormat(" Behavior {2} {>3} {}", fIndex, onOff, blendBar);
|
||||
|
||||
debugTxt.DrawString(x, y, details);
|
||||
y += lineHeight;
|
||||
|
@ -443,7 +443,7 @@ void plAvBrainCritter::DumpToDebugDisplay(int& x, int& y, int lineHeight, plDebu
|
||||
// extract the name from the behavior running
|
||||
plString mode = "Mode: Unknown";
|
||||
if (fBehaviors[fCurMode])
|
||||
mode = plString::Format("Mode: %s", ((CritterBehavior*)(fBehaviors[fCurMode]))->Name().c_str());
|
||||
mode = plFormat("Mode: {}", ((CritterBehavior*)(fBehaviors[fCurMode]))->Name());
|
||||
|
||||
// draw it
|
||||
debugTxt.DrawString(x, y, mode);
|
||||
|
@ -267,11 +267,11 @@ void plClothingItem::Write(hsStream *s, hsResMgr *mgr)
|
||||
plKey accessoryKey = nil;
|
||||
if (!fAccessoryName.IsEmpty())
|
||||
{
|
||||
plString strBuf = plString::Format("CItm_%s", fAccessoryName.c_str());
|
||||
plString strBuf = plFormat("CItm_{}", fAccessoryName);
|
||||
accessoryKey = plKeyFinder::Instance().StupidSearch("GlobalClothing", "", plClothingItem::Index(), strBuf);
|
||||
if (accessoryKey == nil)
|
||||
{
|
||||
strBuf = plString::Format("Couldn't find accessory \"%s\". It won't show at runtime.", fAccessoryName.c_str());
|
||||
strBuf = plFormat("Couldn't find accessory \"{}\". It won't show at runtime.", fAccessoryName);
|
||||
hsMessageBox(strBuf.c_str(), GetKeyName().c_str(), hsMessageBoxNormal);
|
||||
}
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ bool plAvOneShotTask::Start(plArmatureMod *avatar, plArmatureBrain *brain, doubl
|
||||
}
|
||||
else
|
||||
{
|
||||
plString buf = plString::Format("Oneshot: Can't find animation <%s>; all bets are off.", fAnimName.c_str());
|
||||
plString buf = plFormat("Oneshot: Can't find animation <{}>; all bets are off.", fAnimName);
|
||||
hsAssert(false, buf.c_str());
|
||||
result = true;
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ plCoopCoordinator::plCoopCoordinator(plKey host, plKey guest,
|
||||
|
||||
serial = serial % 999;
|
||||
|
||||
plString newName = plString::Format("%s%s%3i\x000", host->GetName().c_str(), guest->GetName().c_str(), serial++);
|
||||
plString newName = plFormat("{}{}{3}\x000", host->GetName(), guest->GetName(), serial++);
|
||||
|
||||
plKey newKey = hsgResMgr::ResMgr()->NewKey(newName, this, host->GetUoid().GetLocation());
|
||||
|
||||
|
@ -290,7 +290,7 @@ bool IIsClosestAnim(const char *animName, hsMatrix44 &sitGoal, float &closestDis
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
hsAssert(false, plString::Format("Missing sit animation: %s", animName).c_str());
|
||||
hsAssert(false, plFormat("Missing sit animation: {}", animName).c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user