remove LoadFromActorFile overload that's only used in one place

This commit is contained in:
Glenn Maynard
2005-01-16 19:52:41 +00:00
parent 5057144536
commit 9ff1834076
2 changed files with 12 additions and 18 deletions
+12 -17
View File
@@ -22,22 +22,6 @@
#include "arch/Dialog/Dialog.h"
Actor* LoadFromActorFile( const CString &sIniPath, const CString &sLayer )
{
// TODO: Check for recursive loading
IniFile ini;
if( !ini.ReadFile( sIniPath ) )
RageException::Throw( "%s", ini.GetError().c_str() );
CString sDir = Dirname( sIniPath );
const XNode* pLayer = ini.GetChild(sLayer);
if( pLayer == NULL )
RageException::Throw( "The file '%s' doesn't have layer '%s'.", sIniPath.c_str(), sLayer.c_str() );
return LoadFromActorFile( sDir, *pLayer );
}
Actor* LoadFromActorFile( const CString& sAniDir, const XNode& layer )
{
Actor* pActor = NULL; // fill this in before we return
@@ -309,7 +293,18 @@ Actor* MakeActor( const RageTextureID &ID )
}
else if( sExt=="actor" )
{
return LoadFromActorFile( ID.filename );
// TODO: Check for recursive loading
IniFile ini;
if( !ini.ReadFile( ID.filename ) )
RageException::Throw( "%s", ini.GetError().c_str() );
CString sDir = Dirname( ID.filename );
const XNode* pLayer = ini.GetChild( "Actor" );
if( pLayer == NULL )
RageException::Throw( "The file '%s' doesn't have layer 'Actor'.", ID.filename.c_str() );
return LoadFromActorFile( sDir, *pLayer );
}
else if( sExt=="png" ||
sExt=="jpg" ||