From d1adfc68043af564888ceb1ce7ec24f450968efa Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 17 Jan 2005 01:32:45 +0000 Subject: [PATCH] load default.xml instead of BGAnimation.ini if available --- stepmania/src/ActorUtil.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 4c10887163..b793c7f6ca 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -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 {