Only disable odd dimension warning when loading song backgrounds.

This commit is contained in:
Steve Checkoway
2007-03-24 03:13:05 +00:00
parent 867fc6e7fb
commit 352b8d2f5c
+2 -8
View File
@@ -116,11 +116,6 @@ 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
@@ -212,9 +207,6 @@ void Sprite::LoadFromNode( const XNode* pNode )
}
}
if( bDisableDimensionWarning )
TEXTUREMAN->EnableOddDimensionWarning();
Actor::LoadFromNode( pNode );
}
@@ -978,7 +970,9 @@ public:
static int LoadBackground( T* p, lua_State *L )
{
RageTextureID ID( SArg(1) );
TEXTUREMAN->DisableOddDimensionWarning();
p->Load( Sprite::SongBGTexture(ID) );
TEXTUREMAN->EnableOddDimensionWarning();
return 1;
}
static int LoadBanner( T* p, lua_State *L )