add accessors
move some stuff out of the header
This commit is contained in:
@@ -93,6 +93,26 @@ int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const floa
|
||||
return iNumSuccessfulHolds;
|
||||
}
|
||||
|
||||
bool NoteDataWithScoring::IsRowComplete( int index )
|
||||
{
|
||||
for( int t=0; t<m_iNumTracks; t++ )
|
||||
if( GetTapNote(t, index) != TAP_EMPTY && m_TapNoteScores[t][index] < TNS_GREAT )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
float NoteDataWithScoring::GetActualRadarValue( RadarCategory rv, float fSongSeconds )
|
||||
{
|
||||
switch( rv )
|
||||
{
|
||||
case RADAR_STREAM: return GetActualStreamRadarValue( fSongSeconds ); break;
|
||||
case RADAR_VOLTAGE: return GetActualVoltageRadarValue( fSongSeconds ); break;
|
||||
case RADAR_AIR: return GetActualAirRadarValue( fSongSeconds ); break;
|
||||
case RADAR_FREEZE: return GetActualFreezeRadarValue( fSongSeconds ); break;
|
||||
case RADAR_CHAOS: return GetActualChaosRadarValue( fSongSeconds ); break;
|
||||
default: ASSERT(0); return 0;
|
||||
}
|
||||
}
|
||||
|
||||
float NoteDataWithScoring::GetActualStreamRadarValue( float fSongSeconds )
|
||||
{
|
||||
|
||||
@@ -14,13 +14,15 @@
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "NoteData.h"
|
||||
|
||||
struct NoteDataWithScoring : public NoteData
|
||||
class NoteDataWithScoring : public NoteData
|
||||
{
|
||||
public:
|
||||
// maintain this extra data in addition to the NoteData
|
||||
TapNoteScore m_TapNoteScores[MAX_NOTE_TRACKS][MAX_TAP_NOTE_ROWS];
|
||||
|
||||
NoteDataWithScoring();
|
||||
void Init(int taps=0, int holds=0);
|
||||
|
||||
// maintain this extra data in addition to the NoteData
|
||||
TapNoteScore m_TapNoteScores[MAX_NOTE_TRACKS][MAX_TAP_NOTE_ROWS];
|
||||
vector<HoldNoteScore> m_HoldNoteScores;
|
||||
/* 1.0 means this HoldNote has full life.
|
||||
* 0.0 means this HoldNote is dead
|
||||
@@ -33,26 +35,18 @@ struct NoteDataWithScoring : public NoteData
|
||||
int GetNumDoublesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = MAX_BEATS );
|
||||
int GetNumHoldNotesWithScore( HoldNoteScore hns, const float fStartBeat = 0, const float fEndBeat = MAX_BEATS );
|
||||
|
||||
inline bool IsRowComplete( int index )
|
||||
TapNoteScore GetTapNoteScore(int track, int row) const
|
||||
{
|
||||
for( int t=0; t<m_iNumTracks; t++ )
|
||||
if( GetTapNote(t, index) != TAP_EMPTY && m_TapNoteScores[t][index] < TNS_GREAT )
|
||||
return false;
|
||||
return true;
|
||||
return m_TapNoteScores[track][row];
|
||||
}
|
||||
void SetTapNoteScore(int track, int row, TapNoteScore tns)
|
||||
{
|
||||
m_TapNoteScores[track][row] = tns;
|
||||
}
|
||||
|
||||
float GetActualRadarValue( RadarCategory rv, float fSongSeconds )
|
||||
{
|
||||
switch( rv )
|
||||
{
|
||||
case RADAR_STREAM: return GetActualStreamRadarValue( fSongSeconds ); break;
|
||||
case RADAR_VOLTAGE: return GetActualVoltageRadarValue( fSongSeconds ); break;
|
||||
case RADAR_AIR: return GetActualAirRadarValue( fSongSeconds ); break;
|
||||
case RADAR_FREEZE: return GetActualFreezeRadarValue( fSongSeconds ); break;
|
||||
case RADAR_CHAOS: return GetActualChaosRadarValue( fSongSeconds ); break;
|
||||
default: ASSERT(0); return 0;
|
||||
}
|
||||
};
|
||||
bool IsRowComplete( int index );
|
||||
|
||||
float GetActualRadarValue( RadarCategory rv, float fSongSeconds );
|
||||
float GetActualStreamRadarValue( float fSongSeconds );
|
||||
float GetActualVoltageRadarValue( float fSongSeconds );
|
||||
float GetActualAirRadarValue( float fSongSeconds );
|
||||
|
||||
Reference in New Issue
Block a user