mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Convert plUoid's object name to a plString
This commit is contained in:
@ -132,11 +132,11 @@ plLayer* hsGMaterial::MakeBaseLayer()
|
||||
|
||||
hsAssert(GetKey(), "All materials need a key (or temp key)");
|
||||
|
||||
char buff[256];
|
||||
if( GetKey()->GetName() )
|
||||
sprintf(buff, "%s_%s", GetKey()->GetName(), "Layer");
|
||||
plString buff;
|
||||
if( !GetKey()->GetName().IsNull() )
|
||||
buff = plString::Format("%s_Layer", GetKey()->GetName().c_str());
|
||||
else
|
||||
strcpy(buff, "Layer");
|
||||
buff = _TEMP_CONVERT_FROM_LITERAL("Layer");
|
||||
hsgResMgr::ResMgr()->NewKey( buff, newLay, GetKey() != nil ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
|
||||
|
||||
// Add layer so we have it now.
|
||||
@ -278,7 +278,7 @@ void hsGMaterial::Read(hsStream *stream, hsResMgr *group)
|
||||
|
||||
void hsGMaterial::Eval(double secs, UInt32 frame)
|
||||
{
|
||||
plProfile_BeginLap(MaterialAnims, GetKeyName());
|
||||
plProfile_BeginLap(MaterialAnims, GetKeyName().c_str());
|
||||
|
||||
int i;
|
||||
for( i = 0; i < GetNumLayers(); i++ )
|
||||
@ -292,7 +292,7 @@ void hsGMaterial::Eval(double secs, UInt32 frame)
|
||||
fPiggyBacks[i]->Eval(secs, frame, 0);
|
||||
}
|
||||
|
||||
plProfile_EndLap(MaterialAnims, GetKeyName());
|
||||
plProfile_EndLap(MaterialAnims, GetKeyName().c_str());
|
||||
}
|
||||
|
||||
void hsGMaterial::Reset()
|
||||
|
@ -226,8 +226,7 @@ void plGrassShaderMod::ISetupShaders()
|
||||
if (!fVShader)
|
||||
{
|
||||
plShader* vShader = TRACKED_NEW plShader;
|
||||
char buff[256];
|
||||
sprintf(buff, "%s_GrassVS", GetKey()->GetName());
|
||||
plString buff = plString::Format("%s_GrassVS", GetKey()->GetName().c_str());
|
||||
hsgResMgr::ResMgr()->NewKey(buff, vShader, GetKey()->GetUoid().GetLocation());
|
||||
vShader->SetIsPixelShader(false);
|
||||
vShader->SetInputFormat(1);
|
||||
@ -250,8 +249,7 @@ void plGrassShaderMod::ISetupShaders()
|
||||
if (!fPShader)
|
||||
{
|
||||
plShader* pShader = TRACKED_NEW plShader;
|
||||
char buff[256];
|
||||
sprintf(buff, "%s_GrassPS", GetKey()->GetName());
|
||||
plString buff = plString::Format("%s_GrassPS", GetKey()->GetName().c_str());
|
||||
hsgResMgr::ResMgr()->NewKey(buff, pShader, GetKey()->GetUoid().GetLocation());
|
||||
pShader->SetIsPixelShader(true);
|
||||
pShader->SetNumConsts(0);
|
||||
|
Reference in New Issue
Block a user