LoadFromNode(sDir, pNode) -> LoadFromNode(pNode)

This commit is contained in:
Glenn Maynard
2006-10-09 08:24:10 +00:00
parent f1ca420069
commit e11914d4bb
68 changed files with 132 additions and 132 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ Actor::Actor( const Actor &cpy ):
* initialization (eg. ActorFrame loading children). However, it * initialization (eg. ActorFrame loading children). However, it
* also loads input variables, which should happen first. The * also loads input variables, which should happen first. The
* former is more important. */ * former is more important. */
void Actor::LoadFromNode( const RString& sDir, const XNode* pNode ) void Actor::LoadFromNode( const XNode* pNode )
{ {
Lua *L = LUA->Get(); Lua *L = LUA->Get();
FOREACH_CONST_Child( pNode, pChild ) FOREACH_CONST_Child( pNode, pChild )
+1 -1
View File
@@ -58,7 +58,7 @@ public:
virtual ~Actor(); virtual ~Actor();
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual void InitState(); virtual void InitState();
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
bool IsType( const RString &sType ); bool IsType( const RString &sType );
static void SetBGMTime( float fTime, float fBeat ); static void SetBGMTime( float fTime, float fBeat );
+5 -5
View File
@@ -74,12 +74,12 @@ void ActorFrame::InitState()
Actor::InitState(); Actor::InitState();
} }
void ActorFrame::LoadFromNode( const RString& sDir, const XNode* pNode ) void ActorFrame::LoadFromNode( const XNode* pNode )
{ {
if( AutoLoadChildren() ) if( AutoLoadChildren() )
LoadChildrenFromNode( sDir, pNode ); LoadChildrenFromNode( pNode );
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
pNode->GetAttrValue( "UpdateRate", m_fUpdateRate ); pNode->GetAttrValue( "UpdateRate", m_fUpdateRate );
pNode->GetAttrValue( "FOV", m_fFOV ); pNode->GetAttrValue( "FOV", m_fFOV );
@@ -88,7 +88,7 @@ void ActorFrame::LoadFromNode( const RString& sDir, const XNode* pNode )
m_bOverrideLighting = pNode->GetAttrValue( "Lighting", m_bLighting ); m_bOverrideLighting = pNode->GetAttrValue( "Lighting", m_bLighting );
} }
void ActorFrame::LoadChildrenFromNode( const RString& sDir, const XNode* pNode ) void ActorFrame::LoadChildrenFromNode( const XNode* pNode )
{ {
// Shouldn't be calling this unless we're going to delete our children. // Shouldn't be calling this unless we're going to delete our children.
ASSERT( m_bDeleteChildren ); ASSERT( m_bDeleteChildren );
@@ -101,7 +101,7 @@ void ActorFrame::LoadChildrenFromNode( const RString& sDir, const XNode* pNode )
{ {
FOREACH_CONST_Child( pChildren, pChild ) FOREACH_CONST_Child( pChildren, pChild )
{ {
Actor* pChildActor = ActorUtil::LoadFromNode( sDir, pChild, this ); Actor* pChildActor = ActorUtil::LoadFromNode( pChild, this );
if( pChildActor ) if( pChildActor )
AddChild( pChildActor ); AddChild( pChildActor );
} }
+2 -2
View File
@@ -13,7 +13,7 @@ public:
virtual ~ActorFrame(); virtual ~ActorFrame();
virtual void InitState(); virtual void InitState();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual void AddChild( Actor* pActor ); virtual void AddChild( Actor* pActor );
@@ -68,7 +68,7 @@ public:
void RunCommands( const apActorCommands& cmds ) { this->RunCommands( *cmds ); } // convenience void RunCommands( const apActorCommands& cmds ) { this->RunCommands( *cmds ); } // convenience
protected: protected:
void LoadChildrenFromNode( const RString& sDir, const XNode* pNode ); void LoadChildrenFromNode( const XNode* pNode );
vector<Actor*> m_SubActors; vector<Actor*> m_SubActors;
bool m_bPropagateCommands; bool m_bPropagateCommands;
+2 -2
View File
@@ -25,9 +25,9 @@ void ActorProxy::DrawPrimitives()
} }
} }
void ActorProxy::LoadFromNode( const RString& sDir, const XNode* pNode ) void ActorProxy::LoadFromNode( const XNode* pNode )
{ {
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
} }
// lua start // lua start
+1 -1
View File
@@ -15,7 +15,7 @@ public:
virtual bool EarlyAbortDraw() const; virtual bool EarlyAbortDraw() const;
virtual void DrawPrimitives(); virtual void DrawPrimitives();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
Actor *GetTarget() { return m_pActorTarget; } Actor *GetTarget() { return m_pActorTarget; }
+2 -2
View File
@@ -111,9 +111,9 @@ float ActorScroller::GetSecondsToDestination() const
return fTotalItemsToMove * m_fSecondsPerItem; return fTotalItemsToMove * m_fSecondsPerItem;
} }
void ActorScroller::LoadFromNode( const RString &sDir, const XNode *pNode ) void ActorScroller::LoadFromNode( const XNode *pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
Load2(); Load2();
+1 -1
View File
@@ -27,7 +27,7 @@ public:
void PositionItems(); void PositionItems();
void LoadFromNode( const RString &sDir, const XNode *pNode ); void LoadFromNode( const XNode *pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void SetLoop( bool bLoop ) { m_bLoop = bLoop; } void SetLoop( bool bLoop ) { m_bLoop = bLoop; }
+3 -3
View File
@@ -18,14 +18,14 @@ void ActorSound::Play()
SOUNDMAN->PlayCopyOfSound( m_Sound ); SOUNDMAN->PlayCopyOfSound( m_Sound );
} }
void ActorSound::LoadFromNode( const RString& sDir, const XNode* pNode ) void ActorSound::LoadFromNode( const XNode* pNode )
{ {
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
RString sFile; RString sFile;
if( ActorUtil::GetAttrPath(pNode, "File", sFile) || ActorUtil::GetAttrPath(pNode, "Path", sFile) ) /* Path deprecated */ if( ActorUtil::GetAttrPath(pNode, "File", sFile) || ActorUtil::GetAttrPath(pNode, "Path", sFile) ) /* Path deprecated */
{ {
ActorUtil::ResolvePath( sFile, sDir ); ActorUtil::ResolvePath( sFile, ActorUtil::GetWhere(pNode) );
Load( sFile ); Load( sFile );
} }
} }
+1 -1
View File
@@ -14,7 +14,7 @@ public:
void Load( const RString &sPath ); void Load( const RString &sPath );
void Play(); void Play();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
// //
// Lua // Lua
+9 -9
View File
@@ -35,13 +35,13 @@ void ActorUtil::Register( const RString& sClassName, CreateActorFn pfn )
(*g_pmapRegistrees)[sClassName] = pfn; (*g_pmapRegistrees)[sClassName] = pfn;
} }
Actor* ActorUtil::Create( const RString& sClassName, const RString& sDir, const XNode* pNode, Actor *pParentActor ) Actor* ActorUtil::Create( const RString& sClassName, const XNode* pNode, Actor *pParentActor )
{ {
map<RString,CreateActorFn>::iterator iter = g_pmapRegistrees->find( sClassName ); map<RString,CreateActorFn>::iterator iter = g_pmapRegistrees->find( sClassName );
ASSERT_M( iter != g_pmapRegistrees->end(), ssprintf("Actor '%s' is not registered.",sClassName.c_str()) ); ASSERT_M( iter != g_pmapRegistrees->end(), ssprintf("Actor '%s' is not registered.",sClassName.c_str()) );
CreateActorFn pfn = iter->second; CreateActorFn pfn = iter->second;
return (*pfn)( sDir, pNode, pParentActor ); return (*pfn)( pNode, pParentActor );
} }
void ActorUtil::ResolvePath( RString &sPath, const RString &sName ) void ActorUtil::ResolvePath( RString &sPath, const RString &sName )
@@ -175,7 +175,7 @@ void ActorUtil::GetParam( Lua *L, const RString &sName )
} }
} }
Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor *pParentActor ) Actor* ActorUtil::LoadFromNode( const XNode* pNode, Actor *pParentActor )
{ {
ASSERT( pNode ); ASSERT( pNode );
@@ -227,7 +227,7 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor *
if( IsRegistered(sClass) ) if( IsRegistered(sClass) )
{ {
pReturn = ActorUtil::Create( sClass, sDir, pNode, pParentActor ); pReturn = ActorUtil::Create( sClass, pNode, pParentActor );
} }
else // sClass is empty or garbage (e.g. "1" or "0 // 0==Sprite") else // sClass is empty or garbage (e.g. "1" or "0 // 0==Sprite")
{ {
@@ -248,7 +248,7 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor *
goto all_done; goto all_done;
} }
ActorUtil::ResolvePath( sFile, sDir ); ActorUtil::ResolvePath( sFile, GetSourcePath(pNode) );
pReturn = ActorUtil::MakeActor( sFile, pNode, pParentActor ); pReturn = ActorUtil::MakeActor( sFile, pNode, pParentActor );
if( pReturn == NULL ) if( pReturn == NULL )
@@ -422,7 +422,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor
XmlFileUtil::CompileXNodeTree( &xml, sPath ); XmlFileUtil::CompileXNodeTree( &xml, sPath );
AnnotateXMLTree( &xml, sPath ); AnnotateXMLTree( &xml, sPath );
MergeActorXML( &xml, pParent ); MergeActorXML( &xml, pParent );
return ActorUtil::LoadFromNode( sDir, &xml ); return ActorUtil::LoadFromNode( &xml );
} }
case FT_Lua: case FT_Lua:
{ {
@@ -434,7 +434,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor
} }
MergeActorXML( pNode.get(), pParent ); MergeActorXML( pNode.get(), pParent );
Actor *pRet = ActorUtil::LoadFromNode( sDir, pNode.get() ); Actor *pRet = ActorUtil::LoadFromNode( pNode.get() );
return pRet; return pRet;
} }
case FT_Bitmap: case FT_Bitmap:
@@ -443,7 +443,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor
XNode xml( *pParent ); XNode xml( *pParent );
xml.AppendAttr( "Texture", sPath ); xml.AppendAttr( "Texture", sPath );
return ActorUtil::Create( "Sprite", sDir, &xml, pParentActor ); return ActorUtil::Create( "Sprite", &xml, pParentActor );
} }
case FT_Model: case FT_Model:
{ {
@@ -452,7 +452,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor
xml.AppendAttr( "Materials", sPath ); xml.AppendAttr( "Materials", sPath );
xml.AppendAttr( "Bones", sPath ); xml.AppendAttr( "Bones", sPath );
return ActorUtil::Create( "Model", sDir, &xml, pParentActor ); return ActorUtil::Create( "Model", &xml, pParentActor );
} }
default: default:
RageException::Throw("File \"%s\" has unknown type, \"%s\".", RageException::Throw("File \"%s\" has unknown type, \"%s\".",
+5 -5
View File
@@ -8,15 +8,15 @@
class XNode; class XNode;
typedef Actor* (*CreateActorFn)(const RString& sDir, const XNode* pNode, Actor* pParent); typedef Actor* (*CreateActorFn)(const XNode* pNode, Actor* pParent);
// Each Actor class should have a REGISTER_ACTOR_CLASS in its CPP file. // Each Actor class should have a REGISTER_ACTOR_CLASS in its CPP file.
#define REGISTER_ACTOR_CLASS_WITH_NAME( className, externalClassName ) \ #define REGISTER_ACTOR_CLASS_WITH_NAME( className, externalClassName ) \
Actor* Create##className(const RString& sDir, const XNode* pNode, Actor* pParent) { \ Actor* Create##className(const XNode* pNode, Actor* pParent) { \
className *pRet = new className; \ className *pRet = new className; \
if( pParent ) \ if( pParent ) \
pRet->SetParent( pParent ); \ pRet->SetParent( pParent ); \
pRet->LoadFromNode(sDir, pNode); \ pRet->LoadFromNode(pNode); \
return pRet; } \ return pRet; } \
class Register##className { \ class Register##className { \
public: \ public: \
@@ -44,7 +44,7 @@ namespace ActorUtil
{ {
// Every screen should register its class at program initialization. // Every screen should register its class at program initialization.
void Register( const RString& sClassName, CreateActorFn pfn ); void Register( const RString& sClassName, CreateActorFn pfn );
Actor* Create( const RString& sClassName, const RString& sDir, const XNode* pNode, Actor *pParentActor ); Actor* Create( const RString& sClassName, const XNode* pNode, Actor *pParentActor );
apActorCommands ParseActorCommands( const RString &sCommands, const RString &sName = "" ); apActorCommands ParseActorCommands( const RString &sCommands, const RString &sName = "" );
void SetXY( Actor& actor, const RString &sType ); void SetXY( Actor& actor, const RString &sType );
@@ -69,7 +69,7 @@ namespace ActorUtil
inline void SetXYAndOnCommand( Actor* pActor, const RString &sType ) { if(pActor) SetXYAndOnCommand( *pActor, sType ); } inline void SetXYAndOnCommand( Actor* pActor, const RString &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* LoadFromNode( const RString& sAniDir, const XNode* pNode, Actor *pParentActor = NULL ); Actor* LoadFromNode( const XNode* pNode, Actor *pParentActor = NULL );
Actor* MakeActor( const RString &sPath, const XNode *pParent = NULL, Actor *pParentActor = NULL ); Actor* MakeActor( const RString &sPath, const XNode *pParent = NULL, Actor *pParentActor = NULL );
RString GetSourcePath( const XNode *pNode ); RString GetSourcePath( const XNode *pNode );
RString GetWhere( const XNode *pNode ); RString GetWhere( const XNode *pNode );
+2 -2
View File
@@ -43,11 +43,11 @@ void AutoActor::Load( const RString &sPath )
m_pActor = new Actor; m_pActor = new Actor;
} }
void AutoActor::LoadFromNode( const RString &sDir, const XNode* pNode ) void AutoActor::LoadFromNode( const XNode* pNode )
{ {
Unload(); Unload();
m_pActor = ActorUtil::LoadFromNode( sDir, pNode ); m_pActor = ActorUtil::LoadFromNode( pNode );
} }
void AutoActor::LoadAndSetName( const RString &sScreenName, const RString &sActorName ) void AutoActor::LoadAndSetName( const RString &sScreenName, const RString &sActorName )
+1 -1
View File
@@ -23,7 +23,7 @@ public:
bool IsLoaded() const { return m_pActor != NULL; } bool IsLoaded() const { return m_pActor != NULL; }
void Load( Actor *pActor ); void Load( Actor *pActor );
void Load( const RString &sPath ); void Load( const RString &sPath );
void LoadFromNode( const RString &sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void LoadAndSetName( const RString &sScreenName, const RString &sActorName ); void LoadAndSetName( const RString &sScreenName, const RString &sActorName );
protected: protected:
+4 -4
View File
@@ -76,7 +76,7 @@ void BGAnimation::AddLayersFromAniDir( const RString &_sAniDir, const XNode *pNo
{ {
// import as a single layer // import as a single layer
BGAnimationLayer* pLayer = new BGAnimationLayer; BGAnimationLayer* pLayer = new BGAnimationLayer;
pLayer->LoadFromNode( sAniDir, pKey ); pLayer->LoadFromNode( pKey );
this->AddChild( pLayer ); this->AddChild( pLayer );
} }
} }
@@ -111,7 +111,7 @@ void BGAnimation::LoadFromAniDir( const RString &_sAniDir )
if( pBGAnimation == NULL ) if( pBGAnimation == NULL )
pBGAnimation = &dummy; pBGAnimation = &dummy;
LoadFromNode( sAniDir, pBGAnimation ); LoadFromNode( pBGAnimation );
} }
else else
{ {
@@ -142,9 +142,9 @@ void BGAnimation::LoadFromAniDir( const RString &_sAniDir )
} }
} }
void BGAnimation::LoadFromNode( const RString& sDir, const XNode* pNode ) void BGAnimation::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
/* Backwards-compatibility: if a "LengthSeconds" value is present, create a dummy /* Backwards-compatibility: if a "LengthSeconds" value is present, create a dummy
* actor that sleeps for the given length of time. This will extend GetTweenTimeLeft. */ * actor that sleeps for the given length of time. This will extend GetTweenTimeLeft. */
+1 -1
View File
@@ -14,7 +14,7 @@ public:
virtual ~BGAnimation(); virtual ~BGAnimation();
void LoadFromAniDir( const RString &sAniDir ); void LoadFromAniDir( const RString &sAniDir );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
protected: protected:
void AddLayersFromAniDir( const RString &_sAniDir, const XNode *pNode ); void AddLayersFromAniDir( const RString &_sAniDir, const XNode *pNode );
+2 -2
View File
@@ -358,7 +358,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath )
m_SubActors[i]->SetBlendMode( BLEND_ADD ); m_SubActors[i]->SetBlendMode( BLEND_ADD );
} }
void BGAnimationLayer::LoadFromNode( const RString& sDir, const XNode* pNode ) void BGAnimationLayer::LoadFromNode( const XNode* pNode )
{ {
{ {
bool bCond; bool bCond;
@@ -455,7 +455,7 @@ void BGAnimationLayer::LoadFromNode( const RString& sDir, const XNode* pNode )
{ {
case TYPE_SPRITE: case TYPE_SPRITE:
{ {
Actor* pActor = ActorUtil::LoadFromNode( sDir, pNode ); Actor* pActor = ActorUtil::LoadFromNode( pNode );
this->AddChild( pActor ); this->AddChild( pActor );
if( bStretch ) if( bStretch )
pActor->StretchTo( FullScreenRectF ); pActor->StretchTo( FullScreenRectF );
+1 -1
View File
@@ -16,7 +16,7 @@ public:
~BGAnimationLayer(); ~BGAnimationLayer();
void LoadFromAniLayerFile( const RString& sPath ); void LoadFromAniLayerFile( const RString& sPath );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void UpdateInternal( float fDeltaTime ); void UpdateInternal( float fDeltaTime );
bool EarlyAbortDraw() const; bool EarlyAbortDraw() const;
+2 -2
View File
@@ -34,9 +34,9 @@ void BPMDisplay::Load()
SetDiffuse( NORMAL_COLOR ); SetDiffuse( NORMAL_COLOR );
} }
void BPMDisplay::LoadFromNode( const RString &sDir, const XNode *pNode ) void BPMDisplay::LoadFromNode( const XNode *pNode )
{ {
BitmapText::LoadFromNode( sDir, pNode ); BitmapText::LoadFromNode( pNode );
Load(); Load();
} }
+1 -1
View File
@@ -18,7 +18,7 @@ public:
virtual Actor *Copy() const; virtual Actor *Copy() const;
void Load(); void Load();
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
void LoadFromNode( const RString &sDir, const XNode *pNode ); void LoadFromNode( const XNode *pNode );
void SetBpmFromSong( const Song* pSong ); void SetBpmFromSong( const Song* pSong );
void SetBpmFromCourse( const Course* pCourse ); void SetBpmFromCourse( const Course* pCourse );
+2 -2
View File
@@ -95,7 +95,7 @@ BitmapText &BitmapText::operator =( const BitmapText &cpy )
return *this; return *this;
} }
void BitmapText::LoadFromNode( const RString& sDir, const XNode* pNode ) void BitmapText::LoadFromNode( const XNode* pNode )
{ {
RString sText; RString sText;
pNode->GetAttrValue( "Text", sText ); pNode->GetAttrValue( "Text", sText );
@@ -117,7 +117,7 @@ void BitmapText::LoadFromNode( const RString& sDir, const XNode* pNode )
LoadFromFont( THEME->GetPathF( "", sFont ) ); LoadFromFont( THEME->GetPathF( "", sFont ) );
SetText( sText, sAltText ); SetText( sText, sAltText );
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
} }
+1 -1
View File
@@ -16,7 +16,7 @@ public:
BitmapText &operator =( const BitmapText &cpy ); BitmapText &operator =( const BitmapText &cpy );
virtual ~BitmapText(); virtual ~BitmapText();
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
bool LoadFromFont( const RString& sFontName ); bool LoadFromFont( const RString& sFontName );
+2 -2
View File
@@ -19,9 +19,9 @@ ComboGraph::ComboGraph()
m_pMaxComboText = NULL; m_pMaxComboText = NULL;
} }
void ComboGraph::LoadFromNode( const RString& sDir, const XNode* pNode ) void ComboGraph::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
m_pMaxComboText = (BitmapText *) this->GetChild( "MaxComboText" ); m_pMaxComboText = (BitmapText *) this->GetChild( "MaxComboText" );
if( m_pMaxComboText == NULL ) if( m_pMaxComboText == NULL )
+1 -1
View File
@@ -12,7 +12,7 @@ class ComboGraph: public ActorFrame
public: public:
ComboGraph(); ComboGraph();
void Load( const StageStats &s, const PlayerStageStats &pss ); void Load( const StageStats &s, const PlayerStageStats &pss );
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual bool AutoLoadChildren() const { return true; } virtual bool AutoLoadChildren() const { return true; }
+2 -2
View File
@@ -42,9 +42,9 @@ void CourseContentsList::Load()
} }
} }
void CourseContentsList::LoadFromNode( const RString& sDir, const XNode* pNode ) void CourseContentsList::LoadFromNode( const XNode* pNode )
{ {
ActorScroller::LoadFromNode( sDir, pNode ); ActorScroller::LoadFromNode( pNode );
Load(); Load();
} }
+1 -1
View File
@@ -14,7 +14,7 @@ public:
virtual Actor *Copy() const; virtual Actor *Copy() const;
void Load(); void Load();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void SetFromGameState(); void SetFromGameState();
+2 -2
View File
@@ -66,9 +66,9 @@ void CourseEntryDisplay::Load()
this->AddChild( &m_textModifiers ); this->AddChild( &m_textModifiers );
} }
void CourseEntryDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) void CourseEntryDisplay::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
Load(); Load();
} }
+1 -1
View File
@@ -19,7 +19,7 @@ public:
virtual Actor *Copy() const; virtual Actor *Copy() const;
void Load(); void Load();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void SetFromGameState( int iCourseEntryIndex ); void SetFromGameState( int iCourseEntryIndex );
+3 -3
View File
@@ -41,18 +41,18 @@ bool DifficultyIcon::Load( RString sPath )
return true; return true;
} }
void DifficultyIcon::LoadFromNode( const RString& sDir, const XNode* pNode ) void DifficultyIcon::LoadFromNode( const XNode* pNode )
{ {
RString sFile; RString sFile;
if( !ActorUtil::GetAttrPath(pNode, "File", sFile) ) if( !ActorUtil::GetAttrPath(pNode, "File", sFile) )
RageException::Throw( "%s: DifficultyIcon: missing the \"File\" attribute.", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: DifficultyIcon: missing the \"File\" attribute.", ActorUtil::GetWhere(pNode).c_str() );
ActorUtil::ResolvePath( sFile, sDir ); ActorUtil::ResolvePath( sFile, ActorUtil::GetWhere(pNode) );
Load( sFile ); Load( sFile );
// skip Sprite::LoadFromNode // skip Sprite::LoadFromNode
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
} }
void DifficultyIcon::SetPlayer( PlayerNumber pn ) void DifficultyIcon::SetPlayer( PlayerNumber pn )
+1 -1
View File
@@ -18,7 +18,7 @@ public:
virtual bool EarlyAbortDraw() const { return m_bBlank || Sprite::EarlyAbortDraw(); } virtual bool EarlyAbortDraw() const { return m_bBlank || Sprite::EarlyAbortDraw(); }
bool Load( RString sFilePath ); bool Load( RString sFilePath );
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void SetPlayer( PlayerNumber pn ); void SetPlayer( PlayerNumber pn );
+4 -4
View File
@@ -28,9 +28,9 @@ DifficultyList::~DifficultyList()
{ {
} }
void DifficultyList::LoadFromNode( const RString& sDir, const XNode* pNode ) void DifficultyList::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
ITEMS_SPACING_Y.Load( m_sName, "ItemsSpacingY" ); ITEMS_SPACING_Y.Load( m_sName, "ItemsSpacingY" );
NUM_SHOWN_ITEMS.Load( m_sName, "NumShownItems" ); NUM_SHOWN_ITEMS.Load( m_sName, "NumShownItems" );
@@ -45,7 +45,7 @@ void DifficultyList::LoadFromNode( const RString& sDir, const XNode* pNode )
const XNode *pChild = pNode->GetChild( ssprintf("CursorP%i",pn+1) ); const XNode *pChild = pNode->GetChild( ssprintf("CursorP%i",pn+1) );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"CursorP%d\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 ); RageException::Throw( "%s: ComboGraph: missing the node \"CursorP%d\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 );
m_Cursors[pn].LoadFromNode( sDir, pChild ); m_Cursors[pn].LoadFromNode( pChild );
/* Hack: we need to tween cursors both up to down (cursor motion) and visible to /* Hack: we need to tween cursors both up to down (cursor motion) and visible to
* invisible (fading). Cursor motion needs to stoptweening, so multiple motions * invisible (fading). Cursor motion needs to stoptweening, so multiple motions
@@ -56,7 +56,7 @@ void DifficultyList::LoadFromNode( const RString& sDir, const XNode* pNode )
pChild = pNode->GetChild( ssprintf("CursorP%iFrame",pn+1) ); pChild = pNode->GetChild( ssprintf("CursorP%iFrame",pn+1) );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"CursorP%dFrame\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 ); RageException::Throw( "%s: ComboGraph: missing the node \"CursorP%dFrame\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 );
m_CursorFrames[pn].LoadFromNode( sDir, pChild ); m_CursorFrames[pn].LoadFromNode( pChild );
m_CursorFrames[pn].AddChild( m_Cursors[pn] ); m_CursorFrames[pn].AddChild( m_Cursors[pn] );
this->AddChild( &m_CursorFrames[pn] ); this->AddChild( &m_CursorFrames[pn] );
} }
+1 -1
View File
@@ -17,7 +17,7 @@ public:
DifficultyList(); DifficultyList();
virtual ~DifficultyList(); virtual ~DifficultyList();
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
void SetFromGameState(); void SetFromGameState();
void TweenOnScreen(); void TweenOnScreen();
+2 -2
View File
@@ -118,9 +118,9 @@ void DifficultyMeter::Load( const RString &sType )
Unset(); Unset();
} }
void DifficultyMeter::LoadFromNode( const RString& sDir, const XNode* pNode ) void DifficultyMeter::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
RString s; RString s;
pNode->GetAttrValue( "Type", s ); pNode->GetAttrValue( "Type", s );
+1 -1
View File
@@ -22,7 +22,7 @@ public:
void Load( const RString &sType ); void Load( const RString &sType );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void SetFromGameState( PlayerNumber pn ); void SetFromGameState( PlayerNumber pn );
+2 -2
View File
@@ -8,9 +8,9 @@
Actor *DynamicActorScroller::Copy() const { return new DynamicActorScroller(*this); } Actor *DynamicActorScroller::Copy() const { return new DynamicActorScroller(*this); }
void DynamicActorScroller::LoadFromNode( const RString &sDir, const XNode *pNode ) void DynamicActorScroller::LoadFromNode( const XNode *pNode )
{ {
ActorScroller::LoadFromNode( sDir, pNode ); ActorScroller::LoadFromNode( pNode );
/* /*
* All of our children are identical, since they must be interchangeable. * All of our children are identical, since they must be interchangeable.
+1 -1
View File
@@ -10,7 +10,7 @@ class DynamicActorScroller: public ActorScroller
{ {
public: public:
virtual Actor *Copy() const; virtual Actor *Copy() const;
void LoadFromNode( const RString &sDir, const XNode *pNode ); void LoadFromNode( const XNode *pNode );
protected: protected:
virtual void ShiftSubActors( int iDist ); virtual void ShiftSubActors( int iDist );
+7 -7
View File
@@ -151,20 +151,20 @@ GraphDisplay::~GraphDisplay()
SAFE_DELETE( m_pGraphBody ); SAFE_DELETE( m_pGraphBody );
} }
void GraphDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) void GraphDisplay::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
const XNode *pChild = pNode->GetChild( "Body" ); const XNode *pChild = pNode->GetChild( "Body" );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"Body\"", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: ComboGraph: missing the node \"Body\"", ActorUtil::GetWhere(pNode).c_str() );
m_pGraphBody->LoadFromNode( sDir, pChild ); m_pGraphBody->LoadFromNode( pChild );
this->AddChild( m_pGraphBody ); this->AddChild( m_pGraphBody );
pChild = pNode->GetChild( "Texture" ); pChild = pNode->GetChild( "Texture" );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"Texture\"", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: ComboGraph: missing the node \"Texture\"", ActorUtil::GetWhere(pNode).c_str() );
m_sprTexture.LoadFromNode( sDir, pChild ); m_sprTexture.LoadFromNode( pChild );
m_size.x = m_sprTexture->GetUnzoomedWidth(); m_size.x = m_sprTexture->GetUnzoomedWidth();
m_size.y = m_sprTexture->GetUnzoomedHeight(); m_size.y = m_sprTexture->GetUnzoomedHeight();
this->AddChild( m_sprTexture ); this->AddChild( m_sprTexture );
@@ -172,18 +172,18 @@ void GraphDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
pChild = pNode->GetChild( "Line" ); pChild = pNode->GetChild( "Line" );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"Line\"", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: ComboGraph: missing the node \"Line\"", ActorUtil::GetWhere(pNode).c_str() );
m_pGraphLine->LoadFromNode( sDir, pChild ); m_pGraphLine->LoadFromNode( pChild );
this->AddChild( m_pGraphLine ); this->AddChild( m_pGraphLine );
pChild = pNode->GetChild( "SongBoundary" ); pChild = pNode->GetChild( "SongBoundary" );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"SongBoundary\"", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: ComboGraph: missing the node \"SongBoundary\"", ActorUtil::GetWhere(pNode).c_str() );
m_sprSongBoundary.LoadFromNode( sDir, pChild ); m_sprSongBoundary.LoadFromNode( pChild );
pChild = pNode->GetChild( "Barely" ); pChild = pNode->GetChild( "Barely" );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"Barely\"", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: ComboGraph: missing the node \"Barely\"", ActorUtil::GetWhere(pNode).c_str() );
m_sprJustBarely.LoadFromNode( sDir, pChild ); m_sprJustBarely.LoadFromNode( pChild );
} }
void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageStats &pss ) void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageStats &pss )
+1 -1
View File
@@ -14,7 +14,7 @@ public:
GraphDisplay(); GraphDisplay();
~GraphDisplay(); ~GraphDisplay();
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
void LoadFromStageStats( const StageStats &ss, const PlayerStageStats &s ); void LoadFromStageStats( const StageStats &ss, const PlayerStageStats &s );
+2 -2
View File
@@ -49,9 +49,9 @@ GrooveRadar::GrooveRadar()
} }
} }
void GrooveRadar::LoadFromNode( const RString& sDir, const XNode* pNode ) void GrooveRadar::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
void GrooveRadar::TweenOnScreen() void GrooveRadar::TweenOnScreen()
+1 -1
View File
@@ -15,7 +15,7 @@ class GrooveRadar : public ActorFrame
public: public:
GrooveRadar(); GrooveRadar();
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
void SetEmpty( PlayerNumber pn ); void SetEmpty( PlayerNumber pn );
void SetFromRadarValues( PlayerNumber pn, const RadarValues &rv ); void SetFromRadarValues( PlayerNumber pn, const RadarValues &rv );
+2 -2
View File
@@ -25,7 +25,7 @@ void HoldJudgment::Load( const RString &sPath )
this->AddChild( m_sprJudgment ); this->AddChild( m_sprJudgment );
} }
void HoldJudgment::LoadFromNode( const RString& sDir, const XNode* pNode ) void HoldJudgment::LoadFromNode( const XNode* pNode )
{ {
RString sFile; RString sFile;
if( ActorUtil::GetAttrPath(pNode, "File", sFile) ) if( ActorUtil::GetAttrPath(pNode, "File", sFile) )
@@ -35,7 +35,7 @@ void HoldJudgment::LoadFromNode( const RString& sDir, const XNode* pNode )
Load( sFile ); Load( sFile );
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
void HoldJudgment::ResetAnimation() void HoldJudgment::ResetAnimation()
+1 -1
View File
@@ -12,7 +12,7 @@ public:
HoldJudgment(); HoldJudgment();
virtual Actor *Copy() const; virtual Actor *Copy() const;
void Load( const RString &sPath ); void Load( const RString &sPath );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void SetHoldJudgment( HoldNoteScore hns ); void SetHoldJudgment( HoldNoteScore hns );
void LoadFromMultiPlayer( MultiPlayer mp ); void LoadFromMultiPlayer( MultiPlayer mp );
+2 -2
View File
@@ -16,7 +16,7 @@ Judgment::Judgment()
m_mpToTrack = MultiPlayer_Invalid; m_mpToTrack = MultiPlayer_Invalid;
} }
void Judgment::LoadFromNode( const RString& sDir, const XNode* pNode ) void Judgment::LoadFromNode( const XNode* pNode )
{ {
RString sFile; RString sFile;
if( ActorUtil::GetAttrPath(pNode, "File", sFile) ) if( ActorUtil::GetAttrPath(pNode, "File", sFile) )
@@ -29,7 +29,7 @@ void Judgment::LoadFromNode( const RString& sDir, const XNode* pNode )
LoadNormal(); LoadNormal();
} }
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
void Judgment::LoadNormal() void Judgment::LoadNormal()
+1 -1
View File
@@ -16,7 +16,7 @@ public:
void LoadNormal(); void LoadNormal();
void LoadNormal( const RString &sPath ); void LoadNormal( const RString &sPath );
void LoadFromMultiPlayer( MultiPlayer mp ); void LoadFromMultiPlayer( MultiPlayer mp );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void Reset(); void Reset();
void SetJudgment( TapNoteScore score, bool bEarly ); void SetJudgment( TapNoteScore score, bool bEarly );
void HandleMessage( const RString &sMessage ); void HandleMessage( const RString &sMessage );
+2 -2
View File
@@ -28,14 +28,14 @@ void MemoryCardDisplay::Load( PlayerNumber pn )
} }
} }
void MemoryCardDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) void MemoryCardDisplay::LoadFromNode( const XNode* pNode )
{ {
PlayerNumber pn; PlayerNumber pn;
pNode->GetAttrValue("PlayerNumber", (int&) pn ); pNode->GetAttrValue("PlayerNumber", (int&) pn );
Load( pn ); Load( pn );
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
void MemoryCardDisplay::Update( float fDelta ) void MemoryCardDisplay::Update( float fDelta )
+1 -1
View File
@@ -12,7 +12,7 @@ class MemoryCardDisplay : public ActorFrame
public: public:
MemoryCardDisplay(); MemoryCardDisplay();
void Load( PlayerNumber pn ); void Load( PlayerNumber pn );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void Update( float fDelta ); void Update( float fDelta );
+4 -4
View File
@@ -29,7 +29,7 @@ void MeterDisplay::Load( RString sStreamPath, float fStreamWidth, RString sTipPa
SetPercent( 0.5f ); SetPercent( 0.5f );
} }
void MeterDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) void MeterDisplay::LoadFromNode( const XNode* pNode )
{ {
LOG->Trace( "MeterDisplay::LoadFromNode(%s,node)", ActorUtil::GetWhere(pNode).c_str() ); LOG->Trace( "MeterDisplay::LoadFromNode(%s,node)", ActorUtil::GetWhere(pNode).c_str() );
@@ -42,7 +42,7 @@ void MeterDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) ) if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) )
RageException::Throw( "%s: MeterDisplay: missing the \"StreamPath\" attribute", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: MeterDisplay: missing the \"StreamPath\" attribute", ActorUtil::GetWhere(pNode).c_str() );
ActorUtil::ResolvePath( sStreamPath, sDir ); ActorUtil::ResolvePath( sStreamPath, ActorUtil::GetWhere(pNode) );
m_sprStream.Load( sStreamPath ); m_sprStream.Load( sStreamPath );
m_sprStream->SetZoomX( m_fStreamWidth / m_sprStream->GetUnzoomedWidth() ); m_sprStream->SetZoomX( m_fStreamWidth / m_sprStream->GetUnzoomedWidth() );
@@ -52,13 +52,13 @@ void MeterDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
const XNode* pChild = pNode->GetChild( "Tip" ); const XNode* pChild = pNode->GetChild( "Tip" );
if( pChild != NULL ) if( pChild != NULL )
{ {
m_sprTip.LoadFromNode( sDir, pChild ); m_sprTip.LoadFromNode( pChild );
this->AddChild( m_sprTip ); this->AddChild( m_sprTip );
} }
SetPercent( 0.5f ); SetPercent( 0.5f );
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
void MeterDisplay::SetPercent( float fPercent ) void MeterDisplay::SetPercent( float fPercent )
+1 -1
View File
@@ -10,7 +10,7 @@ class MeterDisplay : public ActorFrame
public: public:
MeterDisplay(); MeterDisplay();
void Load( RString sStreamPath, float fStreamWidth, RString sTipPath ); void Load( RString sStreamPath, float fStreamWidth, RString sTipPath );
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void SetPercent( float fPercent ); void SetPercent( float fPercent );
+2 -2
View File
@@ -106,9 +106,9 @@ void Model::LoadPieces( const RString &sMeshesPath, const RString &sMaterialsPat
} }
} }
void Model::LoadFromNode( const RString& sDir, const XNode* pNode ) void Model::LoadFromNode( const XNode* pNode )
{ {
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
RString s1, s2, s3; RString s1, s2, s3;
ActorUtil::GetAttrPath( pNode, "Meshes", s1 ); ActorUtil::GetAttrPath( pNode, "Meshes", s1 );
+1 -1
View File
@@ -27,7 +27,7 @@ public:
void LoadMaterialsFromMilkshapeAscii( const RString &sPath ); void LoadMaterialsFromMilkshapeAscii( const RString &sPath );
bool LoadMilkshapeAsciiBones( const RString &sAniName, const RString &sPath ); bool LoadMilkshapeAsciiBones( const RString &sAniName, const RString &sPath );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void PlayAnimation( const RString &sAniName, float fPlayRate = 1 ); void PlayAnimation( const RString &sAniName, float fPlayRate = 1 );
+2 -2
View File
@@ -24,11 +24,11 @@ OptionIconRow::OptionIconRow()
} }
} }
void OptionIconRow::LoadFromNode( const RString& sDir, const XNode* pNode ) void OptionIconRow::LoadFromNode( const XNode* pNode )
{ {
Load(); Load();
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
struct OptionColumnEntry struct OptionColumnEntry
+1 -1
View File
@@ -18,7 +18,7 @@ public:
OptionIconRow(); OptionIconRow();
void Load(); void Load();
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void SetFromGameState( PlayerNumber pn ); void SetFromGameState( PlayerNumber pn );
+2 -2
View File
@@ -102,7 +102,7 @@ void PaneDisplay::Load( const RString &sMetricsGroup, PlayerNumber pn )
m_CurPane = PANE_INVALID; m_CurPane = PANE_INVALID;
} }
void PaneDisplay::LoadFromNode( const RString &sDir, const XNode *pNode ) void PaneDisplay::LoadFromNode( const XNode *pNode )
{ {
bool b; bool b;
@@ -119,7 +119,7 @@ void PaneDisplay::LoadFromNode( const RString &sDir, const XNode *pNode )
Load( sMetricsGroup, pn ); Load( sMetricsGroup, pn );
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
void PaneDisplay::SetContent( PaneContents c ) void PaneDisplay::SetContent( PaneContents c )
+1 -1
View File
@@ -56,7 +56,7 @@ public:
void Load( const RString &sMetricsGroup, PlayerNumber pn ); void Load( const RString &sMetricsGroup, PlayerNumber pn );
void SetFromGameState(); void SetFromGameState();
void LoadFromNode( const RString &sDir, const XNode *pNode ); void LoadFromNode( const XNode *pNode );
// Lua // Lua
void PushSelf( lua_State *L ); void PushSelf( lua_State *L );
+4 -4
View File
@@ -26,7 +26,7 @@ PercentageDisplay::PercentageDisplay()
m_Format.SetFromExpression( "FormatPercentScore" ); m_Format.SetFromExpression( "FormatPercentScore" );
} }
void PercentageDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) void PercentageDisplay::LoadFromNode( const XNode* pNode )
{ {
pNode->GetAttrValue( "DancePointsDigits", m_iDancePointsDigits ); pNode->GetAttrValue( "DancePointsDigits", m_iDancePointsDigits );
pNode->GetAttrValue( "PercentUseRemainder", m_bUseRemainder ); pNode->GetAttrValue( "PercentUseRemainder", m_bUseRemainder );
@@ -39,7 +39,7 @@ void PercentageDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
const XNode *pChild = pNode->GetChild( "Percent" ); const XNode *pChild = pNode->GetChild( "Percent" );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: PercentageDisplay: missing the node \"Percent\"", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: PercentageDisplay: missing the node \"Percent\"", ActorUtil::GetWhere(pNode).c_str() );
m_textPercent.LoadFromNode( sDir, pChild ); m_textPercent.LoadFromNode( pChild );
this->AddChild( &m_textPercent ); this->AddChild( &m_textPercent );
if( !PREFSMAN->m_bDancePointsForOni && m_bUseRemainder ) if( !PREFSMAN->m_bDancePointsForOni && m_bUseRemainder )
@@ -47,12 +47,12 @@ void PercentageDisplay::LoadFromNode( const RString& sDir, const XNode* pNode )
const XNode *pChild = pNode->GetChild( "PercentRemainder" ); const XNode *pChild = pNode->GetChild( "PercentRemainder" );
if( pChild == NULL ) if( pChild == NULL )
RageException::Throw( "%s: ComboGraph: missing the node \"PercentRemainder\"", ActorUtil::GetWhere(pNode).c_str() ); RageException::Throw( "%s: ComboGraph: missing the node \"PercentRemainder\"", ActorUtil::GetWhere(pNode).c_str() );
m_textPercentRemainder.LoadFromNode( sDir, pChild ); m_textPercentRemainder.LoadFromNode( pChild );
this->AddChild( &m_textPercentRemainder ); this->AddChild( &m_textPercentRemainder );
} }
// only run the Init command after we load Fonts. // only run the Init command after we load Fonts.
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
} }
void PercentageDisplay::Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats ) void PercentageDisplay::Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats )
+1 -1
View File
@@ -18,7 +18,7 @@ public:
void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats ); void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats );
void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats, const RString &sMetricsGroup, bool bAutoRefresh ); void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats, const RString &sMetricsGroup, bool bAutoRefresh );
void Update( float fDeltaTime ); void Update( float fDeltaTime );
virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); virtual void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
static RString FormatPercentScore( float fPercentDancePoints ); static RString FormatPercentScore( float fPercentDancePoints );
+2 -2
View File
@@ -5,10 +5,10 @@
REGISTER_ACTOR_CLASS( Quad ) REGISTER_ACTOR_CLASS( Quad )
void Quad::LoadFromNode( const RString& sDir, const XNode* pNode ) void Quad::LoadFromNode( const XNode* pNode )
{ {
// HACK: Bypass Sprite's texture loading. Sprite should really derive from Quad. // HACK: Bypass Sprite's texture loading. Sprite should really derive from Quad.
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
} }
/* /*
+1 -1
View File
@@ -14,7 +14,7 @@ public:
m_bDrawIfTextureNull = true; m_bDrawIfTextureNull = true;
} }
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
}; };
+2 -2
View File
@@ -17,9 +17,9 @@ RollingNumbers::RollingNumbers()
m_fScoreVelocity = 0; m_fScoreVelocity = 0;
} }
void RollingNumbers::LoadFromNode( const RString& sDir, const XNode* pNode ) void RollingNumbers::LoadFromNode( const XNode* pNode )
{ {
BitmapText::LoadFromNode( sDir, pNode ); BitmapText::LoadFromNode( pNode );
pNode->GetAttrValue( "Format", m_sFormat ); pNode->GetAttrValue( "Format", m_sFormat );
ThemeManager::EvaluateString( m_sFormat ); ThemeManager::EvaluateString( m_sFormat );
+1 -1
View File
@@ -10,7 +10,7 @@ class RollingNumbers : public BitmapText
public: public:
RollingNumbers(); RollingNumbers();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
+2 -2
View File
@@ -20,9 +20,9 @@ ScoreDisplayAliveTime::~ScoreDisplayAliveTime()
{ {
} }
void ScoreDisplayAliveTime::LoadFromNode( const RString& sDir, const XNode* pNode ) void ScoreDisplayAliveTime::LoadFromNode( const XNode* pNode )
{ {
BitmapText::LoadFromNode( sDir, pNode ); BitmapText::LoadFromNode( pNode );
{ {
Lua *L = LUA->Get(); Lua *L = LUA->Get();
+1 -1
View File
@@ -16,7 +16,7 @@ public:
virtual void Update( float fDelta ); virtual void Update( float fDelta );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void PlayCommand( const RString &sCommandName ); void PlayCommand( const RString &sCommandName );
+2 -2
View File
@@ -22,9 +22,9 @@ ScoreDisplayCalories::~ScoreDisplayCalories()
MESSAGEMAN->Unsubscribe( this, m_sMessageOnStep ); MESSAGEMAN->Unsubscribe( this, m_sMessageOnStep );
} }
void ScoreDisplayCalories::LoadFromNode( const RString& sDir, const XNode* pNode ) void ScoreDisplayCalories::LoadFromNode( const XNode* pNode )
{ {
RollingNumbers::LoadFromNode( sDir, pNode ); RollingNumbers::LoadFromNode( pNode );
{ {
Lua *L = LUA->Get(); Lua *L = LUA->Get();
+1 -1
View File
@@ -15,7 +15,7 @@ public:
virtual void Update( float fDelta ); virtual void Update( float fDelta );
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void PlayCommand( const RString &sCommandName ); void PlayCommand( const RString &sCommandName );
+3 -3
View File
@@ -106,7 +106,7 @@ void Sprite::Load( RageTextureID ID )
LoadFromTexture( ID ); LoadFromTexture( ID );
}; };
void Sprite::LoadFromNode( const RString& sDir, const XNode* pNode ) void Sprite::LoadFromNode( const XNode* pNode )
{ {
RString sPath; RString sPath;
ActorUtil::GetAttrPath( pNode, "Texture", sPath ); ActorUtil::GetAttrPath( pNode, "Texture", sPath );
@@ -114,7 +114,7 @@ void Sprite::LoadFromNode( const RString& sDir, const XNode* pNode )
if( !sPath.empty() ) if( !sPath.empty() )
{ {
if( !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) ) if( !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) )
ActorUtil::ResolvePath( sPath, sDir ); ActorUtil::ResolvePath( sPath, ActorUtil::GetWhere(pNode) );
// Load the texture // Load the texture
LoadFromTexture( sPath ); LoadFromTexture( sPath );
@@ -147,7 +147,7 @@ void Sprite::LoadFromNode( const RString& sDir, const XNode* pNode )
} }
Actor::LoadFromNode( sDir, pNode ); Actor::LoadFromNode( pNode );
} }
void Sprite::UnloadTexture() void Sprite::UnloadTexture()
+1 -1
View File
@@ -15,7 +15,7 @@ public:
Sprite( const Sprite &cpy ); Sprite( const Sprite &cpy );
virtual ~Sprite(); virtual ~Sprite();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
virtual bool EarlyAbortDraw() const; virtual bool EarlyAbortDraw() const;
+2 -2
View File
@@ -33,9 +33,9 @@ void WorkoutGraph::Load()
this->AddChild( &m_sprEmpty ); this->AddChild( &m_sprEmpty );
} }
void WorkoutGraph::LoadFromNode( const RString& sDir, const XNode* pNode ) void WorkoutGraph::LoadFromNode( const XNode* pNode )
{ {
ActorFrame::LoadFromNode( sDir, pNode ); ActorFrame::LoadFromNode( pNode );
Load(); Load();
} }
+1 -1
View File
@@ -15,7 +15,7 @@ public:
virtual Actor *Copy() const; virtual Actor *Copy() const;
void Load(); void Load();
void LoadFromNode( const RString& sDir, const XNode* pNode ); void LoadFromNode( const XNode* pNode );
void SetFromGameState(); void SetFromGameState();
void SetFromGameStateAndHighlightSong( int iSongIndex ); void SetFromGameStateAndHighlightSong( int iSongIndex );