Let NoteSkin manager look for BGAnimation directories
This commit is contained in:
@@ -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; i<NOTE_COLOR_IMAGES; i++ ) if(m_pTapNote[i]) m_pTapNote[i]->Update(fDeltaTime);
|
||||||
|
for( i=0; i<NOTE_COLOR_IMAGES; i++ ) if(m_pTapAddition[i]) m_pTapAddition[i]->Update(fDeltaTime);
|
||||||
|
m_pTapMine->Update(fDeltaTime);
|
||||||
|
for( i=0; i<NOTE_COLOR_IMAGES; i++ ) if(m_pHoldHeadActive[i]) m_pHoldHeadActive[i]->Update(fDeltaTime);
|
||||||
|
for( i=0; i<NOTE_COLOR_IMAGES; i++ ) if(m_pHoldHeadInactive[i]) m_pHoldHeadInactive[i]->Update(fDeltaTime);
|
||||||
|
for( i=0; i<NOTE_COLOR_IMAGES; i++ ) if(m_pHoldTailActive[i]) m_pHoldTailActive[i]->Update(fDeltaTime);
|
||||||
|
for( i=0; i<NOTE_COLOR_IMAGES; i++ ) if(m_pHoldTailInactive[i]) m_pHoldTailInactive[i]->Update(fDeltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor )
|
void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ public:
|
|||||||
|
|
||||||
void Load( int iColNum, PlayerNumber pn, CString NoteSkin, float fYReverseOffsetPixels );
|
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 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 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 );
|
void DrawHold( const HoldNote& hn, bool bIsBeingHeld, bool bIsActive, float fLife, float fPercentFadeToFail, bool bDrawGlowOnly, float fReverseOffsetPixels );
|
||||||
|
|||||||
@@ -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
|
m_fPercentFadeToFail = min( m_fPercentFadeToFail + fDeltaTime/1.5f, 1 ); // take 1.5 seconds to totally fade
|
||||||
|
|
||||||
RefreshBeatToNoteSkin();
|
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; c<GetNumTracks(); c++ ) // for each arrow column
|
||||||
|
nd->display[c].Update(fDeltaTime);
|
||||||
|
// nd->m_ReceptorArrowRow.Update(fDeltaTime);
|
||||||
|
// nd->m_GhostArrowRow.Update(fDeltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float NoteField::GetWidth()
|
float NoteField::GetWidth()
|
||||||
@@ -500,6 +517,7 @@ void NoteField::DrawPrimitives()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Optimization is very important here because there are so many arrows to draw.
|
// 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
|
// Draw the arrows in order of column. This minimize texture switches and let us
|
||||||
|
|||||||
@@ -301,6 +301,7 @@ CString NoteSkinManager::GetPathToFromDir( CString sDir, CString sFileName )
|
|||||||
GetDirListing( sDir+sFileName+"*.jpg", matches, false, true );
|
GetDirListing( sDir+sFileName+"*.jpg", matches, false, true );
|
||||||
GetDirListing( sDir+sFileName+"*.bmp", matches, false, true );
|
GetDirListing( sDir+sFileName+"*.bmp", matches, false, true );
|
||||||
GetDirListing( sDir+sFileName+"*.gif", matches, false, true );
|
GetDirListing( sDir+sFileName+"*.gif", matches, false, true );
|
||||||
|
GetDirListing( sDir+sFileName+"*", matches, false, true );
|
||||||
|
|
||||||
if( matches.empty() )
|
if( matches.empty() )
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
Reference in New Issue
Block a user