From 590cf4f6909fb4877228282a2fd4987595d4a46f Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 1 Mar 2004 05:58:19 +0000 Subject: [PATCH] Let NoteSkin manager look for BGAnimation directories --- stepmania/src/NoteDisplay.cpp | 12 ++++++++++++ stepmania/src/NoteDisplay.h | 2 ++ stepmania/src/NoteField.cpp | 18 ++++++++++++++++++ stepmania/src/NoteSkinManager.cpp | 1 + 4 files changed, 33 insertions(+) diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index c919d1d5fe..6cc4ad5937 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -288,6 +288,18 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn, CString NoteSkin, float fY } } +void NoteDisplay::Update( float fDeltaTime ) +{ + int i; + + for( i=0; iUpdate(fDeltaTime); + for( i=0; iUpdate(fDeltaTime); + m_pTapMine->Update(fDeltaTime); + for( i=0; iUpdate(fDeltaTime); + for( i=0; iUpdate(fDeltaTime); + for( i=0; iUpdate(fDeltaTime); + for( i=0; iUpdate(fDeltaTime); +} void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor ) { diff --git a/stepmania/src/NoteDisplay.h b/stepmania/src/NoteDisplay.h index f9f2444baf..4a42004a54 100644 --- a/stepmania/src/NoteDisplay.h +++ b/stepmania/src/NoteDisplay.h @@ -29,6 +29,8 @@ public: void Load( int iColNum, PlayerNumber pn, CString NoteSkin, float fYReverseOffsetPixels ); + void Update( float fDeltaTime ); + void DrawActor( Actor* pActor, int iCol, float fBeat, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels, bool bUseLighting ); void DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bool bIsAddition, bool bIsMine, float fPercentFadeToFail, float fLife, float fReverseOffsetPixels ); void DrawHold( const HoldNote& hn, bool bIsBeingHeld, bool bIsActive, float fLife, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels ); diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 1eb4bc7624..0d8dd4c36f 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -170,6 +170,23 @@ void NoteField::Update( float fDeltaTime ) m_fPercentFadeToFail = min( m_fPercentFadeToFail + fDeltaTime/1.5f, 1 ); // take 1.5 seconds to totally fade RefreshBeatToNoteSkin(); + + + // + // update all NoteDisplayCols. NoteDisplay's may contain BGAnimations + // that need to be updated. + // + for( NDMap::iterator iter = m_BeatToNoteDisplays.begin(); + iter != m_BeatToNoteDisplays.end(); + iter++ ) + { + NoteDisplayCols *nd = iter->second; + for( int c=0; cdisplay[c].Update(fDeltaTime); +// nd->m_ReceptorArrowRow.Update(fDeltaTime); +// nd->m_GhostArrowRow.Update(fDeltaTime); + } + } float NoteField::GetWidth() @@ -500,6 +517,7 @@ void NoteField::DrawPrimitives() } + // // Optimization is very important here because there are so many arrows to draw. // Draw the arrows in order of column. This minimize texture switches and let us diff --git a/stepmania/src/NoteSkinManager.cpp b/stepmania/src/NoteSkinManager.cpp index 249a0f1469..8192da501c 100644 --- a/stepmania/src/NoteSkinManager.cpp +++ b/stepmania/src/NoteSkinManager.cpp @@ -301,6 +301,7 @@ CString NoteSkinManager::GetPathToFromDir( CString sDir, CString sFileName ) GetDirListing( sDir+sFileName+"*.jpg", matches, false, true ); GetDirListing( sDir+sFileName+"*.bmp", matches, false, true ); GetDirListing( sDir+sFileName+"*.gif", matches, false, true ); + GetDirListing( sDir+sFileName+"*", matches, false, true ); if( matches.empty() ) return "";