scattered ActorUtil::ResolvePath calls unneeded

This commit is contained in:
Glenn Maynard
2006-10-15 01:46:23 +00:00
parent 4ebd0192db
commit 2478ec0873
4 changed files with 5 additions and 11 deletions
-3
View File
@@ -24,10 +24,7 @@ void ActorSound::LoadFromNode( const XNode* pNode )
RString sFile;
if( ActorUtil::GetAttrPath(pNode, "File", sFile) )
{
ActorUtil::ResolvePath( sFile, ActorUtil::GetWhere(pNode) );
Load( sFile );
}
}
// lua start
-2
View File
@@ -47,8 +47,6 @@ void DifficultyIcon::LoadFromNode( const XNode* pNode )
if( !ActorUtil::GetAttrPath(pNode, "File", sFile) )
RageException::Throw( "%s: DifficultyIcon: missing the \"File\" attribute.", ActorUtil::GetWhere(pNode).c_str() );
ActorUtil::ResolvePath( sFile, ActorUtil::GetWhere(pNode) );
Load( sFile );
// skip Sprite::LoadFromNode
-2
View File
@@ -42,8 +42,6 @@ void MeterDisplay::LoadFromNode( const XNode* pNode )
if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) )
RageException::Throw( "%s: MeterDisplay: missing the \"StreamPath\" attribute", ActorUtil::GetWhere(pNode).c_str() );
ActorUtil::ResolvePath( sStreamPath, ActorUtil::GetWhere(pNode) );
m_sprStream.Load( sStreamPath );
m_sprStream->SetZoomX( m_fStreamWidth / m_sprStream->GetUnzoomedWidth() );
this->AddChild( m_sprStream );
+5 -4
View File
@@ -108,14 +108,15 @@ void Sprite::Load( RageTextureID ID )
void Sprite::LoadFromNode( const XNode* pNode )
{
/* Texture may refer to the ID of a render target; if it's already registered,
* use it without trying ot resolve it. */
RString sPath;
ActorUtil::GetAttrPath( pNode, "Texture", sPath );
pNode->GetAttrValue( "Texture", sPath );
if( !sPath.empty() && !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) )
ActorUtil::GetAttrPath( pNode, "Texture", sPath );
if( !sPath.empty() )
{
if( !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) )
ActorUtil::ResolvePath( sPath, ActorUtil::GetWhere(pNode) );
// Load the texture
LoadFromTexture( sPath );