diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index 382b946360..e04d1ab0c4 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -29,13 +29,13 @@ static bool CompareLayerNames( const CString& s1, const CString& s2 ) return i1 < i2; } -void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini ) +void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const XNode *pNode ) { const CString& sAniDir = _sAniDir; { vector vsLayerNames; - FOREACH_CONST_Child( &ini, pLayer ) + FOREACH_CONST_Child( pNode, pLayer ) { if( strncmp(pLayer->m_sName, "Layer", 5) == 0 ) vsLayerNames.push_back( pLayer->m_sName ); @@ -47,7 +47,7 @@ void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& i FOREACH_CONST( CString, vsLayerNames, s ) { const CString &sLayer = *s; - const XNode* pKey = ini.GetChild( sLayer ); + const XNode* pKey = pNode->GetChild( sLayer ); ASSERT( pKey ); CString sImportDir; @@ -74,7 +74,7 @@ void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& i IniFile ini2; ini2.ReadFile( sPathToIni ); - AddLayersFromAniDir( sImportDir, ini2 ); + AddLayersFromAniDir( sImportDir, &ini2 ); } else { @@ -108,7 +108,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir ) IniFile ini; ini.ReadFile( sPathToIni ); - AddLayersFromAniDir( sAniDir, ini ); // TODO: Check for circular load + AddLayersFromAniDir( sAniDir, &ini ); // TODO: Check for circular load XNode* pBGAnimation = ini.GetChild( "BGAnimation" ); XNode dummy; diff --git a/stepmania/src/BGAnimation.h b/stepmania/src/BGAnimation.h index a2b0ca4383..2a1b2e39e9 100644 --- a/stepmania/src/BGAnimation.h +++ b/stepmania/src/BGAnimation.h @@ -6,7 +6,6 @@ #include "ActorScroller.h" struct XNode; -class IniFile; class BGAnimation : public ActorScrollerAutoDeleteChildren { @@ -18,7 +17,7 @@ public: void LoadFromNode( const CString& sDir, const XNode* pNode ); protected: - void AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini ); + void AddLayersFromAniDir( const CString &_sAniDir, const XNode *pNode ); }; #endif