allow xml loading for backgrounds
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include "ThemeMetric.h"
|
#include "ThemeMetric.h"
|
||||||
#include "PlayerState.h"
|
#include "PlayerState.h"
|
||||||
#include "Command.h"
|
#include "Command.h"
|
||||||
|
#include "ActorUtil.h"
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
@@ -160,6 +161,12 @@ Actor *Background::CreateSongBGA( CString sBGName ) const
|
|||||||
GetDirListing( m_pSong->GetSongDir()+sBGName, asFiles, true, true );
|
GetDirListing( m_pSong->GetSongDir()+sBGName, asFiles, true, true );
|
||||||
if( !asFiles.empty() )
|
if( !asFiles.empty() )
|
||||||
{
|
{
|
||||||
|
/* If default.xml exists, use the regular generic actor load. However,
|
||||||
|
* if it's an old BGAnimation.ini, load it ourself so we can set bGeneric
|
||||||
|
* to false. */
|
||||||
|
if( DoesFileExist(asFiles[0] + "/default.xml") )
|
||||||
|
return ActorUtil::MakeActor( asFiles[0] );
|
||||||
|
|
||||||
pTempBGA = new BGAnimation;
|
pTempBGA = new BGAnimation;
|
||||||
pTempBGA->LoadFromAniDir( asFiles[0], false );
|
pTempBGA->LoadFromAniDir( asFiles[0], false );
|
||||||
return pTempBGA;
|
return pTempBGA;
|
||||||
|
|||||||
Reference in New Issue
Block a user