scattered ActorUtil::ResolvePath calls unneeded
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user