same style code path for BGAnimation as sprite and model

This commit is contained in:
Glenn Maynard
2006-10-14 03:52:11 +00:00
parent bf7da90f59
commit 33d0eeff0c
+7 -8
View File
@@ -2,7 +2,6 @@
#include "ActorUtil.h"
#include "Sprite.h"
#include "Model.h"
#include "BGAnimation.h"
#include "ThemeManager.h"
#include "RageFileManager.h"
#include "RageLog.h"
@@ -397,13 +396,6 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor
RString sDir = Dirname( sPath );
switch( ft )
{
case FT_Directory:
{
sDir = sPath;
BGAnimation *pBGA = new BGAnimation;
pBGA->LoadFromAniDir( sDir );
return pBGA;
}
case FT_Xml:
{
XNode xml;
@@ -431,6 +423,13 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor
Actor *pRet = ActorUtil::LoadFromNode( pNode.get() );
return pRet;
}
case FT_Directory:
{
XNode xml;
xml.AppendAttr( "AniDir", sPath );
return ActorUtil::Create( "BGAnimation", &xml, pParentActor );
}
case FT_Bitmap:
case FT_Movie:
{