Restore quirks mode check for .ini files.

This commit is contained in:
Jason Felds
2011-05-20 22:43:54 -04:00
parent 78043121a2
commit 5371303a1d
+21 -12
View File
@@ -103,18 +103,27 @@ void BGAnimation::LoadFromAniDir( const RString &_sAniDir )
if( DoesFileExist(sPathToIni) )
{
// This is a 3.9-style BGAnimation (using .ini)
IniFile ini;
ini.ReadFile( sPathToIni );
AddLayersFromAniDir( sAniDir, &ini ); // TODO: Check for circular load
XNode* pBGAnimation = ini.GetChild( "BGAnimation" );
XNode dummy( "BGAnimation" );
if( pBGAnimation == NULL )
pBGAnimation = &dummy;
LoadFromNode( pBGAnimation );
if( PREFSMAN->m_bQuirksMode )
{
// This is a 3.9-style BGAnimation (using .ini)
IniFile ini;
ini.ReadFile( sPathToIni );
AddLayersFromAniDir( sAniDir, &ini ); // TODO: Check for circular load
XNode* pBGAnimation = ini.GetChild( "BGAnimation" );
XNode dummy( "BGAnimation" );
if( pBGAnimation == NULL )
pBGAnimation = &dummy;
LoadFromNode( pBGAnimation );
}
else
{
XNode dummy( "BGAnimation" );
XNode *pBG = &dummy;
LoadFromNode( pBG );
}
}
else
{