Files
itgmania212121/stepmania/src/NoteDataWithScoring.h
T

80 lines
2.4 KiB
C++
Raw Normal View History

#ifndef NOTEDATAWITHSCORING_H
#define NOTEDATAWITHSCORING_H
2002-06-23 02:50:33 +00:00
/*
-----------------------------------------------------------------------------
Class: NoteDataWithScoring
Desc: NoteData with scores for each TapNote and HoldNote
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "GameConstantsAndTypes.h"
#include "NoteData.h"
2002-12-17 22:05:17 +00:00
class NoteDataWithScoring : public NoteData
2002-06-23 02:50:33 +00:00
{
2002-12-17 22:05:17 +00:00
// maintain this extra data in addition to the NoteData
2002-12-17 23:31:35 +00:00
vector<TapNoteScore> m_TapNoteScores[MAX_NOTE_TRACKS];
2002-12-17 22:05:17 +00:00
2002-11-03 21:38:22 +00:00
vector<HoldNoteScore> m_HoldNoteScores;
2002-12-17 23:12:37 +00:00
2002-11-03 21:38:22 +00:00
/* 1.0 means this HoldNote has full life.
* 0.0 means this HoldNote is dead
* When this value hits 0.0 for the first time, m_HoldScore becomes HSS_NG.
* If the life is > 0.0 when the HoldNote ends, then m_HoldScore becomes HSS_OK. */
vector<float> m_fHoldNoteLife;
2002-06-23 02:50:33 +00:00
2002-12-17 23:12:37 +00:00
public:
NoteDataWithScoring();
void Init(int taps=0, int holds=0);
2002-06-23 02:50:33 +00:00
// statistics
2002-09-12 02:31:52 +00:00
int GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = MAX_BEATS );
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 );
2002-06-23 02:50:33 +00:00
2002-12-17 23:09:10 +00:00
const TapNoteScore &GetTapNoteScore(int track, int row) const
2002-07-03 03:13:13 +00:00
{
2002-12-18 08:26:56 +00:00
ASSERT(row < int(m_TapNoteScores[track].size()));
2002-12-17 22:05:17 +00:00
return m_TapNoteScores[track][row];
}
2002-12-17 23:09:10 +00:00
TapNoteScore &GetTapNoteScore(int track, int row)
2002-12-17 22:05:17 +00:00
{
2002-12-18 08:26:56 +00:00
ASSERT(row < int(m_TapNoteScores[track].size()));
2002-12-17 23:09:10 +00:00
return m_TapNoteScores[track][row];
}
const HoldNoteScore &GetHoldNoteScore(int h) const
{
2002-12-18 08:26:56 +00:00
ASSERT(h < int(m_HoldNoteScores.size()));
2002-12-17 23:09:10 +00:00
return m_HoldNoteScores[h];
}
HoldNoteScore &GetHoldNoteScore(int h)
{
2002-12-18 08:26:56 +00:00
ASSERT(h < int(m_HoldNoteScores.size()));
2002-12-17 23:09:10 +00:00
return m_HoldNoteScores[h];
}
float &GetHoldNoteLife(int h)
{
return m_fHoldNoteLife[h];
}
const float &GetHoldNoteLife(int h) const
{
return m_fHoldNoteLife[h];
2002-07-03 03:13:13 +00:00
}
2002-06-23 02:50:33 +00:00
2002-12-17 22:05:17 +00:00
bool IsRowComplete( int index );
float GetActualRadarValue( RadarCategory rv, float fSongSeconds );
2002-06-23 02:50:33 +00:00
float GetActualStreamRadarValue( float fSongSeconds );
float GetActualVoltageRadarValue( float fSongSeconds );
float GetActualAirRadarValue( float fSongSeconds );
float GetActualFreezeRadarValue( float fSongSeconds );
float GetActualChaosRadarValue( float fSongSeconds );
};
#endif