diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index bc12ce626f..0ac1f16e6f 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -13,10 +13,10 @@ #include "Foreach.h" -BGAnimation::BGAnimation( bool Generic ) +BGAnimation::BGAnimation( bool bGeneric ) { /* See BGAnimationLayer::BGAnimationLayer for explanation. */ - m_bGeneric = Generic; + m_bGeneric = bGeneric; } BGAnimation::~BGAnimation() @@ -50,7 +50,7 @@ static bool CompareLayerNames( const CString& s1, const CString& s2 ) return i1 < i2; } -void AddLayersFromAniDir( const CString &_sAniDir, vector &layersAddTo, bool Generic ) +void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, vector &layersAddTo ) { if( _sAniDir.empty() ) return; @@ -105,12 +105,12 @@ void AddLayersFromAniDir( const CString &_sAniDir, vector &layersAddTo, // import a whole BGAnimation sImportDir = sAniDir + sImportDir; CollapsePath( sImportDir ); - AddLayersFromAniDir( sImportDir, layersAddTo, Generic ); + AddLayersFromAniDir( sImportDir, layersAddTo ); } else { // import as a single layer - BGAnimationLayer* pLayer = new BGAnimationLayer( Generic ); + BGAnimationLayer* pLayer = new BGAnimationLayer( m_bGeneric ); pLayer->LoadFromNode( sAniDir, *pKey ); layersAddTo.push_back( pLayer ); } @@ -136,7 +136,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir ) if( DoesFileExist(sPathToIni) ) { // This is a new style BGAnimation (using .ini) - AddLayersFromAniDir( sAniDir, m_SubActors, m_bGeneric ); // TODO: Check for circular load + AddLayersFromAniDir( sAniDir, m_SubActors ); // TODO: Check for circular load IniFile ini; ini.ReadFile( sPathToIni ); diff --git a/stepmania/src/BGAnimation.h b/stepmania/src/BGAnimation.h index cd2d8173cd..26e28eb1b0 100644 --- a/stepmania/src/BGAnimation.h +++ b/stepmania/src/BGAnimation.h @@ -24,6 +24,7 @@ public: void LoadFromNode( const CString &sDir, const XNode& node ); protected: + void AddLayersFromAniDir( const CString &_sAniDir, vector &layersAddTo ); bool m_bGeneric; }; diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index b9eda4d544..8c43eae380 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -29,32 +29,14 @@ const float SPIRAL_MIN_ZOOM = 0.3f; #define FullScreenRectF RectF(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) -BGAnimationLayer::BGAnimationLayer( bool Generic ) +BGAnimationLayer::BGAnimationLayer( bool bGeneric ) { - /* If Generic is false, this is a layer in a real BGA--one that was loaded - * by simply constructing a BGAnimation. These normally have a position - * of 0,0 (top-left of the screen). Loaded images are given a default position - * of 320x240, centered in the screen. Additionally, the "On" command will - * be run automatically. Example: - * - * BGAnimation bga; - * bga.Load( path ); - * this->AddChind( &bga ); - * - * If Generic is true, then we act like any other actor. We assume we don't - * know anything about where we're positioned. Loaded images are given a - * default position of 0x0. The "On" command is not run; we'll receive that - * from the owner through COMMAND(). Example: - * - * AutoActor image; - * image.Load( path ); - * ON_COMMAND( image ); - * this->AddChind( &image ); - * - * TYPE_PARTICLES and TYPE_TILES are currently not supported in this mode. - * + /* + * If Generic is false, this is a layer in a real BGA--one that was loaded + * by simply constructing a BGAnimation. In this mode, loaded images are given + * a default position of SCREEN_CENTER_X, SCREEN_CENTER_Y. */ - m_bGeneric = Generic; + m_bGeneric = bGeneric; Init(); }