[warps] More consistent naming.
Now to make changes...
This commit is contained in:
+11
-6
@@ -897,7 +897,7 @@ void GameState::ResetMusicStatistics()
|
|||||||
m_bFreeze = false;
|
m_bFreeze = false;
|
||||||
m_bDelay = false;
|
m_bDelay = false;
|
||||||
m_iWarpBeginRow = -1; // Set to -1 because some song may want to warp to row 0. -aj
|
m_iWarpBeginRow = -1; // Set to -1 because some song may want to warp to row 0. -aj
|
||||||
m_fWarpLength = -1; // Set when a warp is encountered. also see above. -aj
|
m_fWarpDestination = -1; // Set when a warp is encountered. also see above. -aj
|
||||||
m_fMusicSecondsVisible = 0;
|
m_fMusicSecondsVisible = 0;
|
||||||
m_fSongBeatVisible = 0;
|
m_fSongBeatVisible = 0;
|
||||||
Actor::SetBGMTime( 0, 0, 0, 0 );
|
Actor::SetBGMTime( 0, 0, 0, 0 );
|
||||||
@@ -943,7 +943,7 @@ void GameState::ResetStageStatistics()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Preference<float> g_fVisualDelaySeconds( "VisualDelaySeconds", 0.0f );
|
static Preference<float> g_fVisualDelaySeconds( "VisualDelaySeconds", 0.0f );
|
||||||
// todo: modify for warps -aj
|
|
||||||
void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &timing, const RageTimer ×tamp )
|
void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &timing, const RageTimer ×tamp )
|
||||||
{
|
{
|
||||||
if( !timestamp.IsZero() )
|
if( !timestamp.IsZero() )
|
||||||
@@ -957,16 +957,21 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
|||||||
LOG->Trace( ssprintf("[GameState::UpdateSongPosition] cur BPS = %f, fPositionSeconds = %f",m_fCurBPS,fPositionSeconds) );
|
LOG->Trace( ssprintf("[GameState::UpdateSongPosition] cur BPS = %f, fPositionSeconds = %f",m_fCurBPS,fPositionSeconds) );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze, m_bDelay, m_iWarpBeginRow, m_fWarpLength );
|
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze, m_bDelay, m_iWarpBeginRow, m_fWarpDestination );
|
||||||
// "Crash reason : -243478.890625 -48695.773438"
|
// "Crash reason : -243478.890625 -48695.773438"
|
||||||
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds", m_fSongBeat, fPositionSeconds) );
|
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds", m_fSongBeat, fPositionSeconds) );
|
||||||
|
|
||||||
//if( m_iWarpBeginRow != -1 || m_iWarpEndRow == -1 )
|
//if( m_iWarpBeginRow != -1 || m_iWarpEndRow == -1 )
|
||||||
if( m_iWarpBeginRow != -1 && m_fWarpLength > 0.0f )
|
|
||||||
|
if( m_iWarpBeginRow != -1 && m_fWarpDestination > 0.0f )
|
||||||
{
|
{
|
||||||
|
float fWarpLength = m_fWarpDestination-NoteRowToBeat(m_iWarpBeginRow);
|
||||||
// There is a warp in this section.
|
// There is a warp in this section.
|
||||||
LOG->Trace("warp at %i lasts for %f, jumps to %i",m_iWarpBeginRow,m_fWarpLength,m_iWarpBeginRow+BeatToNoteRow(m_fWarpLength));
|
LOG->Trace("warp at row %i lasts for %f beats, jumps to row %i",
|
||||||
//fPositionSeconds += (m_fWarpLength * m_fCurBPS);
|
m_iWarpBeginRow,
|
||||||
|
fWarpLength,
|
||||||
|
BeatToNoteRow(m_fWarpDestination));
|
||||||
|
fPositionSeconds += (fWarpLength * m_fCurBPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fMusicSeconds = fPositionSeconds;
|
m_fMusicSeconds = fPositionSeconds;
|
||||||
|
|||||||
+3
-2
@@ -208,9 +208,10 @@ public:
|
|||||||
bool m_bFreeze;
|
bool m_bFreeze;
|
||||||
/** @brief A flag to determine if we're in the middle of a delay (Pump style stop). */
|
/** @brief A flag to determine if we're in the middle of a delay (Pump style stop). */
|
||||||
bool m_bDelay;
|
bool m_bDelay;
|
||||||
// used for warping:
|
/** @brief The row used to start a warp. */
|
||||||
int m_iWarpBeginRow;
|
int m_iWarpBeginRow;
|
||||||
float m_fWarpLength;
|
/** @brief The beat to warp to afterwards. */
|
||||||
|
float m_fWarpDestination;
|
||||||
RageTimer m_LastBeatUpdate; // time of last m_fSongBeat, etc. update
|
RageTimer m_LastBeatUpdate; // time of last m_fSongBeat, etc. update
|
||||||
BroadcastOnChange<bool> m_bGameplayLeadIn;
|
BroadcastOnChange<bool> m_bGameplayLeadIn;
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -2551,8 +2551,8 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
|||||||
if( !NeedsTapJudging(tn) )
|
if( !NeedsTapJudging(tn) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// warp hackery
|
// Ignore all notes that are skipped via WARPS.
|
||||||
if( iter.Row() >= GAMESTATE->m_iWarpBeginRow && iter.Row() <= (GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) )
|
if( iter.Row() >= GAMESTATE->m_iWarpBeginRow && iter.Row() < BeatToNoteRow(GAMESTATE->m_fWarpDestination) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( tn.type == TapNote::mine )
|
if( tn.type == TapNote::mine )
|
||||||
@@ -2570,7 +2570,7 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
|||||||
{
|
{
|
||||||
// warp hackery: don't score notes within the warp region.
|
// warp hackery: don't score notes within the warp region.
|
||||||
// (Only useful when QuirksMode is enabled.) -aj
|
// (Only useful when QuirksMode is enabled.) -aj
|
||||||
if( iter.Row() >= GAMESTATE->m_iWarpBeginRow && iter.Row() <= (GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) )
|
if( iter.Row() >= GAMESTATE->m_iWarpBeginRow && iter.Row() < BeatToNoteRow(GAMESTATE->m_fWarpDestination) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
tn.result.tns = TNS_Miss;
|
tn.result.tns = TNS_Miss;
|
||||||
@@ -2593,7 +2593,7 @@ void Player::UpdateJudgedRows()
|
|||||||
|
|
||||||
// if row is within a warp section, ignore it. -aj
|
// if row is within a warp section, ignore it. -aj
|
||||||
if( iRow >= GAMESTATE->m_iWarpBeginRow &&
|
if( iRow >= GAMESTATE->m_iWarpBeginRow &&
|
||||||
iRow <= (GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) )
|
iRow < BeatToNoteRow(GAMESTATE->m_fWarpDestination) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( iLastSeenRow != iRow )
|
if( iLastSeenRow != iRow )
|
||||||
@@ -2929,7 +2929,7 @@ void Player::HandleTapRowScore( unsigned row )
|
|||||||
|
|
||||||
// more warp hackery. -aj
|
// more warp hackery. -aj
|
||||||
if( row >= (unsigned)GAMESTATE->m_iWarpBeginRow &&
|
if( row >= (unsigned)GAMESTATE->m_iWarpBeginRow &&
|
||||||
row <= (unsigned)(GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) )
|
row < (unsigned)(BeatToNoteRow(GAMESTATE->m_fWarpDestination)) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( GAMESTATE->m_bDemonstrationOrJukebox )
|
if( GAMESTATE->m_bDemonstrationOrJukebox )
|
||||||
@@ -3034,7 +3034,7 @@ void Player::HandleHoldCheckpoint( int iRow, int iNumHoldsHeldThisRow, int iNumH
|
|||||||
|
|
||||||
// more warp hackery. -aj
|
// more warp hackery. -aj
|
||||||
if( iRow >= GAMESTATE->m_iWarpBeginRow &&
|
if( iRow >= GAMESTATE->m_iWarpBeginRow &&
|
||||||
iRow <= (GAMESTATE->m_iWarpBeginRow + BeatToNoteRow(GAMESTATE->m_fWarpLength)) )
|
iRow < BeatToNoteRow(GAMESTATE->m_fWarpDestination) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// don't accumulate combo if AutoPlay is on.
|
// don't accumulate combo if AutoPlay is on.
|
||||||
|
|||||||
Reference in New Issue
Block a user