1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Fix the rest of the plString::Format calls

This commit is contained in:
2014-05-28 18:49:50 -07:00
parent fb8c81b587
commit 5c6b6bbc7c
16 changed files with 64 additions and 59 deletions

View File

@ -2664,9 +2664,8 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugTe
hsMatrix44 l2w = SO->GetLocalToWorld();
hsPoint3 worldPos = l2w.GetTranslate();
const char *opaque = IsOpaque() ? "yes" : "no";
debugTxt.DrawString(x, y, plString::Format("position(world): %.2f, %.2f, %.2f Opaque: %3s",
worldPos.fX, worldPos.fY, worldPos.fZ, opaque));
debugTxt.DrawString(x, y, plFormat("position(world): {.2f}, {.2f}, {.2f} Opaque: {>3}",
worldPos.fX, worldPos.fY, worldPos.fZ, IsOpaque() ? "yes" : "no"));
y += lineHeight;
const char* frozen = "n.a.";
@ -2687,8 +2686,8 @@ void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugTe
hsPoint3 physPos;
GetPositionAndRotationSim(&physPos, nil);
const hsVector3& vel = fController->GetLinearVelocity();
details = plString::Format("position(physical): <%.2f, %.2f, %.2f> velocity: <%5.2f, %5.2f, %5.2f>",
physPos.fX, physPos.fY, physPos.fZ, vel.fX, vel.fY, vel.fZ);
details = plFormat("position(physical): <{.2f}, {.2f}, {.2f}> velocity: <{5.2f}, {5.2f}, {5.2f}>",
physPos.fX, physPos.fY, physPos.fZ, vel.fX, vel.fY, vel.fZ);
}
else
{
@ -2796,7 +2795,7 @@ void plArmatureMod::DebugDumpMoveKeys(int &x, int &y, int lineHeight, plDebugTex
plAvatarInputInterface::GetInstance()->GetInputMapName()));
y += lineHeight;
debugTxt.DrawString(x, y, plString::Format("Turn strength: %.2f (key: %.2f, analog: %.2f)",
debugTxt.DrawString(x, y, plFormat("Turn strength: {.2f} (key: {.2f}, analog: {.2f})",
GetTurnStrength(), GetKeyTurnStrength(), GetAnalogTurnStrength()));
y += lineHeight;

View File

@ -105,16 +105,15 @@ void plArmatureBehavior::DumpDebug(int &x, int &y, int lineHeight, plDebugText &
{
float strength = GetStrength();
const char *onOff = strength > 0 ? "on" : "off";
char blendBar[11] = "||||||||||";
char blendBar[] = "||||||||||";
int bars = (int)min(10 * strength, 10);
blendBar[bars] = '\0';
plString details;
if (fAnim)
{
plString animName = fAnim->GetName();
float time = fAnim->GetTimeConvert()->CurrentAnimTime();
details = plString::Format("%20s %3s time: %5.2f %s", animName.c_str(), onOff, time, blendBar);
details = plFormat("{>20} {>3} time: {5.2f} {}", fAnim->GetName(), onOff, time, blendBar);
}
else
details = plFormat(" Behavior {2} {>3} {}", fIndex, onOff, blendBar);

View File

@ -903,7 +903,7 @@ void plAvBrainHuman::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugT
const char *grounded = fWalkingStrategy->IsOnGround() ? "yes" : "no";
const char *pushing = (fWalkingStrategy->GetPushingPhysical() ? (fWalkingStrategy->GetFacingPushingPhysical() ? "facing" : "behind") : "none");
debugTxt.DrawString(x, y, plString::Format("Ground: %3s, AirTime: %5.2f (Peak: %5.2f), PushingPhys: %6s",
debugTxt.DrawString(x, y, plFormat("Ground: {>3}, AirTime: {5.2f} (Peak: {5.2f}), PushingPhys: {>6}",
grounded, fWalkingStrategy->GetAirTime(), fWalkingStrategy->GetImpactTime(), pushing));
y += lineHeight;

View File

@ -619,11 +619,11 @@ void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugTe
y += lineHeight;
float buoy = fSwimStrategy ? fSwimStrategy->GetBuoyancy() : 0.0f;
debugTxt.DrawString(x, y, plString::Format("Distance to surface: %f Buoyancy: %f", fSurfaceDistance, buoy));
debugTxt.DrawString(x, y, plFormat("Distance to surface: {f} Buoyancy: {f}", fSurfaceDistance, buoy));
y += lineHeight;
hsVector3 linV = fAvMod->GetController()->GetAchievedLinearVelocity();
debugTxt.DrawString(x, y, plString::Format("Linear Velocity: (%5.2f, %5.2f, %5.2f)", linV.fX, linV.fY, linV.fZ));
debugTxt.DrawString(x, y, plFormat("Linear Velocity: ({5.2f}, {5.2f}, {5.2f})", linV.fX, linV.fY, linV.fZ));
y += lineHeight;
int i;