NoteDataWithScoring has no members; turn it into a namespace

This commit is contained in:
Glenn Maynard
2005-01-22 18:22:38 +00:00
parent 48bce52780
commit 4970e024f3
6 changed files with 118 additions and 123 deletions
+104 -91
View File
@@ -1,23 +1,27 @@
#include "global.h" #include "global.h"
#include "NoteDataWithScoring.h" #include "NoteDataWithScoring.h"
#include "NoteData.h"
#include "StageStats.h" #include "StageStats.h"
int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat, float fEndBeat ) const namespace
{
int GetNumTapNotesWithScore( const NoteData &in, TapNoteScore tns, const float fStartBeat = 0, float fEndBeat = -1 )
{ {
int iNumSuccessfulTapNotes = 0; int iNumSuccessfulTapNotes = 0;
if( fEndBeat == -1 ) if( fEndBeat == -1 )
fEndBeat = GetLastBeat(); fEndBeat = in.GetLastBeat();
int iStartIndex = BeatToNoteRow( fStartBeat ); int iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat ); int iEndIndex = BeatToNoteRow( fEndBeat );
iEndIndex = min( iEndIndex, GetLastRow() ); iEndIndex = min( iEndIndex, in.GetLastRow() );
for( int t=0; t<GetNumTracks(); t++ ) for( int t=0; t<in.GetNumTracks(); t++ )
{ {
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex ) FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( in, t, r, iStartIndex, iEndIndex )
{ {
const TapNote &tn = GetTapNote(t, r); const TapNote &tn = in.GetTapNote(t, r);
if( tn.result.tns >= tns ) if( tn.result.tns >= tns )
iNumSuccessfulTapNotes++; iNumSuccessfulTapNotes++;
} }
@@ -26,25 +30,25 @@ int NoteDataWithScoring::GetNumTapNotesWithScore( TapNoteScore tns, const float
return iNumSuccessfulTapNotes; return iNumSuccessfulTapNotes;
} }
int NoteDataWithScoring::GetNumNWithScore( TapNoteScore tns, int MinTaps, const float fStartBeat, float fEndBeat ) const int GetNumNWithScore( const NoteData &in, TapNoteScore tns, int MinTaps, const float fStartBeat = 0, float fEndBeat = -1 )
{ {
if( fEndBeat == -1 ) if( fEndBeat == -1 )
fEndBeat = GetLastBeat(); fEndBeat = in.GetLastBeat();
int iStartIndex = BeatToNoteRow( fStartBeat ); int iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat ); int iEndIndex = BeatToNoteRow( fEndBeat );
iStartIndex = max( iStartIndex, 0 ); iStartIndex = max( iStartIndex, 0 );
iEndIndex = min( iEndIndex, GetLastRow() ); iEndIndex = min( iEndIndex, in.GetLastRow() );
int iNumSuccessfulDoubles = 0; int iNumSuccessfulDoubles = 0;
for( int i=iStartIndex; i<=iEndIndex; i++ ) for( int i=iStartIndex; i<=iEndIndex; i++ )
{ {
int iNumNotesThisIndex = 0; int iNumNotesThisIndex = 0;
TapNoteScore minTapNoteScore = TNS_MARVELOUS; TapNoteScore minTapNoteScore = TNS_MARVELOUS;
for( int t=0; t<GetNumTracks(); t++ ) for( int t=0; t<in.GetNumTracks(); t++ )
{ {
const TapNote &tn = GetTapNote(t,i); const TapNote &tn = in.GetTapNote(t,i);
switch( tn.type ) switch( tn.type )
{ {
case TapNote::tap: case TapNote::tap:
@@ -60,19 +64,19 @@ int NoteDataWithScoring::GetNumNWithScore( TapNoteScore tns, int MinTaps, const
return iNumSuccessfulDoubles; return iNumSuccessfulDoubles;
} }
int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const float fStartBeat, float fEndBeat ) const int GetNumHoldNotesWithScore( const NoteData &in, HoldNoteScore hns, float fStartBeat = 0, float fEndBeat = -1 )
{ {
if( fEndBeat == -1 ) if( fEndBeat == -1 )
fEndBeat = GetLastBeat(); fEndBeat = in.GetLastBeat();
int iNumSuccessfulHolds = 0; int iNumSuccessfulHolds = 0;
int iStartIndex = BeatToNoteRow( fStartBeat ); int iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat ); int iEndIndex = BeatToNoteRow( fEndBeat );
for( int i=0; i<GetNumHoldNotes(); i++ ) for( int i=0; i<in.GetNumHoldNotes(); i++ )
{ {
const HoldNote &hn = GetHoldNote(i); const HoldNote &hn = in.GetHoldNote(i);
if( iStartIndex > hn.iStartRow || hn.iEndRow > iEndIndex ) if( iStartIndex > hn.iStartRow || hn.iEndRow > iEndIndex )
continue; continue;
if( hn.result.hns == hns ) if( hn.result.hns == hns )
@@ -81,23 +85,23 @@ int NoteDataWithScoring::GetNumHoldNotesWithScore( HoldNoteScore hns, const floa
return iNumSuccessfulHolds; return iNumSuccessfulHolds;
} }
int NoteDataWithScoring::GetSuccessfulMines( float fStartBeat, float fEndBeat ) const int GetSuccessfulMines( const NoteData &in, float fStartBeat = 0, float fEndBeat = -1 )
{ {
if( fEndBeat == -1 ) if( fEndBeat == -1 )
fEndBeat = GetLastBeat(); fEndBeat = in.GetLastBeat();
int iStartIndex = BeatToNoteRow( fStartBeat ); int iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat ); int iEndIndex = BeatToNoteRow( fEndBeat );
iStartIndex = max( iStartIndex, 0 ); iStartIndex = max( iStartIndex, 0 );
iEndIndex = min( iEndIndex, GetLastRow() ); iEndIndex = min( iEndIndex, in.GetLastRow() );
int iNumSuccessfulMinesNotes = 0; int iNumSuccessfulMinesNotes = 0;
for( int i=iStartIndex; i<=iEndIndex; i++ ) for( int i=iStartIndex; i<=iEndIndex; i++ )
{ {
for( int t=0; t<GetNumTracks(); t++ ) for( int t=0; t<in.GetNumTracks(); t++ )
{ {
const TapNote &tn = GetTapNote(t,i); const TapNote &tn = in.GetTapNote(t,i);
if( tn.type == TapNote::mine && tn.result.tns != TNS_HIT_MINE ) if( tn.type == TapNote::mine && tn.result.tns != TNS_HIT_MINE )
iNumSuccessfulMinesNotes++; iNumSuccessfulMinesNotes++;
} }
@@ -107,28 +111,28 @@ int NoteDataWithScoring::GetSuccessfulMines( float fStartBeat, float fEndBeat )
} }
/* See NoteData::GetNumHands(). */ /* See NoteData::GetNumHands(). */
int NoteDataWithScoring::GetSuccessfulHands( float fStartBeat, float fEndBeat ) const int GetSuccessfulHands( const NoteData &in, float fStartBeat = 0, float fEndBeat = -1 )
{ {
if( fEndBeat == -1 ) if( fEndBeat == -1 )
fEndBeat = GetLastBeat(); fEndBeat = in.GetLastBeat();
int iStartIndex = BeatToNoteRow( fStartBeat ); int iStartIndex = BeatToNoteRow( fStartBeat );
int iEndIndex = BeatToNoteRow( fEndBeat ); int iEndIndex = BeatToNoteRow( fEndBeat );
/* Clamp to known-good ranges. */ /* Clamp to known-good ranges. */
iStartIndex = max( iStartIndex, 0 ); iStartIndex = max( iStartIndex, 0 );
iEndIndex = min( iEndIndex, GetLastRow() ); iEndIndex = min( iEndIndex, in.GetLastRow() );
int iNum = 0; int iNum = 0;
for( int i=iStartIndex; i<=iEndIndex; i++ ) for( int i=iStartIndex; i<=iEndIndex; i++ )
{ {
if( !RowNeedsHands(i) ) if( !in.RowNeedsHands(i) )
continue; continue;
bool Missed = false; bool Missed = false;
for( int t=0; t<GetNumTracks(); t++ ) for( int t=0; t<in.GetNumTracks(); t++ )
{ {
TapNote tn = GetTapNote(t, i); TapNote tn = in.GetTapNote(t, i);
if( tn.type == TapNote::empty ) if( tn.type == TapNote::empty )
continue; continue;
if( tn.type == TapNote::mine ) // mines don't count if( tn.type == TapNote::mine ) // mines don't count
@@ -141,9 +145,9 @@ int NoteDataWithScoring::GetSuccessfulHands( float fStartBeat, float fEndBeat )
continue; continue;
/* Check hold scores. */ /* Check hold scores. */
for( int j=0; j<GetNumHoldNotes(); j++ ) for( int j=0; j<in.GetNumHoldNotes(); j++ )
{ {
const HoldNote &hn = GetHoldNote(j); const HoldNote &hn = in.GetHoldNote(j);
/* Check if the row we're checking is in range. */ /* Check if the row we're checking is in range. */
if( !hn.RowIsInRange(i) ) if( !hn.RowIsInRange(i) )
@@ -165,41 +169,19 @@ int NoteDataWithScoring::GetSuccessfulHands( float fStartBeat, float fEndBeat )
return iNum; return iNum;
} }
/* Return the minimum tap score of a row. If the row isn't complete (not all
* taps have been hit), return TNS_NONE or TNS_MISS. */
TapNoteScore NoteDataWithScoring::MinTapNoteScore(unsigned row) const
{
TapNoteScore score = TNS_MARVELOUS;
for( int t=0; t<GetNumTracks(); t++ )
{
/* Don't coun, or else the score
* will always be TNS_NONE. */
const TapNote &tn = GetTapNote(t, row);
if( tn.type == TapNote::empty || tn.type == TapNote::mine)
continue;
score = min( score, tn.result.tns );
}
return score;
}
bool NoteDataWithScoring::IsRowCompletelyJudged(unsigned row) const
{
return MinTapNoteScore(row) >= TNS_MISS;
}
/* Return the last tap score of a row: the grade of the tap that completed /* Return the last tap score of a row: the grade of the tap that completed
* the row. If the row has no tap notes, return -1. If any tap notes aren't * the row. If the row has no tap notes, return -1. If any tap notes aren't
* graded (any tap is TNS_NONE) or are missed (TNS_MISS), return it. */ * graded (any tap is TNS_NONE) or are missed (TNS_MISS), return it. */
/* XXX: this will fill in many empty tap notes due to excess GetTapnote calls */ /* XXX: this will fill in many empty tap notes due to excess GetTapnote calls */
int NoteDataWithScoring::LastTapNoteScoreTrack(unsigned row) const int LastTapNoteScoreTrack( const NoteData &in, unsigned iRow )
{ {
float scoretime = -9999; float scoretime = -9999;
int best_track = -1; int best_track = -1;
for( int t=0; t<GetNumTracks(); t++ ) for( int t=0; t<in.GetNumTracks(); t++ )
{ {
/* Skip empty tracks and mines */ /* Skip empty tracks and mines */
const TapNote &tn = GetTapNote(t, row); const TapNote &tn = in.GetTapNote( t, iRow );
if( tn.type == TapNote::empty || tn.type == TapNote::mine ) if( tn.type == TapNote::empty || tn.type == TapNote::mine )
continue; continue;
@@ -208,7 +190,6 @@ int NoteDataWithScoring::LastTapNoteScoreTrack(unsigned row) const
if( tns == TNS_MISS || tns == TNS_NONE ) if( tns == TNS_MISS || tns == TNS_NONE )
return t; return t;
float tm = tn.result.fTapNoteOffset; float tm = tn.result.fTapNoteOffset;
if(tm < scoretime) continue; if(tm < scoretime) continue;
@@ -219,11 +200,37 @@ int NoteDataWithScoring::LastTapNoteScoreTrack(unsigned row) const
return best_track; return best_track;
} }
TapNoteScore NoteDataWithScoring::LastTapNoteScore(unsigned row) const }
TapNoteScore NoteDataWithScoring::LastTapNoteScore( const NoteData &in, unsigned iRow )
{ {
int track = LastTapNoteScoreTrack(row); int iTrack = LastTapNoteScoreTrack( in, iRow );
if(track == -1) return TNS_NONE; if( iTrack == -1 )
return GetTapNote(track, row).result.tns; return TNS_NONE;
return in.GetTapNote(iTrack, iRow).result.tns;
}
/* Return the minimum tap score of a row. If the row isn't complete (not all
* taps have been hit), return TNS_NONE or TNS_MISS. */
TapNoteScore NoteDataWithScoring::MinTapNoteScore( const NoteData &in, unsigned row )
{
TapNoteScore score = TNS_MARVELOUS;
for( int t=0; t<in.GetNumTracks(); t++ )
{
/* Don't coun, or else the score
* will always be TNS_NONE. */
const TapNote &tn = in.GetTapNote(t, row);
if( tn.type == TapNote::empty || tn.type == TapNote::mine)
continue;
score = min( score, tn.result.tns );
}
return score;
}
bool NoteDataWithScoring::IsRowCompletelyJudged( const NoteData &in, unsigned row )
{
return MinTapNoteScore( in, row ) >= TNS_MISS;
} }
/* From aaroninjapan.com (http://www.aaroninjapan.com/ddr2.html) /* From aaroninjapan.com (http://www.aaroninjapan.com/ddr2.html)
@@ -238,40 +245,20 @@ TapNoteScore NoteDataWithScoring::LastTapNoteScore(unsigned row) const
* No idea what it actually could be, though. * No idea what it actually could be, though.
*/ */
void NoteDataWithScoring::GetActualRadarValues( PlayerNumber pn, float fSongSeconds, RadarValues& out ) const namespace
{ {
// The for loop and the assert are used to ensure that all fields of
// RadarValue get set in here.
FOREACH_RadarCategory( rc )
{
switch( rc )
{
case RADAR_STREAM: out[rc] = GetActualStreamRadarValue( fSongSeconds, pn ); break;
case RADAR_VOLTAGE: out[rc] = GetActualVoltageRadarValue( fSongSeconds, pn ); break;
case RADAR_AIR: out[rc] = GetActualAirRadarValue( fSongSeconds, pn ); break;
case RADAR_FREEZE: out[rc] = GetActualFreezeRadarValue( fSongSeconds, pn ); break;
case RADAR_CHAOS: out[rc] = GetActualChaosRadarValue( fSongSeconds, pn ); break;
case RADAR_NUM_TAPS_AND_HOLDS: out[rc] = (float) GetNumNWithScore( TNS_GOOD, 1 ); break;
case RADAR_NUM_JUMPS: out[rc] = (float) GetNumNWithScore( TNS_GOOD, 2 ); break;
case RADAR_NUM_HOLDS: out[rc] = (float) GetNumHoldNotesWithScore( HNS_OK ); break;
case RADAR_NUM_MINES: out[rc] = (float) GetSuccessfulMines(); break;
case RADAR_NUM_HANDS: out[rc] = (float) GetSuccessfulHands(); break;
default: ASSERT(0);
}
}
}
float NoteDataWithScoring::GetActualStreamRadarValue( float fSongSeconds, PlayerNumber pn ) const float GetActualStreamRadarValue( const NoteData &in, float fSongSeconds, PlayerNumber pn )
{ {
int iTotalSteps = GetNumTapNotes(); int iTotalSteps = in.GetNumTapNotes();
if( iTotalSteps == 0 ) if( iTotalSteps == 0 )
return 1.0f; return 1.0f;
const int Perfects = GetNumTapNotesWithScore(TNS_PERFECT); const int Perfects = GetNumTapNotesWithScore( in, TNS_PERFECT);
return clamp( float(Perfects)/iTotalSteps, 0.0f, 1.0f ); return clamp( float(Perfects)/iTotalSteps, 0.0f, 1.0f );
} }
float NoteDataWithScoring::GetActualVoltageRadarValue( float fSongSeconds, PlayerNumber pn ) const float GetActualVoltageRadarValue( const NoteData &in, float fSongSeconds, PlayerNumber pn )
{ {
/* g_CurStageStats.iMaxCombo is unrelated to GetNumTapNotes: m_bComboContinuesBetweenSongs /* g_CurStageStats.iMaxCombo is unrelated to GetNumTapNotes: m_bComboContinuesBetweenSongs
* might be on, and the way combo is counted varies depending on the mode and score * might be on, and the way combo is counted varies depending on the mode and score
@@ -282,18 +269,18 @@ float NoteDataWithScoring::GetActualVoltageRadarValue( float fSongSeconds, Playe
return clamp( fComboPercent, 0.0f, 1.0f ); return clamp( fComboPercent, 0.0f, 1.0f );
} }
float NoteDataWithScoring::GetActualAirRadarValue( float fSongSeconds, PlayerNumber pn ) const float GetActualAirRadarValue( const NoteData &in, float fSongSeconds, PlayerNumber pn )
{ {
const int iTotalDoubles = GetNumDoubles(); const int iTotalDoubles = in.GetNumDoubles();
if( iTotalDoubles == 0 ) if( iTotalDoubles == 0 )
return 1.0f; // no jumps in song return 1.0f; // no jumps in song
// number of doubles // number of doubles
const int iNumDoubles = GetNumNWithScore( TNS_PERFECT, 2 ); const int iNumDoubles = GetNumNWithScore( in, TNS_PERFECT, 2 );
return clamp( (float)iNumDoubles / iTotalDoubles, 0.0f, 1.0f ); return clamp( (float)iNumDoubles / iTotalDoubles, 0.0f, 1.0f );
} }
float NoteDataWithScoring::GetActualChaosRadarValue( float fSongSeconds, PlayerNumber pn ) const float GetActualChaosRadarValue( const NoteData &in, float fSongSeconds, PlayerNumber pn )
{ {
const int iPossibleDP = g_CurStageStats.m_player[pn].iPossibleDancePoints; const int iPossibleDP = g_CurStageStats.m_player[pn].iPossibleDancePoints;
if ( iPossibleDP == 0 ) if ( iPossibleDP == 0 )
@@ -303,17 +290,43 @@ float NoteDataWithScoring::GetActualChaosRadarValue( float fSongSeconds, PlayerN
return clamp( float(ActualDP)/iPossibleDP, 0.0f, 1.0f ); return clamp( float(ActualDP)/iPossibleDP, 0.0f, 1.0f );
} }
float NoteDataWithScoring::GetActualFreezeRadarValue( float fSongSeconds, PlayerNumber pn ) const float GetActualFreezeRadarValue( const NoteData &in, float fSongSeconds, PlayerNumber pn )
{ {
// number of hold steps // number of hold steps
const int iTotalHolds = GetNumHoldNotes(); const int iTotalHolds = in.GetNumHoldNotes();
if( iTotalHolds == 0 ) if( iTotalHolds == 0 )
return 1.0f; return 1.0f;
const int ActualHolds = GetNumHoldNotesWithScore(HNS_OK); const int ActualHolds = GetNumHoldNotesWithScore( in, HNS_OK );
return clamp( float(ActualHolds) / iTotalHolds, 0.0f, 1.0f ); return clamp( float(ActualHolds) / iTotalHolds, 0.0f, 1.0f );
} }
}
void NoteDataWithScoring::GetActualRadarValues( const NoteData &in, PlayerNumber pn, float fSongSeconds, RadarValues& out )
{
// The for loop and the assert are used to ensure that all fields of
// RadarValue get set in here.
FOREACH_RadarCategory( rc )
{
switch( rc )
{
case RADAR_STREAM: out[rc] = GetActualStreamRadarValue( in, fSongSeconds, pn ); break;
case RADAR_VOLTAGE: out[rc] = GetActualVoltageRadarValue( in, fSongSeconds, pn ); break;
case RADAR_AIR: out[rc] = GetActualAirRadarValue( in, fSongSeconds, pn ); break;
case RADAR_FREEZE: out[rc] = GetActualFreezeRadarValue( in, fSongSeconds, pn ); break;
case RADAR_CHAOS: out[rc] = GetActualChaosRadarValue( in, fSongSeconds, pn ); break;
case RADAR_NUM_TAPS_AND_HOLDS: out[rc] = (float) GetNumNWithScore( in, TNS_GOOD, 1 ); break;
case RADAR_NUM_JUMPS: out[rc] = (float) GetNumNWithScore( in, TNS_GOOD, 2 ); break;
case RADAR_NUM_HOLDS: out[rc] = (float) GetNumHoldNotesWithScore( in, HNS_OK ); break;
case RADAR_NUM_MINES: out[rc] = (float) GetSuccessfulMines( in ); break;
case RADAR_NUM_HANDS: out[rc] = (float) GetSuccessfulHands( in ); break;
default: ASSERT(0);
}
}
}
/* /*
* (c) 2001-2004 Chris Danford, Glenn Maynard * (c) 2001-2004 Chris Danford, Glenn Maynard
* All rights reserved. * All rights reserved.
+6 -24
View File
@@ -4,36 +4,18 @@
#define NOTEDATAWITHSCORING_H #define NOTEDATAWITHSCORING_H
#include "GameConstantsAndTypes.h" #include "GameConstantsAndTypes.h"
#include "NoteData.h"
#include "PlayerNumber.h" #include "PlayerNumber.h"
#include <map> #include <map>
struct RadarValues; struct RadarValues;
class NoteData;
class NoteDataWithScoring : public NoteData namespace NoteDataWithScoring
{ {
public: bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow );
bool IsRowCompletelyJudged( unsigned iRow ) const; TapNoteScore MinTapNoteScore( const NoteData &in, unsigned iRow );
TapNoteScore MinTapNoteScore( unsigned iRow ) const; TapNoteScore LastTapNoteScore( const NoteData &in, unsigned iRow );
TapNoteScore LastTapNoteScore( unsigned iRow ) const;
void GetActualRadarValues( PlayerNumber pn, float fSongSeconds, RadarValues& out ) const; void GetActualRadarValues( const NoteData &in, PlayerNumber pn, float fSongSeconds, RadarValues& out );
private:
int LastTapNoteScoreTrack( unsigned iRow ) const;
// statistics
int GetNumTapNotesWithScore( TapNoteScore tns, const float fStartBeat = 0, const float fEndBeat = -1 ) const;
int GetNumNWithScore( TapNoteScore tns, int iMinTaps, const float fStartBeat = 0, const float fEndBeat = -1 ) const;
int GetNumHoldNotesWithScore( HoldNoteScore hns, const float fStartBeat = 0, const float fEndBeat = -1 ) const;
int GetSuccessfulMines( const float fStartBeat = 0, const float fEndBeat = -1 ) const;
int GetSuccessfulHands( const float fStartBeat = 0, const float fEndBeat = -1 ) const;
float GetActualStreamRadarValue( float fSongSeconds, PlayerNumber pn ) const;
float GetActualVoltageRadarValue( float fSongSeconds, PlayerNumber pn ) const;
float GetActualAirRadarValue( float fSongSeconds, PlayerNumber pn ) const;
float GetActualFreezeRadarValue( float fSongSeconds, PlayerNumber pn ) const;
float GetActualChaosRadarValue( float fSongSeconds, PlayerNumber pn ) const;
}; };
#endif #endif
+4 -4
View File
@@ -945,7 +945,7 @@ void Player::Step( int col, RageTimer tm )
case TapNote::tap: case TapNote::tap:
case TapNote::hold_head: case TapNote::hold_head:
// don't the row if this note is a mine or tap attack // don't the row if this note is a mine or tap attack
if( m_NoteData.IsRowCompletelyJudged(iIndexOverlappingNote) ) if( NoteDataWithScoring::IsRowCompletelyJudged( m_NoteData, iIndexOverlappingNote ) )
OnRowCompletelyJudged( iIndexOverlappingNote ); OnRowCompletelyJudged( iIndexOverlappingNote );
} }
@@ -1026,8 +1026,8 @@ void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
* the 2nd step of the jump, it sets another column's timer then AND's the jump * the 2nd step of the jump, it sets another column's timer then AND's the jump
* columns with the "was pressed recently" columns to see whether or not you hit * columns with the "was pressed recently" columns to see whether or not you hit
* all the columns of the jump. -Chris */ * all the columns of the jump. -Chris */
// TapNoteScore score = MinTapNoteScore(iIndexThatWasSteppedOn); // TapNoteScore score = NoteDataWithScoring::MinTapNoteScore( m_NoteData, iIndexThatWasSteppedOn );
TapNoteScore score = m_NoteData.LastTapNoteScore( iIndexThatWasSteppedOn ); TapNoteScore score = NoteDataWithScoring::LastTapNoteScore( m_NoteData, iIndexThatWasSteppedOn );
ASSERT(score != TNS_NONE); ASSERT(score != TNS_NONE);
ASSERT(score != TNS_HIT_MINE); ASSERT(score != TNS_HIT_MINE);
@@ -1229,7 +1229,7 @@ void Player::RandomizeNotes( int iNoteRow )
void Player::HandleTapRowScore( unsigned row ) void Player::HandleTapRowScore( unsigned row )
{ {
TapNoteScore scoreOfLastTap = m_NoteData.LastTapNoteScore(row); TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteScore( m_NoteData, row );
int iNumTapsInRow = m_NoteData.GetNumTracksWithTapOrHoldHead(row); int iNumTapsInRow = m_NoteData.GetNumTracksWithTapOrHoldHead(row);
ASSERT(iNumTapsInRow > 0); ASSERT(iNumTapsInRow > 0);
+1 -1
View File
@@ -56,7 +56,7 @@ public:
void CacheAllUsedNoteSkins( bool bDeleteUnused ) { m_pNoteField->CacheAllUsedNoteSkins(bDeleteUnused); } void CacheAllUsedNoteSkins( bool bDeleteUnused ) { m_pNoteField->CacheAllUsedNoteSkins(bDeleteUnused); }
NoteDataWithScoring m_NoteData; NoteData m_NoteData;
protected: protected:
void UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat ); void UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat );
+2 -2
View File
@@ -151,7 +151,7 @@ protected:
Steps* m_pSteps; Steps* m_pSteps;
NoteField m_NoteFieldEdit; NoteField m_NoteFieldEdit;
NoteDataWithScoring m_NoteDataEdit; NoteData m_NoteDataEdit;
SnapDisplay m_SnapDisplay; SnapDisplay m_SnapDisplay;
AutoActor m_sprOverlay; AutoActor m_sprOverlay;
@@ -177,7 +177,7 @@ protected:
// for MODE_RECORD // for MODE_RECORD
NoteField m_NoteFieldRecord; NoteField m_NoteFieldRecord;
NoteDataWithScoring m_NoteDataRecord; NoteData m_NoteDataRecord;
// for MODE_PLAY // for MODE_PLAY
void SetupCourseAttacks(); void SetupCourseAttacks();
+1 -1
View File
@@ -2014,7 +2014,7 @@ void ScreenGameplay::SongFinished()
NoteDataUtil::GetRadarValues( m_Player[p].m_NoteData, GAMESTATE->m_pCurSong->m_fMusicLengthSeconds, v ); NoteDataUtil::GetRadarValues( m_Player[p].m_NoteData, GAMESTATE->m_pCurSong->m_fMusicLengthSeconds, v );
g_CurStageStats.m_player[p].radarPossible += v; g_CurStageStats.m_player[p].radarPossible += v;
m_Player[p].m_NoteData.GetActualRadarValues( p, GAMESTATE->m_pCurSong->m_fMusicLengthSeconds, v ); NoteDataWithScoring::GetActualRadarValues( m_Player[p].m_NoteData, p, GAMESTATE->m_pCurSong->m_fMusicLengthSeconds, v );
g_CurStageStats.m_player[p].radarActual += v; g_CurStageStats.m_player[p].radarActual += v;
} }