From 33d0eeff0c4406efb9e4587844d135e93a7ab737 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Oct 2006 03:52:11 +0000 Subject: [PATCH] same style code path for BGAnimation as sprite and model --- stepmania/src/ActorUtil.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 9c01747238..0f8781ef7d 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -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: {