load default.xml instead of BGAnimation.ini if available

This commit is contained in:
Chris Danford
2005-01-17 01:32:45 +00:00
parent 8771872ac7
commit d1adfc6804
+16 -3
View File
@@ -287,9 +287,22 @@ Actor* MakeActor( const RageTextureID &ID )
/* Do this last, to avoid the IsADirectory in most cases. */
else if( IsADirectory(ID.filename) )
{
BGAnimation *pBGA = new BGAnimation;
pBGA->LoadFromAniDir( ID.filename );
return pBGA;
const CString& sDir = ID.filename;
CString sIni = sDir + "BGAnimation.ini";
CString sXml = sDir + "default.xml";
if( DoesFileExist(sXml) )
{
XNode xml;
xml.LoadFromFile( sXml );
return LoadFromActorFile( sDir, xml );
}
else
{
BGAnimation *pBGA = new BGAnimation;
pBGA->LoadFromAniDir( sDir );
return pBGA;
}
}
else
{