allow using a model for hold tails
This commit is contained in:
@@ -232,14 +232,14 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn )
|
|||||||
{
|
{
|
||||||
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
for( int i=0; i<NOTE_COLOR_IMAGES; i++ )
|
||||||
{
|
{
|
||||||
m_sprHoldTailActive[i].Load( NOTESKIN->GetPathTo(pn, Button, "hold tail active "+sNoteType[i]) );
|
m_pHoldTailActive[i] = MakeModelOrSprite( NOTESKIN->GetPathTo(pn, Button, "hold tail active "+sNoteType[i]) );
|
||||||
m_sprHoldTailInactive[i].Load( NOTESKIN->GetPathTo(pn, Button, "hold tail inactive "+sNoteType[i]) );
|
m_pHoldTailInactive[i] = MakeModelOrSprite( NOTESKIN->GetPathTo(pn, Button, "hold tail inactive "+sNoteType[i]) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_sprHoldTailActive[0].Load( NOTESKIN->GetPathTo(pn, Button, "hold tail active") );
|
m_pHoldTailActive[0] = MakeModelOrSprite( NOTESKIN->GetPathTo(pn, Button, "hold tail active") );
|
||||||
m_sprHoldTailInactive[0].Load( NOTESKIN->GetPathTo(pn, Button, "hold tail inactive") );
|
m_pHoldTailInactive[0] = MakeModelOrSprite( NOTESKIN->GetPathTo(pn, Button, "hold tail inactive") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ Sprite *NoteDisplay::GetHoldBodySprite( float fNoteBeat, bool bActive )
|
|||||||
return pSpriteOut;
|
return pSpriteOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sprite * NoteDisplay::GetHoldTailSprite( float fNoteBeat, bool bActive )
|
Actor* NoteDisplay::GetHoldTailActor( float fNoteBeat, bool bActive )
|
||||||
{
|
{
|
||||||
NoteType nt = NoteType(0);
|
NoteType nt = NoteType(0);
|
||||||
if( cache->m_bHoldTailAnimationIsNoteColor )
|
if( cache->m_bHoldTailAnimationIsNoteColor )
|
||||||
@@ -371,16 +371,16 @@ Sprite * NoteDisplay::GetHoldTailSprite( float fNoteBeat, bool bActive )
|
|||||||
if( nt == NOTE_TYPE_INVALID )
|
if( nt == NOTE_TYPE_INVALID )
|
||||||
nt = NOTE_TYPE_32ND;
|
nt = NOTE_TYPE_32ND;
|
||||||
|
|
||||||
Sprite *pSpriteOut = bActive ? &m_sprHoldTailActive[nt] : &m_sprHoldTailInactive[nt];
|
Actor *pActorOut = bActive ? m_pHoldTailActive[nt] : m_pHoldTailInactive[nt];
|
||||||
|
|
||||||
SetActiveFrame(
|
SetActiveFrame(
|
||||||
fNoteBeat,
|
fNoteBeat,
|
||||||
*pSpriteOut,
|
*pActorOut,
|
||||||
cache->m_fHoldTailAnimationLengthInBeats,
|
cache->m_fHoldTailAnimationLengthInBeats,
|
||||||
cache->m_bHoldTailAnimationIsVivid,
|
cache->m_bHoldTailAnimationIsVivid,
|
||||||
cache->m_bHoldTailAnimationIsNoteColor );
|
cache->m_bHoldTailAnimationIsNoteColor );
|
||||||
|
|
||||||
return pSpriteOut;
|
return pActorOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -645,7 +645,7 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
|||||||
// Draw the tail
|
// Draw the tail
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
Sprite* pSprTail = GetHoldTailSprite( hn.fStartBeat, bActive );
|
Actor* pSprTail = GetHoldTailActor( hn.fStartBeat, bActive );
|
||||||
|
|
||||||
const float fY = fYTail;
|
const float fY = fYTail;
|
||||||
const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY );
|
const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY );
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ protected:
|
|||||||
void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor );
|
void SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid, bool bNoteColor );
|
||||||
Actor *GetTapNoteActor( float fNoteBeat );
|
Actor *GetTapNoteActor( float fNoteBeat );
|
||||||
Actor *GetHoldHeadActor( float fNoteBeat, bool bActive );
|
Actor *GetHoldHeadActor( float fNoteBeat, bool bActive );
|
||||||
|
Actor* GetHoldTailActor( float fNoteBeat, bool bActive );
|
||||||
Sprite *GetHoldTopCapSprite( float fNoteBeat, bool bActive );
|
Sprite *GetHoldTopCapSprite( float fNoteBeat, bool bActive );
|
||||||
Sprite *GetHoldBodySprite( float fNoteBeat, bool bActive );
|
Sprite *GetHoldBodySprite( float fNoteBeat, bool bActive );
|
||||||
Sprite *GetHoldBottomCapSprite( float fNoteBeat, bool bActive );
|
Sprite *GetHoldBottomCapSprite( float fNoteBeat, bool bActive );
|
||||||
Sprite *GetHoldTailSprite( float fNoteBeat, bool bActive );
|
|
||||||
|
|
||||||
PlayerNumber m_PlayerNumber; // to look up PlayerOptions
|
PlayerNumber m_PlayerNumber; // to look up PlayerOptions
|
||||||
|
|
||||||
@@ -56,8 +56,8 @@ protected:
|
|||||||
Sprite m_sprHoldBodyInactive[NOTE_COLOR_IMAGES];
|
Sprite m_sprHoldBodyInactive[NOTE_COLOR_IMAGES];
|
||||||
Sprite m_sprHoldBottomCapActive[NOTE_COLOR_IMAGES];
|
Sprite m_sprHoldBottomCapActive[NOTE_COLOR_IMAGES];
|
||||||
Sprite m_sprHoldBottomCapInactive[NOTE_COLOR_IMAGES];
|
Sprite m_sprHoldBottomCapInactive[NOTE_COLOR_IMAGES];
|
||||||
Sprite m_sprHoldTailActive[NOTE_COLOR_IMAGES];
|
Actor* m_pHoldTailActive[NOTE_COLOR_IMAGES];
|
||||||
Sprite m_sprHoldTailInactive[NOTE_COLOR_IMAGES];
|
Actor* m_pHoldTailInactive[NOTE_COLOR_IMAGES];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user