From 352b8d2f5c7da63e24447bbfcb3feea0d82f25e8 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 24 Mar 2007 03:13:05 +0000 Subject: [PATCH] Only disable odd dimension warning when loading song backgrounds. --- stepmania/src/Sprite.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index c62a188aa6..a059a7889b 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -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 )