add time-based spacing and variable scroll speed (commented out because it wasn't as helpful as I hoped)

This commit is contained in:
Chris Danford
2003-04-16 22:48:00 +00:00
parent 07c0cdd64e
commit 3c6ed5a9ed
2 changed files with 26 additions and 6 deletions
+19 -4
View File
@@ -18,6 +18,7 @@
#include "RageException.h"
#include "RageTimer.h"
#include "NoteDisplay.h"
#include "Song.h"
#include <math.h>
@@ -26,9 +27,22 @@ float g_fExpandSeconds = 0;
float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat )
{
float fSongBeat = GAMESTATE->m_fSongBeat;
float fBeatsUntilStep = fNoteBeat - fSongBeat;
float fYOffset = fBeatsUntilStep * ARROW_GAP;
float fYOffset;
if( GAMESTATE->m_PlayerOptions->m_bTimeSpacing )
{
float fSongBeat = GAMESTATE->m_fSongBeat;
float fBeatsUntilStep = fNoteBeat - fSongBeat;
fYOffset = fBeatsUntilStep * ARROW_SPACING;
}
else
{
float fSongSeconds = GAMESTATE->m_fMusicSeconds;
float fNoteSeconds = GAMESTATE->m_pCurSong->GetElapsedTimeFromBeat(fNoteBeat);
float fSecondsUntilStep = fNoteSeconds - fSongSeconds;
float fBPM = GAMESTATE->m_pCurSong->GetDominantBPM();
float fBPS = fBPM/60.f;
fYOffset = fSecondsUntilStep * fBPS * ARROW_SPACING;
}
// don't mess with the arrows after they've crossed 0
if( fYOffset < 0 )
@@ -110,7 +124,8 @@ float ArrowGetRotation( PlayerNumber pn, float fNoteBeat )
float ArrowGetYPosWithoutReverse( PlayerNumber pn, float fYOffset )
{
return fYOffset * GAMESTATE->m_CurrentPlayerOptions[pn].m_fScrollSpeed;
float fYPos = fYOffset * GAMESTATE->m_CurrentPlayerOptions[pn].m_fScrollSpeed;
return fYPos;
}
float ArrowGetYPos( PlayerNumber pn, float fYOffset )