|
|
@ -2281,34 +2281,42 @@ void plSimpleStateVariable::DumpToObjectDebugger(bool dirtyOnly, int level) cons |
|
|
|
|
|
|
|
|
|
|
|
plString pad = plString::Fill(level * 3, ' '); |
|
|
|
plString pad = plString::Fill(level * 3, ' '); |
|
|
|
|
|
|
|
|
|
|
|
plString logMsg = plFormat("{}SimpleVar, name:{}[{}]", pad, GetName(), GetCount()); |
|
|
|
plStringStream logMsg; |
|
|
|
|
|
|
|
logMsg << pad << "SimpleVar, name:" << GetName() << '[' << GetCount() << ']'; |
|
|
|
|
|
|
|
|
|
|
|
if (GetCount()>1) |
|
|
|
if (GetCount()>1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
dbg->LogMsg(logMsg.c_str()); // it's going to be a long msg, so print it on its own line
|
|
|
|
dbg->LogMsg(logMsg.GetString().c_str()); // it's going to be a long msg, so print it on its own line
|
|
|
|
logMsg = ""; |
|
|
|
logMsg.Truncate(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pad += "\t"; |
|
|
|
pad += "\t"; |
|
|
|
for (size_t i=0; i<GetCount(); i++) |
|
|
|
for (size_t i=0; i<GetCount(); i++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
logMsg << pad; |
|
|
|
|
|
|
|
logMsg << "Var:" << i; |
|
|
|
|
|
|
|
|
|
|
|
plString s=GetAsString(i); |
|
|
|
plString s=GetAsString(i); |
|
|
|
if (fVar.GetAtomicType() == plVarDescriptor::kTime) |
|
|
|
if (fVar.GetAtomicType() == plVarDescriptor::kTime) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const char* p=fT[i].PrintWMillis(); |
|
|
|
logMsg << " gameTime:" << s; |
|
|
|
logMsg += plFormat("{}Var:{} gameTime:{} pst:{} ts:{}", |
|
|
|
logMsg << " pst:" << fT[i].PrintWMillis(); |
|
|
|
pad, i, s, p, fTimeStamp.Format("%c")); |
|
|
|
logMsg << " ts:" << fTimeStamp.Format("%c").c_str(); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
logMsg += plFormat("{}Var:{} value:{} ts:{}", |
|
|
|
logMsg << " value:" << s; |
|
|
|
pad, i, s, fTimeStamp.AtEpoch() ? "0" : fTimeStamp.Format("%c")); |
|
|
|
logMsg << " ts:" << (fTimeStamp.AtEpoch() ? "0" : fTimeStamp.Format("%c").c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ( !dirtyOnly ) |
|
|
|
if (!dirtyOnly) |
|
|
|
logMsg += plFormat(" dirty:{}", IsDirty()); |
|
|
|
{ |
|
|
|
|
|
|
|
logMsg << " dirty:"; |
|
|
|
|
|
|
|
logMsg << (IsDirty() ? 0 : 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dbg->LogMsg(logMsg.c_str()); |
|
|
|
dbg->LogMsg(logMsg.GetString().c_str()); |
|
|
|
logMsg = ""; |
|
|
|
logMsg.Truncate(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2316,34 +2324,42 @@ void plSimpleStateVariable::DumpToStream(hsStream* stream, bool dirtyOnly, int l |
|
|
|
{ |
|
|
|
{ |
|
|
|
plString pad = plString::Fill(level * 3, ' '); |
|
|
|
plString pad = plString::Fill(level * 3, ' '); |
|
|
|
|
|
|
|
|
|
|
|
plString logMsg = plFormat("{}SimpleVar, name:{}[{}]", pad, GetName(), GetCount()); |
|
|
|
plStringStream logMsg; |
|
|
|
|
|
|
|
logMsg << pad << "SimpleVar, name:" << GetName() << '[' << GetCount() << ']'; |
|
|
|
|
|
|
|
|
|
|
|
if (GetCount()>1) |
|
|
|
if (GetCount()>1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
stream->WriteString(logMsg); // it's going to be a long msg, so print it on its own line
|
|
|
|
stream->WriteString(logMsg.GetString()); // it's going to be a long msg, so print it on its own line
|
|
|
|
logMsg = ""; |
|
|
|
logMsg.Truncate(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pad += "\t"; |
|
|
|
pad += "\t"; |
|
|
|
for (size_t i=0; i<GetCount(); i++) |
|
|
|
for (size_t i=0; i<GetCount(); i++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
plString s=GetAsString(i); |
|
|
|
logMsg << pad; |
|
|
|
|
|
|
|
logMsg << "Var:" << i; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plString s = GetAsString(i); |
|
|
|
if (fVar.GetAtomicType() == plVarDescriptor::kTime) |
|
|
|
if (fVar.GetAtomicType() == plVarDescriptor::kTime) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const char* p=fT[i].PrintWMillis(); |
|
|
|
logMsg << " gameTime:" << s; |
|
|
|
logMsg += plFormat("{}Var:{} gameTime:{} pst:{} ts:{}", |
|
|
|
logMsg << " pst:" << fT[i].PrintWMillis(); |
|
|
|
pad, i, s, p, fTimeStamp.Format("%c")); |
|
|
|
logMsg << " ts:" << fTimeStamp.Format("%c").c_str(); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
logMsg += plFormat("{}Var:{} value:{} ts:{}", |
|
|
|
logMsg << " value:" << s; |
|
|
|
pad, i, s, fTimeStamp.AtEpoch() ? "0" : fTimeStamp.Format("%c")); |
|
|
|
logMsg << " ts:" << (fTimeStamp.AtEpoch() ? "0" : fTimeStamp.Format("%c").c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ( !dirtyOnly ) |
|
|
|
if (!dirtyOnly) |
|
|
|
logMsg += plFormat(" dirty:{}", IsDirty()); |
|
|
|
{ |
|
|
|
|
|
|
|
logMsg << " dirty:"; |
|
|
|
|
|
|
|
logMsg << (IsDirty() ? 0 : 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stream->WriteString(logMsg); |
|
|
|
stream->WriteString(logMsg.GetString()); |
|
|
|
logMsg = ""; |
|
|
|
logMsg.Truncate(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|