Let sprites disable the odd dimension warning.

This commit is contained in:
Steve Checkoway
2007-03-23 13:47:25 +00:00
parent 809878d816
commit 0b03fffc07
+7
View File
@@ -116,6 +116,11 @@ void Sprite::LoadFromNode( const XNode* pNode )
if( !sPath.empty() && !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) )
ActorUtil::GetAttrPath( pNode, "Texture", sPath );
// HACK. Let Sprites explicitly disable the dimension warning.
bool bDisableDimensionWarning = false;
if( pNode->GetAttrValue("DisableDimensionWarning", bDisableDimensionWarning) && bDisableDimensionWarning )
TEXTUREMAN->DisableOddDimensionWarning();
if( !sPath.empty() )
{
// Load the texture
@@ -207,6 +212,8 @@ void Sprite::LoadFromNode( const XNode* pNode )
}
}
if( bDisableDimensionWarning )
TEXTUREMAN->EnableOddDimensionWarning();
Actor::LoadFromNode( pNode );
}