Add "tipsy" effect (is there a better name for this?)

This commit is contained in:
Chris Danford
2003-08-16 23:34:47 +00:00
parent 7395839f3e
commit 7429c86ebe
17 changed files with 343 additions and 79 deletions
+13 -4
View File
@@ -24,7 +24,7 @@
float g_fExpandSeconds = 0;
float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat )
float ArrowGetYOffset( PlayerNumber pn, int iCol, float fNoteBeat )
{
float fYOffset;
if( !GAMESTATE->m_PlayerOptions[pn].m_bTimeSpacing )
@@ -48,6 +48,7 @@ float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat )
return fYOffset;
const float* fAccels = GAMESTATE->m_CurrentPlayerOptions[pn].m_fAccels;
const float* fEffects = GAMESTATE->m_CurrentPlayerOptions[pn].m_fEffects;
float fYAdjust = 0; // fill this in depending on PlayerOptions
@@ -172,15 +173,23 @@ float ArrowGetRotation( PlayerNumber pn, float fNoteBeat )
return 0;
}
float ArrowGetYPosWithoutReverse( PlayerNumber pn, float fYOffset )
float ArrowGetYPosWithoutReverse( PlayerNumber pn, int iCol, float fYOffset )
{
float fYPos = fYOffset * GAMESTATE->m_CurrentPlayerOptions[pn].m_fScrollSpeed;
return fYPos;
}
float ArrowGetYPos( PlayerNumber pn, float fYOffset )
float ArrowGetYPos( PlayerNumber pn, int iCol, float fYOffset, float fYReverseOffsetPixels )
{
return ArrowGetYPosWithoutReverse(pn,fYOffset) * SCALE( GAMESTATE->m_CurrentPlayerOptions[pn].m_fReverseScroll, 0.f, 1.f, 1.f, -1.f );
float f = ArrowGetYPosWithoutReverse(pn,iCol,fYOffset);
f *= SCALE( GAMESTATE->m_CurrentPlayerOptions[pn].m_fReverseScroll, 0.f, 1.f, 1.f, -1.f );
f += SCALE( GAMESTATE->m_CurrentPlayerOptions[pn].m_fReverseScroll, 0.f, 1.f, 0.f, fYReverseOffsetPixels );
const float* fEffects = GAMESTATE->m_CurrentPlayerOptions[pn].m_fEffects;
if( fEffects[PlayerOptions::EFFECT_TIPSY] > 0 )
f += fEffects[PlayerOptions::EFFECT_TIPSY] * ( cosf( RageTimer::GetTimeSinceStart()*1.2f + iCol*2.f) * ARROW_SIZE*0.4f );
return f;
}