1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Fix several errors and warnings from GCC compilation

This commit is contained in:
2012-02-09 00:56:03 -08:00
parent e6ebf7ffaf
commit ad66286a17
78 changed files with 318 additions and 331 deletions

View File

@ -312,7 +312,7 @@ void plAGMasterMod::DumpAniGraph(const char *justThisChannel, bool optimized, do
plMatrixChannel *topChannel = plMatrixChannel::ConvertNoRef(channel);
if(topChannel)
{
hsStatusMessageF("AGModifier: <%s>", mod->GetChannelName());
hsStatusMessageF("AGModifier: <%s>", mod->GetChannelName().c_str());
topChannel->Dump(1, optimized, time);
}
}
@ -718,7 +718,7 @@ hsBool plAGMasterMod::MsgReceive(plMessage* msg)
if (genRefMsg->fType == kPrivateAnim)
{
plAnimVector::iterator i = fPrivateAnims.begin();
for (i; i != fPrivateAnims.end(); i++)
for ( ; i != fPrivateAnims.end(); i++)
{
plAGAnim *currAnim = *i;

View File

@ -2652,7 +2652,7 @@ int plArmatureMod::RefreshDebugDisplay()
void plArmatureMod::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt)
{
sprintf(strBuf, "Armature <%s>:", fRootName);
sprintf(strBuf, "Armature <%s>:", fRootName.c_str());
debugTxt.DrawString(x, y, strBuf, 255, 128, 128);
y += lineHeight;

View File

@ -135,7 +135,8 @@ bool plAvLadderMod::IIsReadyToClimb()
if (dot >= kTolerance && movingForward)
{
DetectorLogSpecial("%s: Ladder starting climb (%f)", GetKeyName(), hsRadiansToDegrees(acos(dot)));
DetectorLogSpecial("%s: Ladder starting climb (%f)",
GetKeyName().c_str(), hsRadiansToDegrees(acos(dot)));
return true;
}
else if (movingForward)
@ -179,7 +180,7 @@ hsBool plAvLadderMod::MsgReceive(plMessage* msg)
// we can check every frame
if (fAvatarInBox)
{
DetectorLogSpecial("%s: Avatar entered ladder region", GetKeyName());
DetectorLogSpecial("%s: Avatar entered ladder region", GetKeyName().c_str());
if (IIsReadyToClimb())
ITriggerSelf(collMsg->fOtherKey);
@ -188,7 +189,7 @@ hsBool plAvLadderMod::MsgReceive(plMessage* msg)
}
else
{
DetectorLogSpecial("%s: Avatar exited ladder region", GetKeyName());
DetectorLogSpecial("%s: Avatar exited ladder region", GetKeyName().c_str());
plgDispatch::Dispatch()->UnRegisterForExactType(plEvalMsg::Index(), GetKey());
}
@ -215,7 +216,7 @@ hsBool plAvLadderMod::MsgReceive(plMessage* msg)
}
else if (notifyMsg->fID == kNotifyAvatarOnLadder)
{
DetectorLogSpecial("%s: Avatar mounted ladder", GetKeyName());
DetectorLogSpecial("%s: Avatar mounted ladder", GetKeyName().c_str());
fAvatarMounting = false;
}

View File

@ -605,7 +605,7 @@ void plAvatarMgr::AddOneShot(plOneShotMod *oneshot)
{
plString name = oneshot->GetTarget(0)->GetKey()->GetName();
plOneShotMod *alreadyThere = FindOneShot(name);
if ( ! alreadyThere)
{
@ -621,14 +621,14 @@ void plAvatarMgr::RemoveOneShot(plOneShotMod *oneshot)
while (i != fOneShots.end())
{
plString name = (*i).first;
plOneShotMod *thisOneshot = (*i).second;
plString name = i->first;
plOneShotMod *thisOneshot = i->second;
if(oneshot == thisOneshot)
{
i = fOneShots.erase(i);
fOneShots.erase(i++);
} else {
i++;
++i;
}
}
}
@ -637,12 +637,12 @@ void plAvatarMgr::RemoveOneShot(plOneShotMod *oneshot)
plOneShotMod *plAvatarMgr::FindOneShot(const plString &name)
{
plOneShotMap::iterator found = fOneShots.find(name);
if (found == fOneShots.end())
{
return nil;
} else {
return (*found).second;
return found->second;
}
}

View File

@ -170,7 +170,7 @@ void plMatrixChannel::Dump(int indent, bool optimized, double time)
{
indentStr += "- ";
}
hsStatusMessageF("%s matChan<%s>", indentStr.c_str(), fName);
hsStatusMessageF("%s matChan<%s>", indentStr.c_str(), fName.c_str());
}
/////////////////////////////////////////////////////////////////////////////////////////
@ -300,9 +300,9 @@ void plMatrixTimeScale::Dump(int indent, bool optimized, double time)
{
indentStr += "- ";
}
hsStatusMessageF("%s matTimeScale <%s> at time <%f>", indentStr.c_str(), fName, fTimeSource->Value(time, true));
hsStatusMessageF("%s matTimeScale <%s> at time <%f>", indentStr.c_str(), fName.c_str(), fTimeSource->Value(time, true));
fChannelIn->Dump(indent + 1, optimized, time);
}
@ -470,7 +470,7 @@ void plMatrixBlend::Dump(int indent, bool optimized, double time)
{
indentStr += "- ";
}
hsStatusMessageF("%s matBlend<%s>, bias:<%f>", indentStr.c_str(), fName, fChannelBias->Value(time, true));
hsStatusMessageF("%s matBlend<%s>, bias:<%f>", indentStr.c_str(), fName.c_str(), fChannelBias->Value(time, true));
if(optimized)
{
fOptimizedB->Dump(indent + 1, optimized, time);
@ -569,7 +569,7 @@ void plMatrixControllerChannel::Dump(int indent, bool optimized, double time)
{
indentStr += "- ";
}
hsStatusMessageF("%s MatController<%s>", indentStr.c_str(), fName);
hsStatusMessageF("%s MatController<%s>", indentStr.c_str(), fName.c_str());
}
// Write -------------------------------------------------------------