From 295ab135b9c7375eecc03cb602ae95173b4a3579 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 9 Oct 2006 07:48:52 +0000 Subject: [PATCH] ActorUtil::GetAttrPath --- stepmania/src/BGAnimationLayer.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index bfc2722470..a3c775dd0e 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -473,16 +473,15 @@ void BGAnimationLayer::LoadFromNode( const RString& sDir, const XNode* pNode ) case TYPE_PARTICLES: { RString sFile; - pNode->GetAttrValue( "File", sFile ); + ActorUtil::GetAttrPath( pNode, "File", sFile ); FixSlashesInPlace( sFile ); - RString sPath = sAniDir+sFile; - CollapsePath( sPath ); + CollapsePath( sFile ); for( int i=0; iAddChild( pActor ); @@ -504,14 +503,13 @@ void BGAnimationLayer::LoadFromNode( const RString& sDir, const XNode* pNode ) case TYPE_TILES: { RString sFile; - pNode->GetAttrValue( "File", sFile ); + ActorUtil::GetAttrPath( pNode, "File", sFile ); FixSlashesInPlace( sFile ); - RString sPath = sAniDir+sFile; - CollapsePath( sPath ); + CollapsePath( sFile ); AutoActor s; - s.Load( sPath ); + s.Load( sFile ); if( m_fTilesSpacingX == -1 ) m_fTilesSpacingX = s->GetUnzoomedWidth(); if( m_fTilesSpacingY == -1 ) @@ -521,7 +519,7 @@ void BGAnimationLayer::LoadFromNode( const RString& sDir, const XNode* pNode ) unsigned NumSprites = m_iNumTilesWide * m_iNumTilesHigh; for( unsigned i=0; iAddChild( pSprite ); pSprite->SetTextureWrapping( true ); // gets rid of some "cracks" pSprite->SetZoom( randomf(fZoomMin,fZoomMax) );