split this expression apart, so it's readable

This commit is contained in:
Glenn Maynard
2004-03-01 01:37:22 +00:00
parent d733b7a7b2
commit 49df2946a7
+5 -1
View File
@@ -301,9 +301,13 @@ void NoteDisplay::SetActiveFrame( float fNoteBeat, Actor &actorToSet, float fAni
int iFrameNo = (int)(fPrecentIntoAnimation*iNumFrames);
if( bVivid )
{
// changed to deal with the minor complaint that the color cycling is
// one tick off in general
iFrameNo += (int)( froundf((fNoteBeatFraction - 0.25f/fAnimationLengthInBeats),1.f/fAnimationLengthInBeats)*iNumFrames );
const float fFraction = fNoteBeatFraction - 0.25f/fAnimationLengthInBeats;
const float fInterval = 1.f / fAnimationLengthInBeats;
iFrameNo += int( froundf(fFraction,fInterval)*iNumFrames );
}
// just in case somehow we're majorly negative with the subtraction
iFrameNo += (iNumFrames * 2);