Reconnect legacy sprites

This commit is contained in:
Devin J. Pohly
2014-02-20 10:59:50 -05:00
parent cd526b8e44
commit 60ce34cfaa
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -8,6 +8,7 @@
#include "EnumHelper.h"
#include "XmlFile.h"
#include "XmlFileUtil.h"
#include "IniFile.h"
#include "LuaManager.h"
#include "Foreach.h"
#include "Song.h"
@@ -329,6 +330,18 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, Actor *pParentActor )
return ActorUtil::LoadFromNode( &xml, pParentActor );
}
case FT_Sprite:
{
// Legacy actor; only supported in quirks mode
if( !PREFSMAN->m_bQuirksMode )
return new Actor;
IniFile ini;
ini.ReadFile( sPath );
XmlFileUtil::AnnotateXNodeTree( &ini, sPath );
return ActorUtil::LoadFromNode( ini.GetChild("Sprite"), pParentActor );
}
case FT_Model:
{
XNode xml;
@@ -499,6 +512,8 @@ FileType ActorUtil::GetFileType( const RString &sPath )
sExt=="flv" ||
sExt=="f4v" ||
sExt=="mpg" ) return FT_Movie;
else if(
sExt=="sprite" ) return FT_Sprite;
else if(
sExt=="txt" ) return FT_Model;
else if( sPath.size() > 0 && sPath[sPath.size()-1] == '/' )
+1
View File
@@ -331,6 +331,7 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun
LOG->Warn( "CreateBackground() Unknown file type '%s'", vsResolved[0].c_str() );
// fall through
case FT_Bitmap:
case FT_Sprite:
case FT_Movie:
sEffect = SBE_StretchNormal;
break;