AutoActor::LoadFromNode

This commit is contained in:
Glenn Maynard
2005-02-26 09:55:34 +00:00
parent 32fc206f48
commit b003670ff3
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -16,6 +16,13 @@ void AutoActor::Load( const CString &sPath )
m_pActor = ActorUtil::MakeActor( sPath );
}
void AutoActor::LoadFromNode( const CString &sDir, const XNode* pNode )
{
Unload();
m_pActor = ActorUtil::LoadFromActorFile( sDir, pNode );
}
void AutoActor::LoadAndSetName( const CString &sScreenName, const CString &sActorName )
{
Load( THEME->GetPathG(sScreenName,sActorName) );
+2
View File
@@ -4,6 +4,7 @@
#define AutoActor_H
class Actor;
struct XNode;
// creates the appropriate Actor derivitive on load and
// automatically deletes Actor on deconstruction.
@@ -19,6 +20,7 @@ public:
void Unload();
bool IsLoaded() const { return m_pActor != NULL; }
void Load( const CString &sPath );
void LoadFromNode( const CString &sDir, const XNode* pNode );
void LoadAndSetName( const CString &sScreenName, const CString &sActorName );
protected: