diff --git a/stepmania/src/Foreground.cpp b/stepmania/src/Foreground.cpp index 3aa666e8d7..901b3af036 100644 --- a/stepmania/src/Foreground.cpp +++ b/stepmania/src/Foreground.cpp @@ -1,10 +1,11 @@ #include "global.h" #include "Foreground.h" -#include "BGAnimation.h" #include "RageUtil.h" #include "IniFile.h" #include "GameState.h" #include "RageTextureManager.h" +#include "ActorUtil.h" +#include "song.h" Foreground::~Foreground() { @@ -38,8 +39,7 @@ void Foreground::LoadFromSong( const Song *pSong ) RageException::Throw( "The song foreground BGA \"%s\" is not a directory", sAniDir.c_str() ); LoadedBGA bga; - bga.m_bga = new BGAnimation; - bga.m_bga->LoadFromAniDir( sAniDir ); + bga.m_bga = ActorUtil::MakeActor( sAniDir ); bga.m_bga->PlayCommand( "On" ); bga.m_fStartBeat = change.m_fStartBeat; diff --git a/stepmania/src/Foreground.h b/stepmania/src/Foreground.h index ad6afa766d..35f5969df8 100644 --- a/stepmania/src/Foreground.h +++ b/stepmania/src/Foreground.h @@ -2,9 +2,8 @@ #define FOREGROUND_H #include "ActorFrame.h" -#include "song.h" -class BGAnimation; +class Song; class Foreground: public ActorFrame { public: @@ -20,7 +19,7 @@ protected: void LoadFromAniDir( CString sAniDir ); struct LoadedBGA { - BGAnimation *m_bga; + Actor *m_bga; float m_fStartBeat; float m_fStopBeat; };