Process FT_Xml as legacy actors

Everything from here on out is edge cases.
This commit is contained in:
Devin J. Pohly
2013-10-13 17:44:25 -04:00
parent 60ce34cfaa
commit 77ece5a414
3 changed files with 38 additions and 2 deletions
+7 -1
View File
@@ -2,6 +2,7 @@
#include "Foreground.h"
#include "RageUtil.h"
#include "GameState.h"
#include "PrefsManager.h"
#include "RageTextureManager.h"
#include "ActorUtil.h"
#include "Song.h"
@@ -34,13 +35,18 @@ void Foreground::LoadFromSong( const Song *pSong )
{
const BackgroundChange &change = *bgc;
RString sBGName = change.m_def.m_sFile1,
sLuaFile = pSong->GetSongDir() + sBGName + "/default.lua";
sLuaFile = pSong->GetSongDir() + sBGName + "/default.lua",
sXmlFile = pSong->GetSongDir() + sBGName + "/default.xml";
LoadedBGA bga;
if ( DoesFileExist( sLuaFile ) )
{
bga.m_bga = ActorUtil::MakeActor( sLuaFile, this );
}
else if ( PREFSMAN->m_bQuirksMode && DoesFileExist( sXmlFile ) )
{
bga.m_bga = ActorUtil::MakeActor( sXmlFile, this );
}
else
{
bga.m_bga = ActorUtil::MakeActor( pSong->GetSongDir() + sBGName, this );