scattered ActorUtil::ResolvePath calls unneeded
This commit is contained in:
@@ -24,11 +24,8 @@ void ActorSound::LoadFromNode( const XNode* pNode )
|
|||||||
|
|
||||||
RString sFile;
|
RString sFile;
|
||||||
if( ActorUtil::GetAttrPath(pNode, "File", sFile) )
|
if( ActorUtil::GetAttrPath(pNode, "File", sFile) )
|
||||||
{
|
|
||||||
ActorUtil::ResolvePath( sFile, ActorUtil::GetWhere(pNode) );
|
|
||||||
Load( sFile );
|
Load( sFile );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// lua start
|
// lua start
|
||||||
#include "LuaBinding.h"
|
#include "LuaBinding.h"
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ void DifficultyIcon::LoadFromNode( const XNode* pNode )
|
|||||||
if( !ActorUtil::GetAttrPath(pNode, "File", sFile) )
|
if( !ActorUtil::GetAttrPath(pNode, "File", sFile) )
|
||||||
RageException::Throw( "%s: DifficultyIcon: missing the \"File\" attribute.", ActorUtil::GetWhere(pNode).c_str() );
|
RageException::Throw( "%s: DifficultyIcon: missing the \"File\" attribute.", ActorUtil::GetWhere(pNode).c_str() );
|
||||||
|
|
||||||
ActorUtil::ResolvePath( sFile, ActorUtil::GetWhere(pNode) );
|
|
||||||
|
|
||||||
Load( sFile );
|
Load( sFile );
|
||||||
|
|
||||||
// skip Sprite::LoadFromNode
|
// skip Sprite::LoadFromNode
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ void MeterDisplay::LoadFromNode( const XNode* pNode )
|
|||||||
if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) )
|
if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) )
|
||||||
RageException::Throw( "%s: MeterDisplay: missing the \"StreamPath\" attribute", ActorUtil::GetWhere(pNode).c_str() );
|
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.Load( sStreamPath );
|
||||||
m_sprStream->SetZoomX( m_fStreamWidth / m_sprStream->GetUnzoomedWidth() );
|
m_sprStream->SetZoomX( m_fStreamWidth / m_sprStream->GetUnzoomedWidth() );
|
||||||
this->AddChild( m_sprStream );
|
this->AddChild( m_sprStream );
|
||||||
|
|||||||
@@ -108,14 +108,15 @@ void Sprite::Load( RageTextureID ID )
|
|||||||
|
|
||||||
void Sprite::LoadFromNode( const XNode* pNode )
|
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;
|
RString sPath;
|
||||||
|
pNode->GetAttrValue( "Texture", sPath );
|
||||||
|
if( !sPath.empty() && !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) )
|
||||||
ActorUtil::GetAttrPath( pNode, "Texture", sPath );
|
ActorUtil::GetAttrPath( pNode, "Texture", sPath );
|
||||||
|
|
||||||
if( !sPath.empty() )
|
if( !sPath.empty() )
|
||||||
{
|
{
|
||||||
if( !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) )
|
|
||||||
ActorUtil::ResolvePath( sPath, ActorUtil::GetWhere(pNode) );
|
|
||||||
|
|
||||||
// Load the texture
|
// Load the texture
|
||||||
LoadFromTexture( sPath );
|
LoadFromTexture( sPath );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user