remove LoadFromActorFile overload that's only used in one place
This commit is contained in:
+12
-17
@@ -22,22 +22,6 @@
|
|||||||
#include "arch/Dialog/Dialog.h"
|
#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* LoadFromActorFile( const CString& sAniDir, const XNode& layer )
|
||||||
{
|
{
|
||||||
Actor* pActor = NULL; // fill this in before we return
|
Actor* pActor = NULL; // fill this in before we return
|
||||||
@@ -309,7 +293,18 @@ Actor* MakeActor( const RageTextureID &ID )
|
|||||||
}
|
}
|
||||||
else if( sExt=="actor" )
|
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" ||
|
else if( sExt=="png" ||
|
||||||
sExt=="jpg" ||
|
sExt=="jpg" ||
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ inline void UtilOffCommand( Actor* pActor, const CString &sScreenName ) { if(pAc
|
|||||||
inline void UtilSetXYAndOnCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) UtilSetXYAndOnCommand( *pActor, sScreenName ); }
|
inline void UtilSetXYAndOnCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) UtilSetXYAndOnCommand( *pActor, sScreenName ); }
|
||||||
|
|
||||||
// Return a Sprite, BitmapText, or Model depending on the file type
|
// Return a Sprite, BitmapText, or Model depending on the file type
|
||||||
Actor* LoadFromActorFile( const CString &sIniPath, const CString &sLayer = "Actor" );
|
|
||||||
Actor* LoadFromActorFile( const CString& sAniDir, const XNode& layer );
|
Actor* LoadFromActorFile( const CString& sAniDir, const XNode& layer );
|
||||||
Actor* MakeActor( const RageTextureID &ID );
|
Actor* MakeActor( const RageTextureID &ID );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user