diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index d99794ac59..17a54e9df2 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -208,7 +208,7 @@ Actor::Actor( const Actor &cpy ): * initialization (eg. ActorFrame loading children). However, it * also loads input variables, which should happen first. The * former is more important. */ -void Actor::LoadFromNode( const RString& sDir, const XNode* pNode ) +void Actor::LoadFromNode( const XNode* pNode ) { Lua *L = LUA->Get(); FOREACH_CONST_Child( pNode, pChild ) diff --git a/stepmania/src/Actor.h b/stepmania/src/Actor.h index a761e646fa..6c9ddcf462 100644 --- a/stepmania/src/Actor.h +++ b/stepmania/src/Actor.h @@ -58,7 +58,7 @@ public: virtual ~Actor(); virtual Actor *Copy() const; virtual void InitState(); - virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const XNode* pNode ); bool IsType( const RString &sType ); static void SetBGMTime( float fTime, float fBeat ); diff --git a/stepmania/src/ActorFrame.cpp b/stepmania/src/ActorFrame.cpp index a4ad8880e5..ab9122c722 100644 --- a/stepmania/src/ActorFrame.cpp +++ b/stepmania/src/ActorFrame.cpp @@ -74,12 +74,12 @@ void ActorFrame::InitState() Actor::InitState(); } -void ActorFrame::LoadFromNode( const RString& sDir, const XNode* pNode ) +void ActorFrame::LoadFromNode( const XNode* pNode ) { if( AutoLoadChildren() ) - LoadChildrenFromNode( sDir, pNode ); + LoadChildrenFromNode( pNode ); - Actor::LoadFromNode( sDir, pNode ); + Actor::LoadFromNode( pNode ); pNode->GetAttrValue( "UpdateRate", m_fUpdateRate ); 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 ); } -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. ASSERT( m_bDeleteChildren ); @@ -101,7 +101,7 @@ void ActorFrame::LoadChildrenFromNode( const RString& sDir, const XNode* pNode ) { FOREACH_CONST_Child( pChildren, pChild ) { - Actor* pChildActor = ActorUtil::LoadFromNode( sDir, pChild, this ); + Actor* pChildActor = ActorUtil::LoadFromNode( pChild, this ); if( pChildActor ) AddChild( pChildActor ); } diff --git a/stepmania/src/ActorFrame.h b/stepmania/src/ActorFrame.h index d1b2a74065..ed09f3a7d7 100644 --- a/stepmania/src/ActorFrame.h +++ b/stepmania/src/ActorFrame.h @@ -13,7 +13,7 @@ public: virtual ~ActorFrame(); virtual void InitState(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; virtual void AddChild( Actor* pActor ); @@ -68,7 +68,7 @@ public: void RunCommands( const apActorCommands& cmds ) { this->RunCommands( *cmds ); } // convenience protected: - void LoadChildrenFromNode( const RString& sDir, const XNode* pNode ); + void LoadChildrenFromNode( const XNode* pNode ); vector m_SubActors; bool m_bPropagateCommands; diff --git a/stepmania/src/ActorProxy.cpp b/stepmania/src/ActorProxy.cpp index 1be0801d28..ae9690fde4 100644 --- a/stepmania/src/ActorProxy.cpp +++ b/stepmania/src/ActorProxy.cpp @@ -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 diff --git a/stepmania/src/ActorProxy.h b/stepmania/src/ActorProxy.h index a1df9feae5..8290cc463b 100644 --- a/stepmania/src/ActorProxy.h +++ b/stepmania/src/ActorProxy.h @@ -15,7 +15,7 @@ public: virtual bool EarlyAbortDraw() const; virtual void DrawPrimitives(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; Actor *GetTarget() { return m_pActorTarget; } diff --git a/stepmania/src/ActorScroller.cpp b/stepmania/src/ActorScroller.cpp index e69f188d85..2a71c3cdeb 100644 --- a/stepmania/src/ActorScroller.cpp +++ b/stepmania/src/ActorScroller.cpp @@ -111,9 +111,9 @@ float ActorScroller::GetSecondsToDestination() const 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(); diff --git a/stepmania/src/ActorScroller.h b/stepmania/src/ActorScroller.h index 775bfaa81a..d890ea4020 100644 --- a/stepmania/src/ActorScroller.h +++ b/stepmania/src/ActorScroller.h @@ -27,7 +27,7 @@ public: void PositionItems(); - void LoadFromNode( const RString &sDir, const XNode *pNode ); + void LoadFromNode( const XNode *pNode ); virtual Actor *Copy() const; void SetLoop( bool bLoop ) { m_bLoop = bLoop; } diff --git a/stepmania/src/ActorSound.cpp b/stepmania/src/ActorSound.cpp index 2f18ea2d4d..11d06b3369 100644 --- a/stepmania/src/ActorSound.cpp +++ b/stepmania/src/ActorSound.cpp @@ -18,14 +18,14 @@ void ActorSound::Play() 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; 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 ); } } diff --git a/stepmania/src/ActorSound.h b/stepmania/src/ActorSound.h index f6045564a5..1b43c490b9 100644 --- a/stepmania/src/ActorSound.h +++ b/stepmania/src/ActorSound.h @@ -14,7 +14,7 @@ public: void Load( const RString &sPath ); void Play(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); // // Lua diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index af240289fd..123b2936f4 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -35,13 +35,13 @@ void ActorUtil::Register( const RString& sClassName, CreateActorFn 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::iterator iter = g_pmapRegistrees->find( sClassName ); ASSERT_M( iter != g_pmapRegistrees->end(), ssprintf("Actor '%s' is not registered.",sClassName.c_str()) ); CreateActorFn pfn = iter->second; - return (*pfn)( sDir, pNode, pParentActor ); + return (*pfn)( pNode, pParentActor ); } 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 ); @@ -227,7 +227,7 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor * 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") { @@ -248,7 +248,7 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor * goto all_done; } - ActorUtil::ResolvePath( sFile, sDir ); + ActorUtil::ResolvePath( sFile, GetSourcePath(pNode) ); pReturn = ActorUtil::MakeActor( sFile, pNode, pParentActor ); if( pReturn == NULL ) @@ -422,7 +422,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor XmlFileUtil::CompileXNodeTree( &xml, sPath ); AnnotateXMLTree( &xml, sPath ); MergeActorXML( &xml, pParent ); - return ActorUtil::LoadFromNode( sDir, &xml ); + return ActorUtil::LoadFromNode( &xml ); } case FT_Lua: { @@ -434,7 +434,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor } MergeActorXML( pNode.get(), pParent ); - Actor *pRet = ActorUtil::LoadFromNode( sDir, pNode.get() ); + Actor *pRet = ActorUtil::LoadFromNode( pNode.get() ); return pRet; } case FT_Bitmap: @@ -443,7 +443,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor XNode xml( *pParent ); xml.AppendAttr( "Texture", sPath ); - return ActorUtil::Create( "Sprite", sDir, &xml, pParentActor ); + return ActorUtil::Create( "Sprite", &xml, pParentActor ); } case FT_Model: { @@ -452,7 +452,7 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, const XNode *pParent, Actor xml.AppendAttr( "Materials", sPath ); xml.AppendAttr( "Bones", sPath ); - return ActorUtil::Create( "Model", sDir, &xml, pParentActor ); + return ActorUtil::Create( "Model", &xml, pParentActor ); } default: RageException::Throw("File \"%s\" has unknown type, \"%s\".", diff --git a/stepmania/src/ActorUtil.h b/stepmania/src/ActorUtil.h index 7bb9591217..757b90bbbe 100644 --- a/stepmania/src/ActorUtil.h +++ b/stepmania/src/ActorUtil.h @@ -8,15 +8,15 @@ 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. #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; \ if( pParent ) \ pRet->SetParent( pParent ); \ - pRet->LoadFromNode(sDir, pNode); \ + pRet->LoadFromNode(pNode); \ return pRet; } \ class Register##className { \ public: \ @@ -44,7 +44,7 @@ namespace ActorUtil { // Every screen should register its class at program initialization. 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 = "" ); 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 ); } // 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 ); RString GetSourcePath( const XNode *pNode ); RString GetWhere( const XNode *pNode ); diff --git a/stepmania/src/AutoActor.cpp b/stepmania/src/AutoActor.cpp index 939856ec7b..c1216168f4 100644 --- a/stepmania/src/AutoActor.cpp +++ b/stepmania/src/AutoActor.cpp @@ -43,11 +43,11 @@ void AutoActor::Load( const RString &sPath ) m_pActor = new Actor; } -void AutoActor::LoadFromNode( const RString &sDir, const XNode* pNode ) +void AutoActor::LoadFromNode( const XNode* pNode ) { Unload(); - m_pActor = ActorUtil::LoadFromNode( sDir, pNode ); + m_pActor = ActorUtil::LoadFromNode( pNode ); } void AutoActor::LoadAndSetName( const RString &sScreenName, const RString &sActorName ) diff --git a/stepmania/src/AutoActor.h b/stepmania/src/AutoActor.h index f1ba3796b3..ba31aef590 100644 --- a/stepmania/src/AutoActor.h +++ b/stepmania/src/AutoActor.h @@ -23,7 +23,7 @@ public: bool IsLoaded() const { return m_pActor != NULL; } void Load( Actor *pActor ); 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 ); protected: diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index bd54b69772..8511c13d61 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -76,7 +76,7 @@ void BGAnimation::AddLayersFromAniDir( const RString &_sAniDir, const XNode *pNo { // import as a single layer BGAnimationLayer* pLayer = new BGAnimationLayer; - pLayer->LoadFromNode( sAniDir, pKey ); + pLayer->LoadFromNode( pKey ); this->AddChild( pLayer ); } } @@ -111,7 +111,7 @@ void BGAnimation::LoadFromAniDir( const RString &_sAniDir ) if( pBGAnimation == NULL ) pBGAnimation = &dummy; - LoadFromNode( sAniDir, pBGAnimation ); + LoadFromNode( pBGAnimation ); } 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 * actor that sleeps for the given length of time. This will extend GetTweenTimeLeft. */ diff --git a/stepmania/src/BGAnimation.h b/stepmania/src/BGAnimation.h index 4826ef1ea4..885fbbb553 100644 --- a/stepmania/src/BGAnimation.h +++ b/stepmania/src/BGAnimation.h @@ -14,7 +14,7 @@ public: virtual ~BGAnimation(); void LoadFromAniDir( const RString &sAniDir ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); protected: void AddLayersFromAniDir( const RString &_sAniDir, const XNode *pNode ); diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index ff073d74e3..e2de63fbdd 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -358,7 +358,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath ) m_SubActors[i]->SetBlendMode( BLEND_ADD ); } -void BGAnimationLayer::LoadFromNode( const RString& sDir, const XNode* pNode ) +void BGAnimationLayer::LoadFromNode( const XNode* pNode ) { { bool bCond; @@ -455,7 +455,7 @@ void BGAnimationLayer::LoadFromNode( const RString& sDir, const XNode* pNode ) { case TYPE_SPRITE: { - Actor* pActor = ActorUtil::LoadFromNode( sDir, pNode ); + Actor* pActor = ActorUtil::LoadFromNode( pNode ); this->AddChild( pActor ); if( bStretch ) pActor->StretchTo( FullScreenRectF ); diff --git a/stepmania/src/BGAnimationLayer.h b/stepmania/src/BGAnimationLayer.h index 385f2d97d5..a2975ee1e2 100644 --- a/stepmania/src/BGAnimationLayer.h +++ b/stepmania/src/BGAnimationLayer.h @@ -16,7 +16,7 @@ public: ~BGAnimationLayer(); void LoadFromAniLayerFile( const RString& sPath ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); void UpdateInternal( float fDeltaTime ); bool EarlyAbortDraw() const; diff --git a/stepmania/src/BPMDisplay.cpp b/stepmania/src/BPMDisplay.cpp index 503d56c02f..49af662307 100644 --- a/stepmania/src/BPMDisplay.cpp +++ b/stepmania/src/BPMDisplay.cpp @@ -34,9 +34,9 @@ void BPMDisplay::Load() 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(); } diff --git a/stepmania/src/BPMDisplay.h b/stepmania/src/BPMDisplay.h index 35f7b87dc4..f11984dc11 100644 --- a/stepmania/src/BPMDisplay.h +++ b/stepmania/src/BPMDisplay.h @@ -18,7 +18,7 @@ public: virtual Actor *Copy() const; void Load(); virtual void Update( float fDeltaTime ); - void LoadFromNode( const RString &sDir, const XNode *pNode ); + void LoadFromNode( const XNode *pNode ); void SetBpmFromSong( const Song* pSong ); void SetBpmFromCourse( const Course* pCourse ); diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index 93ebafb7e6..b9839a0828 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -95,7 +95,7 @@ BitmapText &BitmapText::operator =( const BitmapText &cpy ) return *this; } -void BitmapText::LoadFromNode( const RString& sDir, const XNode* pNode ) +void BitmapText::LoadFromNode( const XNode* pNode ) { RString sText; pNode->GetAttrValue( "Text", sText ); @@ -117,7 +117,7 @@ void BitmapText::LoadFromNode( const RString& sDir, const XNode* pNode ) LoadFromFont( THEME->GetPathF( "", sFont ) ); SetText( sText, sAltText ); - Actor::LoadFromNode( sDir, pNode ); + Actor::LoadFromNode( pNode ); } diff --git a/stepmania/src/BitmapText.h b/stepmania/src/BitmapText.h index e6cc9a49ca..c15c8e9f16 100644 --- a/stepmania/src/BitmapText.h +++ b/stepmania/src/BitmapText.h @@ -16,7 +16,7 @@ public: BitmapText &operator =( const BitmapText &cpy ); virtual ~BitmapText(); - virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; bool LoadFromFont( const RString& sFontName ); diff --git a/stepmania/src/ComboGraph.cpp b/stepmania/src/ComboGraph.cpp index 4ef8c60f8f..597acf4880 100644 --- a/stepmania/src/ComboGraph.cpp +++ b/stepmania/src/ComboGraph.cpp @@ -19,9 +19,9 @@ ComboGraph::ComboGraph() 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" ); if( m_pMaxComboText == NULL ) diff --git a/stepmania/src/ComboGraph.h b/stepmania/src/ComboGraph.h index 35bebf77d5..37a00f3690 100644 --- a/stepmania/src/ComboGraph.h +++ b/stepmania/src/ComboGraph.h @@ -12,7 +12,7 @@ class ComboGraph: public ActorFrame public: ComboGraph(); 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 bool AutoLoadChildren() const { return true; } diff --git a/stepmania/src/CourseContentsList.cpp b/stepmania/src/CourseContentsList.cpp index 26059ccafc..013046f61f 100644 --- a/stepmania/src/CourseContentsList.cpp +++ b/stepmania/src/CourseContentsList.cpp @@ -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(); } diff --git a/stepmania/src/CourseContentsList.h b/stepmania/src/CourseContentsList.h index 617156fbcb..b71eff387b 100644 --- a/stepmania/src/CourseContentsList.h +++ b/stepmania/src/CourseContentsList.h @@ -14,7 +14,7 @@ public: virtual Actor *Copy() const; void Load(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); void SetFromGameState(); diff --git a/stepmania/src/CourseEntryDisplay.cpp b/stepmania/src/CourseEntryDisplay.cpp index 0e7c68b053..db1718462c 100644 --- a/stepmania/src/CourseEntryDisplay.cpp +++ b/stepmania/src/CourseEntryDisplay.cpp @@ -66,9 +66,9 @@ void CourseEntryDisplay::Load() 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(); } diff --git a/stepmania/src/CourseEntryDisplay.h b/stepmania/src/CourseEntryDisplay.h index f7d6d61731..18aa2fb62c 100644 --- a/stepmania/src/CourseEntryDisplay.h +++ b/stepmania/src/CourseEntryDisplay.h @@ -19,7 +19,7 @@ public: virtual Actor *Copy() const; void Load(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); void SetFromGameState( int iCourseEntryIndex ); diff --git a/stepmania/src/DifficultyIcon.cpp b/stepmania/src/DifficultyIcon.cpp index 6cc3d0166b..07fdaffc47 100644 --- a/stepmania/src/DifficultyIcon.cpp +++ b/stepmania/src/DifficultyIcon.cpp @@ -41,18 +41,18 @@ bool DifficultyIcon::Load( RString sPath ) return true; } -void DifficultyIcon::LoadFromNode( const RString& sDir, const XNode* pNode ) +void DifficultyIcon::LoadFromNode( const XNode* pNode ) { RString sFile; if( !ActorUtil::GetAttrPath(pNode, "File", sFile) ) 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 ); // skip Sprite::LoadFromNode - Actor::LoadFromNode( sDir, pNode ); + Actor::LoadFromNode( pNode ); } void DifficultyIcon::SetPlayer( PlayerNumber pn ) diff --git a/stepmania/src/DifficultyIcon.h b/stepmania/src/DifficultyIcon.h index 59b0687ee7..579046a901 100644 --- a/stepmania/src/DifficultyIcon.h +++ b/stepmania/src/DifficultyIcon.h @@ -18,7 +18,7 @@ public: virtual bool EarlyAbortDraw() const { return m_bBlank || Sprite::EarlyAbortDraw(); } bool Load( RString sFilePath ); - virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; void SetPlayer( PlayerNumber pn ); diff --git a/stepmania/src/DifficultyList.cpp b/stepmania/src/DifficultyList.cpp index e4597b22b1..70c735ea2e 100644 --- a/stepmania/src/DifficultyList.cpp +++ b/stepmania/src/DifficultyList.cpp @@ -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" ); 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) ); if( pChild == NULL ) 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 * 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) ); if( pChild == NULL ) 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] ); this->AddChild( &m_CursorFrames[pn] ); } diff --git a/stepmania/src/DifficultyList.h b/stepmania/src/DifficultyList.h index 6e0a0390e9..8132a9beb9 100644 --- a/stepmania/src/DifficultyList.h +++ b/stepmania/src/DifficultyList.h @@ -17,7 +17,7 @@ public: DifficultyList(); virtual ~DifficultyList(); virtual Actor *Copy() const; - virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const XNode* pNode ); void SetFromGameState(); void TweenOnScreen(); diff --git a/stepmania/src/DifficultyMeter.cpp b/stepmania/src/DifficultyMeter.cpp index 875e3b2085..2c14ed2bed 100644 --- a/stepmania/src/DifficultyMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -118,9 +118,9 @@ void DifficultyMeter::Load( const RString &sType ) 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; pNode->GetAttrValue( "Type", s ); diff --git a/stepmania/src/DifficultyMeter.h b/stepmania/src/DifficultyMeter.h index 6052d98eda..89e82af58f 100644 --- a/stepmania/src/DifficultyMeter.h +++ b/stepmania/src/DifficultyMeter.h @@ -22,7 +22,7 @@ public: void Load( const RString &sType ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; void SetFromGameState( PlayerNumber pn ); diff --git a/stepmania/src/DynamicActorScroller.cpp b/stepmania/src/DynamicActorScroller.cpp index b691cbad25..45324b87e3 100644 --- a/stepmania/src/DynamicActorScroller.cpp +++ b/stepmania/src/DynamicActorScroller.cpp @@ -8,9 +8,9 @@ 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. diff --git a/stepmania/src/DynamicActorScroller.h b/stepmania/src/DynamicActorScroller.h index 2c181712b2..6d0f092314 100644 --- a/stepmania/src/DynamicActorScroller.h +++ b/stepmania/src/DynamicActorScroller.h @@ -10,7 +10,7 @@ class DynamicActorScroller: public ActorScroller { public: virtual Actor *Copy() const; - void LoadFromNode( const RString &sDir, const XNode *pNode ); + void LoadFromNode( const XNode *pNode ); protected: virtual void ShiftSubActors( int iDist ); diff --git a/stepmania/src/GraphDisplay.cpp b/stepmania/src/GraphDisplay.cpp index f6481489c7..5a90fdd782 100644 --- a/stepmania/src/GraphDisplay.cpp +++ b/stepmania/src/GraphDisplay.cpp @@ -151,20 +151,20 @@ GraphDisplay::~GraphDisplay() 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" ); if( pChild == NULL ) 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 ); pChild = pNode->GetChild( "Texture" ); if( pChild == NULL ) 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.y = m_sprTexture->GetUnzoomedHeight(); this->AddChild( m_sprTexture ); @@ -172,18 +172,18 @@ void GraphDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) pChild = pNode->GetChild( "Line" ); if( pChild == NULL ) 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 ); pChild = pNode->GetChild( "SongBoundary" ); if( pChild == NULL ) 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" ); if( pChild == NULL ) 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 ) diff --git a/stepmania/src/GraphDisplay.h b/stepmania/src/GraphDisplay.h index 9f03789162..1eff8f4693 100644 --- a/stepmania/src/GraphDisplay.h +++ b/stepmania/src/GraphDisplay.h @@ -14,7 +14,7 @@ public: GraphDisplay(); ~GraphDisplay(); 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 ); diff --git a/stepmania/src/GrooveRadar.cpp b/stepmania/src/GrooveRadar.cpp index fd2f5b34b8..85e152b9b9 100644 --- a/stepmania/src/GrooveRadar.cpp +++ b/stepmania/src/GrooveRadar.cpp @@ -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() diff --git a/stepmania/src/GrooveRadar.h b/stepmania/src/GrooveRadar.h index aebb626de3..e1a5bbc0c7 100644 --- a/stepmania/src/GrooveRadar.h +++ b/stepmania/src/GrooveRadar.h @@ -15,7 +15,7 @@ class GrooveRadar : public ActorFrame public: GrooveRadar(); virtual Actor *Copy() const; - virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const XNode* pNode ); void SetEmpty( PlayerNumber pn ); void SetFromRadarValues( PlayerNumber pn, const RadarValues &rv ); diff --git a/stepmania/src/HoldJudgment.cpp b/stepmania/src/HoldJudgment.cpp index d611db0333..cd842b5f47 100644 --- a/stepmania/src/HoldJudgment.cpp +++ b/stepmania/src/HoldJudgment.cpp @@ -25,7 +25,7 @@ void HoldJudgment::Load( const RString &sPath ) this->AddChild( m_sprJudgment ); } -void HoldJudgment::LoadFromNode( const RString& sDir, const XNode* pNode ) +void HoldJudgment::LoadFromNode( const XNode* pNode ) { RString sFile; if( ActorUtil::GetAttrPath(pNode, "File", sFile) ) @@ -35,7 +35,7 @@ void HoldJudgment::LoadFromNode( const RString& sDir, const XNode* pNode ) Load( sFile ); - ActorFrame::LoadFromNode( sDir, pNode ); + ActorFrame::LoadFromNode( pNode ); } void HoldJudgment::ResetAnimation() diff --git a/stepmania/src/HoldJudgment.h b/stepmania/src/HoldJudgment.h index e116045e88..234f48bfe2 100644 --- a/stepmania/src/HoldJudgment.h +++ b/stepmania/src/HoldJudgment.h @@ -12,7 +12,7 @@ public: HoldJudgment(); virtual Actor *Copy() const; void Load( const RString &sPath ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); void SetHoldJudgment( HoldNoteScore hns ); void LoadFromMultiPlayer( MultiPlayer mp ); diff --git a/stepmania/src/Judgment.cpp b/stepmania/src/Judgment.cpp index 31d19705fe..0503b1f34f 100644 --- a/stepmania/src/Judgment.cpp +++ b/stepmania/src/Judgment.cpp @@ -16,7 +16,7 @@ Judgment::Judgment() m_mpToTrack = MultiPlayer_Invalid; } -void Judgment::LoadFromNode( const RString& sDir, const XNode* pNode ) +void Judgment::LoadFromNode( const XNode* pNode ) { RString sFile; if( ActorUtil::GetAttrPath(pNode, "File", sFile) ) @@ -29,7 +29,7 @@ void Judgment::LoadFromNode( const RString& sDir, const XNode* pNode ) LoadNormal(); } - ActorFrame::LoadFromNode( sDir, pNode ); + ActorFrame::LoadFromNode( pNode ); } void Judgment::LoadNormal() diff --git a/stepmania/src/Judgment.h b/stepmania/src/Judgment.h index 30e6091fc5..668a025527 100644 --- a/stepmania/src/Judgment.h +++ b/stepmania/src/Judgment.h @@ -16,7 +16,7 @@ public: void LoadNormal(); void LoadNormal( const RString &sPath ); void LoadFromMultiPlayer( MultiPlayer mp ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); void Reset(); void SetJudgment( TapNoteScore score, bool bEarly ); void HandleMessage( const RString &sMessage ); diff --git a/stepmania/src/MemoryCardDisplay.cpp b/stepmania/src/MemoryCardDisplay.cpp index 1cabf9280e..52097c0b4a 100644 --- a/stepmania/src/MemoryCardDisplay.cpp +++ b/stepmania/src/MemoryCardDisplay.cpp @@ -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; pNode->GetAttrValue("PlayerNumber", (int&) pn ); Load( pn ); - ActorFrame::LoadFromNode( sDir, pNode ); + ActorFrame::LoadFromNode( pNode ); } void MemoryCardDisplay::Update( float fDelta ) diff --git a/stepmania/src/MemoryCardDisplay.h b/stepmania/src/MemoryCardDisplay.h index 4797d74336..a6b0c43366 100644 --- a/stepmania/src/MemoryCardDisplay.h +++ b/stepmania/src/MemoryCardDisplay.h @@ -12,7 +12,7 @@ class MemoryCardDisplay : public ActorFrame public: MemoryCardDisplay(); void Load( PlayerNumber pn ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; void Update( float fDelta ); diff --git a/stepmania/src/MeterDisplay.cpp b/stepmania/src/MeterDisplay.cpp index d9c81102c0..8ac9aec8ed 100644 --- a/stepmania/src/MeterDisplay.cpp +++ b/stepmania/src/MeterDisplay.cpp @@ -29,7 +29,7 @@ void MeterDisplay::Load( RString sStreamPath, float fStreamWidth, RString sTipPa 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() ); @@ -42,7 +42,7 @@ void MeterDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) if( !ActorUtil::GetAttrPath(pNode, "StreamPath", sStreamPath) ) 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->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" ); if( pChild != NULL ) { - m_sprTip.LoadFromNode( sDir, pChild ); + m_sprTip.LoadFromNode( pChild ); this->AddChild( m_sprTip ); } SetPercent( 0.5f ); - ActorFrame::LoadFromNode( sDir, pNode ); + ActorFrame::LoadFromNode( pNode ); } void MeterDisplay::SetPercent( float fPercent ) diff --git a/stepmania/src/MeterDisplay.h b/stepmania/src/MeterDisplay.h index 06799a05ab..0735d3f096 100644 --- a/stepmania/src/MeterDisplay.h +++ b/stepmania/src/MeterDisplay.h @@ -10,7 +10,7 @@ class MeterDisplay : public ActorFrame public: MeterDisplay(); 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; void SetPercent( float fPercent ); diff --git a/stepmania/src/Model.cpp b/stepmania/src/Model.cpp index 4d03cb6c70..0555c60314 100644 --- a/stepmania/src/Model.cpp +++ b/stepmania/src/Model.cpp @@ -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; ActorUtil::GetAttrPath( pNode, "Meshes", s1 ); diff --git a/stepmania/src/Model.h b/stepmania/src/Model.h index ac2557daf0..f90b9c23ec 100644 --- a/stepmania/src/Model.h +++ b/stepmania/src/Model.h @@ -27,7 +27,7 @@ public: void LoadMaterialsFromMilkshapeAscii( 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 ); diff --git a/stepmania/src/OptionIconRow.cpp b/stepmania/src/OptionIconRow.cpp index 66be1aa0a2..12c842d0bb 100644 --- a/stepmania/src/OptionIconRow.cpp +++ b/stepmania/src/OptionIconRow.cpp @@ -24,11 +24,11 @@ OptionIconRow::OptionIconRow() } } -void OptionIconRow::LoadFromNode( const RString& sDir, const XNode* pNode ) +void OptionIconRow::LoadFromNode( const XNode* pNode ) { Load(); - ActorFrame::LoadFromNode( sDir, pNode ); + ActorFrame::LoadFromNode( pNode ); } struct OptionColumnEntry diff --git a/stepmania/src/OptionIconRow.h b/stepmania/src/OptionIconRow.h index c43c3a61f1..32bb838515 100644 --- a/stepmania/src/OptionIconRow.h +++ b/stepmania/src/OptionIconRow.h @@ -18,7 +18,7 @@ public: OptionIconRow(); void Load(); - virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; void SetFromGameState( PlayerNumber pn ); diff --git a/stepmania/src/PaneDisplay.cpp b/stepmania/src/PaneDisplay.cpp index a5a5069232..6865d0bbef 100644 --- a/stepmania/src/PaneDisplay.cpp +++ b/stepmania/src/PaneDisplay.cpp @@ -102,7 +102,7 @@ void PaneDisplay::Load( const RString &sMetricsGroup, PlayerNumber pn ) m_CurPane = PANE_INVALID; } -void PaneDisplay::LoadFromNode( const RString &sDir, const XNode *pNode ) +void PaneDisplay::LoadFromNode( const XNode *pNode ) { bool b; @@ -119,7 +119,7 @@ void PaneDisplay::LoadFromNode( const RString &sDir, const XNode *pNode ) Load( sMetricsGroup, pn ); - ActorFrame::LoadFromNode( sDir, pNode ); + ActorFrame::LoadFromNode( pNode ); } void PaneDisplay::SetContent( PaneContents c ) diff --git a/stepmania/src/PaneDisplay.h b/stepmania/src/PaneDisplay.h index 36a89520ce..948ca2dd54 100644 --- a/stepmania/src/PaneDisplay.h +++ b/stepmania/src/PaneDisplay.h @@ -56,7 +56,7 @@ public: void Load( const RString &sMetricsGroup, PlayerNumber pn ); void SetFromGameState(); - void LoadFromNode( const RString &sDir, const XNode *pNode ); + void LoadFromNode( const XNode *pNode ); // Lua void PushSelf( lua_State *L ); diff --git a/stepmania/src/PercentageDisplay.cpp b/stepmania/src/PercentageDisplay.cpp index 3afc421ff4..06b36738f0 100644 --- a/stepmania/src/PercentageDisplay.cpp +++ b/stepmania/src/PercentageDisplay.cpp @@ -26,7 +26,7 @@ PercentageDisplay::PercentageDisplay() 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( "PercentUseRemainder", m_bUseRemainder ); @@ -39,7 +39,7 @@ void PercentageDisplay::LoadFromNode( const RString& sDir, const XNode* pNode ) const XNode *pChild = pNode->GetChild( "Percent" ); if( pChild == NULL ) 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 ); 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" ); if( pChild == NULL ) 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 ); } // 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 ) diff --git a/stepmania/src/PercentageDisplay.h b/stepmania/src/PercentageDisplay.h index c68ed65ec8..ddc3cd218b 100644 --- a/stepmania/src/PercentageDisplay.h +++ b/stepmania/src/PercentageDisplay.h @@ -18,7 +18,7 @@ public: void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats ); void Load( const PlayerState *pPlayerState, const PlayerStageStats *pPlayerStageStats, const RString &sMetricsGroup, bool bAutoRefresh ); void Update( float fDeltaTime ); - virtual void LoadFromNode( const RString& sDir, const XNode* pNode ); + virtual void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; static RString FormatPercentScore( float fPercentDancePoints ); diff --git a/stepmania/src/Quad.cpp b/stepmania/src/Quad.cpp index b532a850a3..e073cfe438 100644 --- a/stepmania/src/Quad.cpp +++ b/stepmania/src/Quad.cpp @@ -5,10 +5,10 @@ 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. - Actor::LoadFromNode( sDir, pNode ); + Actor::LoadFromNode( pNode ); } /* diff --git a/stepmania/src/Quad.h b/stepmania/src/Quad.h index a19048cea6..ea74653721 100644 --- a/stepmania/src/Quad.h +++ b/stepmania/src/Quad.h @@ -14,7 +14,7 @@ public: m_bDrawIfTextureNull = true; } - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; }; diff --git a/stepmania/src/RollingNumbers.cpp b/stepmania/src/RollingNumbers.cpp index 0c6807cc32..ccd9158e87 100644 --- a/stepmania/src/RollingNumbers.cpp +++ b/stepmania/src/RollingNumbers.cpp @@ -17,9 +17,9 @@ RollingNumbers::RollingNumbers() 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 ); ThemeManager::EvaluateString( m_sFormat ); diff --git a/stepmania/src/RollingNumbers.h b/stepmania/src/RollingNumbers.h index 4b3c5799a7..9a02c23624 100644 --- a/stepmania/src/RollingNumbers.h +++ b/stepmania/src/RollingNumbers.h @@ -10,7 +10,7 @@ class RollingNumbers : public BitmapText public: RollingNumbers(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; virtual void Update( float fDeltaTime ); diff --git a/stepmania/src/ScoreDisplayAliveTime.cpp b/stepmania/src/ScoreDisplayAliveTime.cpp index 26dbc1ab5d..13d3cccc0b 100644 --- a/stepmania/src/ScoreDisplayAliveTime.cpp +++ b/stepmania/src/ScoreDisplayAliveTime.cpp @@ -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(); diff --git a/stepmania/src/ScoreDisplayAliveTime.h b/stepmania/src/ScoreDisplayAliveTime.h index bcb1e98eae..99a9a3b337 100644 --- a/stepmania/src/ScoreDisplayAliveTime.h +++ b/stepmania/src/ScoreDisplayAliveTime.h @@ -16,7 +16,7 @@ public: virtual void Update( float fDelta ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; void PlayCommand( const RString &sCommandName ); diff --git a/stepmania/src/ScoreDisplayCalories.cpp b/stepmania/src/ScoreDisplayCalories.cpp index 424531eae0..5ef8695c7c 100644 --- a/stepmania/src/ScoreDisplayCalories.cpp +++ b/stepmania/src/ScoreDisplayCalories.cpp @@ -22,9 +22,9 @@ ScoreDisplayCalories::~ScoreDisplayCalories() 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(); diff --git a/stepmania/src/ScoreDisplayCalories.h b/stepmania/src/ScoreDisplayCalories.h index 2c0de3d8ac..6b852b1338 100644 --- a/stepmania/src/ScoreDisplayCalories.h +++ b/stepmania/src/ScoreDisplayCalories.h @@ -15,7 +15,7 @@ public: virtual void Update( float fDelta ); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; void PlayCommand( const RString &sCommandName ); diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index c56588b322..3971fb6a63 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -106,7 +106,7 @@ void Sprite::Load( RageTextureID ID ) LoadFromTexture( ID ); }; -void Sprite::LoadFromNode( const RString& sDir, const XNode* pNode ) +void Sprite::LoadFromNode( const XNode* pNode ) { RString sPath; ActorUtil::GetAttrPath( pNode, "Texture", sPath ); @@ -114,7 +114,7 @@ void Sprite::LoadFromNode( const RString& sDir, const XNode* pNode ) if( !sPath.empty() ) { if( !TEXTUREMAN->IsTextureRegistered( RageTextureID(sPath) ) ) - ActorUtil::ResolvePath( sPath, sDir ); + ActorUtil::ResolvePath( sPath, ActorUtil::GetWhere(pNode) ); // Load the texture 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() diff --git a/stepmania/src/Sprite.h b/stepmania/src/Sprite.h index a87a59d0a0..836b3d93b7 100644 --- a/stepmania/src/Sprite.h +++ b/stepmania/src/Sprite.h @@ -15,7 +15,7 @@ public: Sprite( const Sprite &cpy ); virtual ~Sprite(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); virtual Actor *Copy() const; virtual bool EarlyAbortDraw() const; diff --git a/stepmania/src/WorkoutGraph.cpp b/stepmania/src/WorkoutGraph.cpp index 643b507d9b..259c477a71 100644 --- a/stepmania/src/WorkoutGraph.cpp +++ b/stepmania/src/WorkoutGraph.cpp @@ -33,9 +33,9 @@ void WorkoutGraph::Load() 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(); } diff --git a/stepmania/src/WorkoutGraph.h b/stepmania/src/WorkoutGraph.h index 29a4ded915..092f9be9ef 100644 --- a/stepmania/src/WorkoutGraph.h +++ b/stepmania/src/WorkoutGraph.h @@ -15,7 +15,7 @@ public: virtual Actor *Copy() const; void Load(); - void LoadFromNode( const RString& sDir, const XNode* pNode ); + void LoadFromNode( const XNode* pNode ); void SetFromGameState(); void SetFromGameStateAndHighlightSong( int iSongIndex );