From 3d921291819dcffa132cdd064b290f420a8e7385 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 2 Apr 2005 00:24:31 +0000 Subject: [PATCH] revert loading of .inis. Don't encourage use of .inis when .xml will do. --- stepmania/src/ActorUtil.cpp | 8 -------- stepmania/src/BGAnimation.cpp | 16 +++------------- stepmania/src/BGAnimation.h | 1 - 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 78db1e6730..d52c433023 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -270,14 +270,6 @@ Actor* ActorUtil::MakeActor( const RageTextureID &ID ) CString sDir = Dirname( ID.filename ); return LoadFromActorFile( sDir, &xml ); } - else if( sExt=="ini" ) - { - IniFile ini; - BGAnimation *pBGA = new BGAnimation; - CString sDir = Dirname( ID.filename ); - pBGA->LoadFromIni( sDir, ID.filename ); - return pBGA; - } else if( sExt=="actor" ) { // TODO: Check for recursive loading diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index 7c0ed780d2..56141c1317 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -106,6 +106,8 @@ void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& i void BGAnimation::LoadFromAniDir( const CString &_sAniDir, bool bGeneric ) { + Unload(); + if( _sAniDir.empty() ) return; @@ -113,21 +115,9 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir, bool bGeneric ) if( sAniDir.Right(1) != "/" ) sAniDir += "/"; - CString sPathToIni = sAniDir + "BGAnimation.ini"; - - LoadFromIni( sAniDir, sPathToIni, bGeneric ); -} - -void BGAnimation::LoadFromIni( const CString &_sDir, const CString &sPathToIni, bool bGeneric ) -{ - Unload(); - - CString sAniDir = _sDir; - if( sAniDir.Right(1) != "/" ) - sAniDir += "/"; - ASSERT_M( IsADirectory(sAniDir), sAniDir + " isn't a directory" ); + CString sPathToIni = sAniDir + "BGAnimation.ini"; if( DoesFileExist(sPathToIni) ) { diff --git a/stepmania/src/BGAnimation.h b/stepmania/src/BGAnimation.h index 9d08101120..6b1a4891d6 100644 --- a/stepmania/src/BGAnimation.h +++ b/stepmania/src/BGAnimation.h @@ -19,7 +19,6 @@ public: void Unload(); void LoadFromAniDir( const CString &sAniDir, bool bGeneric=true ); - void LoadFromIni( const CString &sDir, const CString &sPathToIni, bool bGeneric=true ); void LoadFromNode( const CString& sDir, const XNode* pNode ); protected: