From 2aab9329734d7b0b257b47dacbd31b2d5aaac9ee Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 29 Mar 2005 01:33:20 +0000 Subject: [PATCH] Sprite -> AutoActor --- stepmania/src/GhostArrow.cpp | 20 ++++++++++---------- stepmania/src/GhostArrow.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/stepmania/src/GhostArrow.cpp b/stepmania/src/GhostArrow.cpp index ae3a614d5c..5f8938e80d 100644 --- a/stepmania/src/GhostArrow.cpp +++ b/stepmania/src/GhostArrow.cpp @@ -5,11 +5,6 @@ GhostArrow::GhostArrow() { - FOREACH_TapNoteScore( i ) - { - m_spr[i].SetHidden( true ); - this->AddChild( &m_spr[i] ); - } } void GhostArrow::Load( CString sNoteSkin, CString sButton, CString sElement ) @@ -24,7 +19,12 @@ void GhostArrow::Load( CString sNoteSkin, CString sButton, CString sElement ) CString sPath = NOTESKIN->GetPathToFromNoteSkinAndButton(sNoteSkin, sButton, sFullElement, true); // optional if( sPath.empty() ) sPath = NOTESKIN->GetPathToFromNoteSkinAndButton(sNoteSkin, sButton, sElement); // not optional + + ASSERT( !m_spr[i].IsLoaded() ); // don't double-load + m_spr[i].Load( sPath ); + m_spr[i]->SetHidden( true ); + this->AddChild( m_spr[i] ); } FOREACH_TapNoteScore( i ) @@ -43,13 +43,13 @@ void GhostArrow::Step( TapNoteScore score ) // HACK: never hide the mine explosion if( i == TNS_HIT_MINE ) continue; - m_spr[i].StopTweening(); - m_spr[i].SetHidden( true ); + m_spr[i]->StopTweening(); + m_spr[i]->SetHidden( true ); } - m_spr[score].SetHidden( false ); - m_spr[score].StopTweening(); - m_spr[score].RunCommands( m_acScoreCommand[score] ); + m_spr[score]->SetHidden( false ); + m_spr[score]->StopTweening(); + m_spr[score]->RunCommands( m_acScoreCommand[score] ); } /* diff --git a/stepmania/src/GhostArrow.h b/stepmania/src/GhostArrow.h index 63f31308f8..50a1b7d90e 100644 --- a/stepmania/src/GhostArrow.h +++ b/stepmania/src/GhostArrow.h @@ -3,7 +3,7 @@ #ifndef GHOSTARROW_H #define GHOSTARROW_H -#include "Sprite.h" +#include "AutoActor.h" #include "GameConstantsAndTypes.h" #include "PlayerNumber.h" #include "ActorFrame.h" @@ -19,7 +19,7 @@ public: void Step( TapNoteScore score ); protected: - Sprite m_spr[NUM_TAP_NOTE_SCORES]; + AutoActor m_spr[NUM_TAP_NOTE_SCORES]; apActorCommands m_acScoreCommand[NUM_TAP_NOTE_SCORES]; };