From f7446ad43e2bfdfcdc84bcfe05e51e3dcaebac60 Mon Sep 17 00:00:00 2001 From: Alberto Ramos Date: Mon, 19 Jul 2010 17:52:49 -0600 Subject: [PATCH] HG: changed src/NoteDisplay.cpp --- NoteSkins/Para/default/metrics.ini | 18 +++++++++--------- NoteSkins/beat/default/metrics.ini | 18 +++++++++--------- NoteSkins/common/common/metrics.ini | 18 +++++++++--------- NoteSkins/dance/Delta/metrics.ini | 18 +++++++++--------- NoteSkins/dance/default/metrics.ini | 18 +++++++++--------- NoteSkins/dance/midi-note/metrics.ini | 18 +++++++++--------- NoteSkins/dance/midi-solo/metrics.ini | 18 +++++++++--------- NoteSkins/dance/midi-vivid/metrics.ini | 18 +++++++++--------- NoteSkins/dance/retro/metrics.ini | 18 +++++++++--------- NoteSkins/dance/retrobar/metrics.ini | 4 ++-- NoteSkins/kb7/default/metrics.ini | 18 +++++++++--------- NoteSkins/pump/default/metrics.ini | 22 +++++++++++----------- NoteSkins/pump/simple/metrics.ini | 16 ++++++++-------- src/NoteDisplay.cpp | 22 +++++++++++++--------- 14 files changed, 124 insertions(+), 120 deletions(-) diff --git a/NoteSkins/Para/default/metrics.ini b/NoteSkins/Para/default/metrics.ini index ac23fb0f87..1eebd948b6 100644 --- a/NoteSkins/Para/default/metrics.ini +++ b/NoteSkins/Para/default/metrics.ini @@ -6,17 +6,17 @@ DrawHoldHeadForTapsOnSameRow=0 -TapNoteAnimationLengthInBeats=2 -TapAdditionAnimationLengthInBeats=4 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=4 +TapNoteAnimationLength=2 +TapAdditionAnimationLength=4 +TapMineAnimationLength=1 +TapLiftAnimationLength=4 -HoldHeadAnimationLengthInBeats=1 // doesn't matter. Only 1 frame anyway. -HoldTopCapAnimationLengthInBeats=1 // doesn't matter. Only 1 frame anyway. -HoldBottomCapAnimationLengthInBeats=1 // doesn't matter. Only 1 frame anyway. -HoldBodyAnimationLengthInBeats=1 // doesn't matter. Only 1 frame anyway. -HoldTailAnimationLengthInBeats=1 // doesn't matter. Only 1 frame anyway. +HoldHeadAnimationLength=1 // doesn't matter. Only 1 frame anyway. +HoldTopCapAnimationLength=1 // doesn't matter. Only 1 frame anyway. +HoldBottomCapAnimationLength=1 // doesn't matter. Only 1 frame anyway. +HoldBodyAnimationLength=1 // doesn't matter. Only 1 frame anyway. +HoldTailAnimationLength=1 // doesn't matter. Only 1 frame anyway. diff --git a/NoteSkins/beat/default/metrics.ini b/NoteSkins/beat/default/metrics.ini index 4b420fa77f..a843f6bf01 100644 --- a/NoteSkins/beat/default/metrics.ini +++ b/NoteSkins/beat/default/metrics.ini @@ -3,15 +3,15 @@ [NoteDisplay] DrawHoldHeadForTapsOnSameRow=0 -TapNoteAnimationLengthInBeats=1 -TapAdditionAnimationLengthInBeats=1 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=1 -HoldHeadAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTopCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBottomCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBodyAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTailAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. +TapNoteAnimationLength=1 +TapAdditionAnimationLength=1 +TapMineAnimationLength=1 +TapLiftAnimationLength=1 +HoldHeadAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTopCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBottomCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBodyAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTailAnimationLength=4 // doesn't matter. Only 1 frame anyway. StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=-32 // top of tail HoldLetGoGrayPercent=0.25 diff --git a/NoteSkins/common/common/metrics.ini b/NoteSkins/common/common/metrics.ini index ad66dca0bf..f93a4ad261 100644 --- a/NoteSkins/common/common/metrics.ini +++ b/NoteSkins/common/common/metrics.ini @@ -1,14 +1,14 @@ [NoteDisplay] DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=1 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=1 -TapFakeAnimationLengthInBeats=1 -HoldHeadAnimationLengthInBeats=1 -HoldTopCapAnimationLengthInBeats=1 -HoldBottomCapAnimationLengthInBeats=1 -HoldBodyAnimationLengthInBeats=4 -HoldTailAnimationLengthInBeats=4 +TapNoteAnimationLength=1 +TapMineAnimationLength=1 +TapLiftAnimationLength=1 +TapFakeAnimationLength=1 +HoldHeadAnimationLength=1 +HoldTopCapAnimationLength=1 +HoldBottomCapAnimationLength=1 +HoldBodyAnimationLength=4 +HoldTailAnimationLength=4 TapNoteAnimationIsVivid=1 TapMineAnimationIsVivid=0 TapLiftAnimationIsVivid=0 diff --git a/NoteSkins/dance/Delta/metrics.ini b/NoteSkins/dance/Delta/metrics.ini index 795b2c4e11..efc38bb438 100644 --- a/NoteSkins/dance/Delta/metrics.ini +++ b/NoteSkins/dance/Delta/metrics.ini @@ -4,15 +4,15 @@ FallbackNoteSkin=default [NoteDisplay] TapNoteAnimationIsVivid=0 DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=3 -TapAdditionAnimationLengthInBeats=3 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=1 -HoldHeadAnimationLengthInBeats=1 -HoldTopCapAnimationLengthInBeats=0.5 -HoldBottomCapAnimationLengthInBeats=0.5 -HoldBodyAnimationLengthInBeats=0.5 -HoldTailAnimationLengthInBeats=0.5 +TapNoteAnimationLength=3 +TapAdditionAnimationLength=3 +TapMineAnimationLength=1 +TapLiftAnimationLength=1 +HoldHeadAnimationLength=1 +HoldTopCapAnimationLength=0.5 +HoldBottomCapAnimationLength=0.5 +HoldBodyAnimationLength=0.5 +HoldTailAnimationLength=0.5 StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=-32 HoldLetGoGrayPercent=0.25 diff --git a/NoteSkins/dance/default/metrics.ini b/NoteSkins/dance/default/metrics.ini index 9ba2b98feb..eb3052f8b2 100644 --- a/NoteSkins/dance/default/metrics.ini +++ b/NoteSkins/dance/default/metrics.ini @@ -4,15 +4,15 @@ FallbackNoteSkin=common [NoteDisplay] TapNoteAnimationIsVivid=0 DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=1 // none of these matter because Lua is handling the animation, not sprites. -TapAdditionAnimationLengthInBeats=1 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=1 -HoldHeadAnimationLengthInBeats=1 -HoldTopCapAnimationLengthInBeats=1 -HoldBottomCapAnimationLengthInBeats=1 -HoldBodyAnimationLengthInBeats=1 -HoldTailAnimationLengthInBeats=1 +TapNoteAnimationLength=1 // none of these matter because Lua is handling the animation, not sprites. +TapAdditionAnimationLength=1 +TapMineAnimationLength=1 +TapLiftAnimationLength=1 +HoldHeadAnimationLength=1 +HoldTopCapAnimationLength=1 +HoldBottomCapAnimationLength=1 +HoldBodyAnimationLength=1 +HoldTailAnimationLength=1 StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=0 diff --git a/NoteSkins/dance/midi-note/metrics.ini b/NoteSkins/dance/midi-note/metrics.ini index c759cd8b15..947f0aea10 100644 --- a/NoteSkins/dance/midi-note/metrics.ini +++ b/NoteSkins/dance/midi-note/metrics.ini @@ -4,15 +4,15 @@ [NoteDisplay] TapNoteAnimationIsVivid=0 DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=4 -TapAdditionAnimationLengthInBeats=4 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=4 -HoldHeadAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTopCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBottomCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBodyAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTailAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. +TapNoteAnimationLength=4 +TapAdditionAnimationLength=4 +TapMineAnimationLength=1 +TapLiftAnimationLength=4 +HoldHeadAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTopCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBottomCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBodyAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTailAnimationLength=4 // doesn't matter. Only 1 frame anyway. StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=0 diff --git a/NoteSkins/dance/midi-solo/metrics.ini b/NoteSkins/dance/midi-solo/metrics.ini index e5fb0bbbc6..3417381c3e 100644 --- a/NoteSkins/dance/midi-solo/metrics.ini +++ b/NoteSkins/dance/midi-solo/metrics.ini @@ -4,15 +4,15 @@ FallbackNoteSkin=default [NoteDisplay] TapNoteAnimationIsVivid=0 DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=4 -TapAdditionAnimationLengthInBeats=4 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=4 -HoldHeadAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTopCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBottomCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBodyAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTailAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. +TapNoteAnimationLength=4 +TapAdditionAnimationLength=4 +TapMineAnimationLength=1 +TapLiftAnimationLength=4 +HoldHeadAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTopCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBottomCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBodyAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTailAnimationLength=4 // doesn't matter. Only 1 frame anyway. StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=0 diff --git a/NoteSkins/dance/midi-vivid/metrics.ini b/NoteSkins/dance/midi-vivid/metrics.ini index 47c597d6f1..bb452c9d5f 100644 --- a/NoteSkins/dance/midi-vivid/metrics.ini +++ b/NoteSkins/dance/midi-vivid/metrics.ini @@ -4,15 +4,15 @@ FallbackNoteSkin=midi-note [NoteDisplay] TapNoteAnimationIsVivid=1 DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=4 -TapAdditionAnimationLengthInBeats=4 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=4 -HoldHeadAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTopCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBottomCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBodyAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTailAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. +TapNoteAnimationLength=4 +TapAdditionAnimationLength=4 +TapMineAnimationLength=1 +TapLiftAnimationLength=4 +HoldHeadAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTopCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBottomCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBodyAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTailAnimationLength=4 // doesn't matter. Only 1 frame anyway. StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=0 diff --git a/NoteSkins/dance/retro/metrics.ini b/NoteSkins/dance/retro/metrics.ini index 45e4dccf87..a355d4ec65 100644 --- a/NoteSkins/dance/retro/metrics.ini +++ b/NoteSkins/dance/retro/metrics.ini @@ -4,15 +4,15 @@ [NoteDisplay] TapNoteAnimationIsVivid=0 DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=4 -TapAdditionAnimationLengthInBeats=4 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=4 -HoldHeadAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTopCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBottomCapAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldBodyAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. -HoldTailAnimationLengthInBeats=4 // doesn't matter. Only 1 frame anyway. +TapNoteAnimationLength=4 +TapAdditionAnimationLength=4 +TapMineAnimationLength=1 +TapLiftAnimationLength=4 +HoldHeadAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTopCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBottomCapAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldBodyAnimationLength=4 // doesn't matter. Only 1 frame anyway. +HoldTailAnimationLength=4 // doesn't matter. Only 1 frame anyway. StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=-32 // top of tail HoldLetGoGrayPercent=0.25 diff --git a/NoteSkins/dance/retrobar/metrics.ini b/NoteSkins/dance/retrobar/metrics.ini index bbc30eb7b2..df26d41d03 100644 --- a/NoteSkins/dance/retrobar/metrics.ini +++ b/NoteSkins/dance/retrobar/metrics.ini @@ -1,7 +1,7 @@ [NoteDisplay] DrawHoldHeadForTapsOnSameRow=0 -HoldBodyAnimationLengthInBeats=1 -HoldTailAnimationLengthInBeats=1 +HoldBodyAnimationLength=1 +HoldTailAnimationLength=1 StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=0 diff --git a/NoteSkins/kb7/default/metrics.ini b/NoteSkins/kb7/default/metrics.ini index 7ccea909a7..84d07489b2 100644 --- a/NoteSkins/kb7/default/metrics.ini +++ b/NoteSkins/kb7/default/metrics.ini @@ -4,15 +4,15 @@ [NoteDisplay] TapNoteAnimationIsVivid=0 DrawHoldHeadForTapsOnSameRow=1 -TapNoteAnimationLengthInBeats=4 -TapAdditionAnimationLengthInBeats=4 -TapMineAnimationLengthInBeats=1 -TapLiftAnimationLengthInBeats=4 -HoldHeadAnimationLengthInBeats=4 -HoldTopCapAnimationLengthInBeats=4 -HoldBottomCapAnimationLengthInBeats=4 -HoldBodyAnimationLengthInBeats=4 -HoldTailAnimationLengthInBeats=4 +TapNoteAnimationLength=4 +TapAdditionAnimationLength=4 +TapMineAnimationLength=1 +TapLiftAnimationLength=4 +HoldHeadAnimationLength=4 +HoldTopCapAnimationLength=4 +HoldBottomCapAnimationLength=4 +HoldBodyAnimationLength=4 +HoldTailAnimationLength=4 StartDrawingHoldBodyOffsetFromHead=0 StopDrawingHoldBodyOffsetFromTail=-32 HoldLetGoGrayPercent=0.25 diff --git a/NoteSkins/pump/default/metrics.ini b/NoteSkins/pump/default/metrics.ini index 740cd86a56..1b51cd3ad9 100644 --- a/NoteSkins/pump/default/metrics.ini +++ b/NoteSkins/pump/default/metrics.ini @@ -1,13 +1,13 @@ [NoteDisplay] -TapNoteAnimationLengthInBeats=1.25 -TapMineAnimationLengthInBeats=1.25 -TapLiftAnimationLengthInBeats=1.25 +TapNoteAnimationLength=1.25 +TapMineAnimationLength=1.25 +TapLiftAnimationLength=1.25 -HoldHeadAnimationLengthInBeats=1.25 -HoldTopCapAnimationLengthInBeats=1.25 -HoldBottomCapAnimationLengthInBeats=1.25 -HoldBodyAnimationLengthInBeats=1.25 -HoldTailAnimationLengthInBeats=1.25 +HoldHeadAnimationLength=1.25 +HoldTopCapAnimationLength=1.25 +HoldBottomCapAnimationLength=1.25 +HoldBodyAnimationLength=1.25 +HoldTailAnimationLength=1.25 HoldLetGoGrayPercent=1 ReverseDrawOrder=1111 @@ -31,9 +31,9 @@ ReceptorTapInitCommand=zoom,1;diffusealpha,0;glow,1,1,1,0 ReceptorTapPressCommand=finishtweening;glow,1,1,1,1;zoom,1;linear,0.2;glow,1,1,1,0;zoom,1.2 [Center] -TapNoteAnimationLengthInBeats=1 -HoldHeadAnimationLengthInBeats=1 -HoldTailAnimationLengthInBeats=1 +TapNoteAnimationLength=1 +HoldHeadAnimationLength=1 +HoldTailAnimationLength=1 [DownLeft] diff --git a/NoteSkins/pump/simple/metrics.ini b/NoteSkins/pump/simple/metrics.ini index 94e7c721c9..58fbe1d1d9 100644 --- a/NoteSkins/pump/simple/metrics.ini +++ b/NoteSkins/pump/simple/metrics.ini @@ -1,10 +1,10 @@ [NoteDisplay] -TapNoteAnimationLengthInBeats=1.66 -TapMineAnimationLengthInBeats=1.66 -TapLiftAnimationLengthInBeats=1.66 +TapNoteAnimationLength=1.66 +TapMineAnimationLength=1.66 +TapLiftAnimationLength=1.66 -HoldHeadAnimationLengthInBeats=1.66 -HoldTopCapAnimationLengthInBeats=1.66 -HoldBottomCapAnimationLengthInBeats=1.66 -HoldBodyAnimationLengthInBeats=1.66 -HoldTailAnimationLengthInBeats=1.66 +HoldHeadAnimationLength=1.66 +HoldTopCapAnimationLength=1.66 +HoldBottomCapAnimationLength=1.66 +HoldBodyAnimationLength=1.66 +HoldTailAnimationLength=1.66 diff --git a/src/NoteDisplay.cpp b/src/NoteDisplay.cpp index dabeee175e..848d668324 100644 --- a/src/NoteDisplay.cpp +++ b/src/NoteDisplay.cpp @@ -44,11 +44,13 @@ static const NoteType MAX_DISPLAY_NOTE_TYPE = (NoteType)7; struct NoteMetricCache_t { bool m_bDrawHoldHeadForTapsOnSameRow; - float m_fAnimationLengthInBeats[NUM_NotePart]; + float m_fAnimationLength[NUM_NotePart]; bool m_bAnimationIsVivid[NUM_NotePart]; RageVector2 m_fAdditionTextureCoordOffset[NUM_NotePart]; RageVector2 m_fNoteColorTextureCoordSpacing[NUM_NotePart]; + //For animation based on beats or seconds -DaisuMaster + bool m_bAnimationBasedOnBeats; bool m_bHoldHeadIsAboveWavyParts; bool m_bHoldTailIsAboveWavyParts; int m_iStartDrawingHoldBodyOffsetFromHead; @@ -68,13 +70,15 @@ void NoteMetricCache_t::Load( const RString &sButton ) FOREACH_NotePart( p ) { const RString &s = NotePartToString(p); - m_fAnimationLengthInBeats[p] = NOTESKIN->GetMetricF(sButton,s+"AnimationLengthInBeats"); + m_fAnimationLength[p] = NOTESKIN->GetMetricF(sButton,s+"AnimationLength"); m_bAnimationIsVivid[p] = NOTESKIN->GetMetricB(sButton,s+"AnimationIsVivid"); m_fAdditionTextureCoordOffset[p].x = NOTESKIN->GetMetricF(sButton,s+"AdditionTextureCoordOffsetX"); m_fAdditionTextureCoordOffset[p].y = NOTESKIN->GetMetricF(sButton,s+"AdditionTextureCoordOffsetY"); m_fNoteColorTextureCoordSpacing[p].x = NOTESKIN->GetMetricF(sButton,s+"NoteColorTextureCoordSpacingX"); m_fNoteColorTextureCoordSpacing[p].y = NOTESKIN->GetMetricF(sButton,s+"NoteColorTextureCoordSpacingY"); } + //I was here -DaisuMaster + m_bAnimationBasedOnBeats = NOTESKIN->GetMetricB(sButton,"AnimationIsBeatBased"); m_bHoldHeadIsAboveWavyParts = NOTESKIN->GetMetricB(sButton,"HoldHeadIsAboveWavyParts"); m_bHoldTailIsAboveWavyParts = NOTESKIN->GetMetricB(sButton,"HoldTailIsAboveWavyParts"); m_iStartDrawingHoldBodyOffsetFromHead = NOTESKIN->GetMetricI(sButton,"StartDrawingHoldBodyOffsetFromHead"); @@ -277,20 +281,20 @@ void NoteDisplay::Update( float fDeltaTime ) } } -void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLengthInBeats, bool bVivid ) +void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAnimationLength, bool bVivid ) { /* -inf ... inf */ - float fSongBeat = GAMESTATE->m_fSongBeat; + float fBeatOrSecond = cache->m_bAnimationBasedOnBeats ? GAMESTATE->m_fSongBeat : GAMESTATE->m_fMusicSeconds; /* -len ... +len */ - float fPercentIntoAnimation = fmodf( fSongBeat, fAnimationLengthInBeats ); + float fPercentIntoAnimation = fmodf( fBeatOrSecond, fAnimationLength ); /* -1 ... 1 */ - fPercentIntoAnimation /= fAnimationLengthInBeats; + fPercentIntoAnimation /= fAnimationLength; if( bVivid ) { float fNoteBeatFraction = fmodf( fNoteBeat, 1.0f ); - const float fInterval = 1.f / fAnimationLengthInBeats; + const float fInterval = 1.f / fAnimationLength; fPercentIntoAnimation += QuantizeDown( fNoteBeatFraction, fInterval ); // just in case somehow we're majorly negative with the subtraction @@ -311,7 +315,7 @@ Actor *NoteDisplay::GetTapActor( NoteColorActor &nca, NotePart part, float fNote { Actor *pActorOut = nca.Get(); - SetActiveFrame( fNoteBeat, *pActorOut, cache->m_fAnimationLengthInBeats[part], cache->m_bAnimationIsVivid[part] ); + SetActiveFrame( fNoteBeat, *pActorOut, cache->m_fAnimationLength[part], cache->m_bAnimationIsVivid[part] ); return pActorOut; } @@ -324,7 +328,7 @@ Sprite *NoteDisplay::GetHoldSprite( NoteColorSprite ncs[NUM_HoldType][NUM_Active { Sprite *pSpriteOut = ncs[bIsRoll ? roll:hold][bIsBeingHeld ? active:inactive].Get(); - SetActiveFrame( fNoteBeat, *pSpriteOut, cache->m_fAnimationLengthInBeats[part], cache->m_bAnimationIsVivid[part] ); + SetActiveFrame( fNoteBeat, *pSpriteOut, cache->m_fAnimationLength[part], cache->m_bAnimationIsVivid[part] ); return pSpriteOut; }