sScreenName -> sType
This commit is contained in:
@@ -325,13 +325,13 @@ Actor* ActorUtil::MakeActor( const RageTextureID &ID )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActorUtil::SetXY( Actor& actor, const CString &sScreenName )
|
void ActorUtil::SetXY( Actor& actor, const CString &sType )
|
||||||
{
|
{
|
||||||
ASSERT( !actor.GetID().empty() );
|
ASSERT( !actor.GetID().empty() );
|
||||||
actor.SetXY( THEME->GetMetricF(sScreenName,actor.GetID()+"X"), THEME->GetMetricF(sScreenName,actor.GetID()+"Y") );
|
actor.SetXY( THEME->GetMetricF(sType,actor.GetID()+"X"), THEME->GetMetricF(sType,actor.GetID()+"Y") );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActorUtil::RunCommand( Actor& actor, const CString &sScreenName, const CString &sCommandName )
|
void ActorUtil::RunCommand( Actor& actor, const CString &sType, const CString &sCommandName )
|
||||||
{
|
{
|
||||||
actor.PlayCommand( sCommandName );
|
actor.PlayCommand( sCommandName );
|
||||||
|
|
||||||
@@ -347,10 +347,10 @@ void ActorUtil::RunCommand( Actor& actor, const CString &sScreenName, const CStr
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ASSERT_M( !actor.GetID().empty(), ssprintf("!actor.GetID().empty() ('%s', '%s')",
|
ASSERT_M( !actor.GetID().empty(), ssprintf("!actor.GetID().empty() ('%s', '%s')",
|
||||||
sScreenName.c_str(), sCommandName.c_str()) );
|
sType.c_str(), sCommandName.c_str()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
actor.RunCommands( THEME->GetMetricA(sScreenName,actor.GetID()+sCommandName+"Command") );
|
actor.RunCommands( THEME->GetMetricA(sType,actor.GetID()+sCommandName+"Command") );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+12
-12
@@ -30,24 +30,24 @@ namespace ActorUtil
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SetXY( Actor& actor, const CString &sScreenName );
|
void SetXY( Actor& actor, const CString &sType );
|
||||||
inline void SetXY( Actor* pActor, const CString &sScreenName ) { SetXY( *pActor, sScreenName ); }
|
inline void SetXY( Actor* pActor, const CString &sType ) { SetXY( *pActor, sType ); }
|
||||||
|
|
||||||
void RunCommand( Actor& actor, const CString &sScreenName, const CString &sCommandName );
|
void RunCommand( Actor& actor, const CString &sType, const CString &sCommandName );
|
||||||
|
|
||||||
inline void OnCommand( Actor& actor, const CString &sScreenName ) { RunCommand( actor, sScreenName, "On" ); }
|
inline void OnCommand( Actor& actor, const CString &sType ) { RunCommand( actor, sType, "On" ); }
|
||||||
inline void OffCommand( Actor& actor, const CString &sScreenName ) { RunCommand( actor, sScreenName, "Off" ); }
|
inline void OffCommand( Actor& actor, const CString &sType ) { RunCommand( actor, sType, "Off" ); }
|
||||||
inline void SetXYAndOnCommand( Actor& actor, const CString &sScreenName )
|
inline void SetXYAndOnCommand( Actor& actor, const CString &sType )
|
||||||
{
|
{
|
||||||
SetXY( actor, sScreenName );
|
SetXY( actor, sType );
|
||||||
OnCommand( actor, sScreenName );
|
OnCommand( actor, sType );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convenience */
|
/* convenience */
|
||||||
inline void RunCommand( Actor* pActor, const CString &sScreenName, const CString &sCommandName ) { if(pActor) RunCommand( *pActor, sScreenName, sCommandName ); }
|
inline void RunCommand( Actor* pActor, const CString &sType, const CString &sCommandName ) { if(pActor) RunCommand( *pActor, sType, sCommandName ); }
|
||||||
inline void OnCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) OnCommand( *pActor, sScreenName ); }
|
inline void OnCommand( Actor* pActor, const CString &sType ) { if(pActor) OnCommand( *pActor, sType ); }
|
||||||
inline void OffCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) OffCommand( *pActor, sScreenName ); }
|
inline void OffCommand( Actor* pActor, const CString &sType ) { if(pActor) OffCommand( *pActor, sType ); }
|
||||||
inline void SetXYAndOnCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) SetXYAndOnCommand( *pActor, sScreenName ); }
|
inline void SetXYAndOnCommand( Actor* pActor, const CString &sType ) { if(pActor) SetXYAndOnCommand( *pActor, sType ); }
|
||||||
|
|
||||||
// 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& sAniDir, const XNode* pNode );
|
Actor* LoadFromActorFile( const CString& sAniDir, const XNode* pNode );
|
||||||
|
|||||||
Reference in New Issue
Block a user