Revert. This is required for the editor which can start in the middle of the song.

This commit is contained in:
Steve Checkoway
2006-08-01 20:58:30 +00:00
parent 433155f1e1
commit c1899d448f
2 changed files with 12 additions and 8 deletions
+7 -6
View File
@@ -319,12 +319,13 @@ void Player::Load()
m_bLoaded = true;
m_LastTapNoteScore = TNS_None;
m_iRowLastCrossed = -1;
m_iMineRowLastCrossed = -1;
m_iRowLastJudged = -1;
m_iMineRowLastJudged = -1;
m_JudgedRows.Reset();
// The editor can start playing in the middle of the song.
const int iNoteRow = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat );
m_iRowLastCrossed = iNoteRow - 1;
m_iMineRowLastCrossed = iNoteRow - 1;
m_iRowLastJudged = iNoteRow - 1;
m_iMineRowLastJudged = iNoteRow - 1;
m_JudgedRows.Reset( iNoteRow );
// TODO: Remove use of PlayerNumber.
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
+5 -2
View File
@@ -12,6 +12,7 @@
#include "AttackDisplay.h"
#include "NoteData.h"
#include "ScreenMessage.h"
//#include "RageLog.h"
class ScoreDisplay;
class LifeMeter;
@@ -48,6 +49,7 @@ class JudgedRows
{
char *p = m_pRows;
int newSize = max( m_iLen*2, iMin );
//LOG->Trace( "Old size %d, new size %d.", m_iLen, newSize );
m_pRows = new char[newSize];
int i = 0;
if( p )
@@ -77,9 +79,10 @@ public:
}
return ret;
}
void Reset()
void Reset( int iStart )
{
m_iStart = m_iOffset = 0;
m_iStart = iStart;
m_iOffset = 0;
memset( m_pRows, 0, m_iLen );
}
};