sScreenName -> sType

This commit is contained in:
Chris Danford
2005-02-23 22:21:39 +00:00
parent b1a7e15042
commit 5ed6736eef
2 changed files with 17 additions and 17 deletions
+5 -5
View File
@@ -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() );
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 );
@@ -347,10 +347,10 @@ void ActorUtil::RunCommand( Actor& actor, const CString &sScreenName, const CStr
else
{
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
View File
@@ -30,24 +30,24 @@ namespace ActorUtil
void SetXY( Actor& actor, const CString &sScreenName );
inline void SetXY( Actor* pActor, const CString &sScreenName ) { SetXY( *pActor, sScreenName ); }
void SetXY( Actor& actor, const CString &sType );
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 OffCommand( Actor& actor, const CString &sScreenName ) { RunCommand( actor, sScreenName, "Off" ); }
inline void SetXYAndOnCommand( Actor& actor, const CString &sScreenName )
inline void OnCommand( Actor& actor, const CString &sType ) { RunCommand( actor, sType, "On" ); }
inline void OffCommand( Actor& actor, const CString &sType ) { RunCommand( actor, sType, "Off" ); }
inline void SetXYAndOnCommand( Actor& actor, const CString &sType )
{
SetXY( actor, sScreenName );
OnCommand( actor, sScreenName );
SetXY( actor, sType );
OnCommand( actor, sType );
}
/* convenience */
inline void RunCommand( Actor* pActor, const CString &sScreenName, const CString &sCommandName ) { if(pActor) RunCommand( *pActor, sScreenName, sCommandName ); }
inline void OnCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) OnCommand( *pActor, sScreenName ); }
inline void OffCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) OffCommand( *pActor, sScreenName ); }
inline void SetXYAndOnCommand( Actor* pActor, const CString &sScreenName ) { if(pActor) SetXYAndOnCommand( *pActor, sScreenName ); }
inline void RunCommand( Actor* pActor, const CString &sType, const CString &sCommandName ) { if(pActor) RunCommand( *pActor, sType, sCommandName ); }
inline void OnCommand( Actor* pActor, const CString &sType ) { if(pActor) OnCommand( *pActor, sType ); }
inline void OffCommand( Actor* pActor, const CString &sType ) { if(pActor) OffCommand( *pActor, sType ); }
inline void SetXYAndOnCommand( Actor* pActor, const CString &sType ) { if(pActor) SetXYAndOnCommand( *pActor, sType ); }
// Return a Sprite, BitmapText, or Model depending on the file type
Actor* LoadFromActorFile( const CString& sAniDir, const XNode* pNode );