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

Fix additional issues from review

This commit is contained in:
2012-11-16 17:32:33 -08:00
parent c68724765b
commit 3e92022db2
19 changed files with 45 additions and 46 deletions

View File

@ -197,7 +197,7 @@ void plDrawableSpans::Write( hsStream* s, hsResMgr* mgr )
hsUNIXStream log;
log.Open("log\\GBuf.log", "ab");
char buf[256];
sprintf(buf, "Drawable Span: %s, GroupNum: %u\r\n", GetKeyName(), i);
sprintf(buf, "Drawable Span: %s, GroupNum: %u\r\n", GetKeyName().c_str(), i);
log.WriteString(buf);
log.Close();
#endif
@ -387,7 +387,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
statusLog->AddLineF("From obj <%s> mat <%s> size %d bytes grp=%d (%d offset)",
geo->fMaxOwner.c_str("<unknown>"),
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
geo->GetVertexSize(geo->fFormat) * geo->fNumVerts + sizeof(uint16_t) * geo->fNumIndices,
span->fGroupIdx,
ptr
@ -405,7 +405,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
{
statusLog->AddLineF("Instanced obj <%s> mat <%s> grp=%d (%d/%d/%d/%d/%d/%d/%d/%d)",
geo->fMaxOwner.c_str("<unknown>"),
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
span->fGroupIdx,
span->fVBufferIdx,
span->fCellIdx,
@ -424,7 +424,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
{
statusLog->AddLineF("From obj <%s> mat <%s> size %d bytes grp=%d (%d/%d/%d/%d/%d)",
geo->fMaxOwner.c_str("<unknown>"),
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
geo->GetVertexSize(geo->fFormat) * geo->fNumVerts + sizeof(uint16_t) * geo->fNumIndices,
span->fGroupIdx,
span->fVBufferIdx,
@ -438,7 +438,7 @@ static void ILogSpan(plStatusLog* statusLog, plGeometrySpan* geo, plVertexSpan*
{
statusLog->AddLineF("Instanced obj <%s> mat <%s> grp=%d (%d/%d/%d/%d/%d)",
geo->fMaxOwner.c_str("<unknown>"),
geo->fMaterial ? geo->fMaterial->GetKey()->GetName().c_str() : "<unknown>",
geo->fMaterial ? geo->fMaterial->GetKeyName().c_str() : "<unknown>",
span->fGroupIdx,
span->fVBufferIdx,
span->fCellIdx,

View File

@ -114,7 +114,7 @@ void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat
#ifdef MF_NOSHADOW_ACC
// TESTHACKERY FOLLOWS - GlassesNoShadow
uint32_t noShadHack = 0;
if( mesh->GetKey() && (strstr(mesh->GetKey()->GetName(), "lasses") || strstr(mesh->GetKey()->GetName(), "oggles")) )
if( mesh->GetKey() && (mesh->GetKey()->GetName().Find("lasses") >= 0 || mesh->GetKey()->GetName().Find("oggles") >= 0) )
noShadHack = plGeometrySpan::kPropNoShadowCast;
#endif // MF_NOSHADOW_ACC

View File

@ -158,8 +158,8 @@ hsGMaterial* plProxyGen::IMakeProxyMaterial() const
hsGMaterial* retVal = new hsGMaterial();
plString buff;
if( !GetKey()->GetName().IsNull() )
buff = plString::Format("%s_Material", GetKey()->GetName().c_str());
if( !GetKeyName().IsNull() )
buff = plString::Format("%s_Material", GetKeyName().c_str());
else
buff = "ProxyMaterial";
hsgResMgr::ResMgr()->NewKey( buff, retVal, GetKey() ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
@ -233,8 +233,8 @@ void plProxyGen::IGenerateProxy()
if( fProxyDrawables[idx] && !fProxyDrawables[idx]->GetKey() )
{
plString buff;
if( !GetKey()->GetName().IsNull() )
buff = plString::Format("%s_ProxyDrawable", GetKey()->GetName().c_str());
if( !GetKeyName().IsNull() )
buff = plString::Format("%s_ProxyDrawable", GetKeyName().c_str());
else
buff = "ProxyDrawable";