full actor support in Foreground

This commit is contained in:
Glenn Maynard
2005-02-25 06:45:07 +00:00
parent a7e4836149
commit b0ff5081ab
2 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -1,10 +1,11 @@
#include "global.h" #include "global.h"
#include "Foreground.h" #include "Foreground.h"
#include "BGAnimation.h"
#include "RageUtil.h" #include "RageUtil.h"
#include "IniFile.h" #include "IniFile.h"
#include "GameState.h" #include "GameState.h"
#include "RageTextureManager.h" #include "RageTextureManager.h"
#include "ActorUtil.h"
#include "song.h"
Foreground::~Foreground() 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() ); RageException::Throw( "The song foreground BGA \"%s\" is not a directory", sAniDir.c_str() );
LoadedBGA bga; LoadedBGA bga;
bga.m_bga = new BGAnimation; bga.m_bga = ActorUtil::MakeActor( sAniDir );
bga.m_bga->LoadFromAniDir( sAniDir );
bga.m_bga->PlayCommand( "On" ); bga.m_bga->PlayCommand( "On" );
bga.m_fStartBeat = change.m_fStartBeat; bga.m_fStartBeat = change.m_fStartBeat;
+2 -3
View File
@@ -2,9 +2,8 @@
#define FOREGROUND_H #define FOREGROUND_H
#include "ActorFrame.h" #include "ActorFrame.h"
#include "song.h"
class BGAnimation;
class Song;
class Foreground: public ActorFrame class Foreground: public ActorFrame
{ {
public: public:
@@ -20,7 +19,7 @@ protected:
void LoadFromAniDir( CString sAniDir ); void LoadFromAniDir( CString sAniDir );
struct LoadedBGA struct LoadedBGA
{ {
BGAnimation *m_bga; Actor *m_bga;
float m_fStartBeat; float m_fStartBeat;
float m_fStopBeat; float m_fStopBeat;
}; };