Radar branch: add Fakes wherever it made sense.
Need to check metrics, then ready to test.
This commit is contained in:
@@ -635,6 +635,20 @@ int NoteData::GetNumLifts( int iStartIndex, int iEndIndex ) const
|
||||
return iNumLifts;
|
||||
}
|
||||
|
||||
int NoteData::GetNumFakes( int iStartIndex, int iEndIndex ) const
|
||||
{
|
||||
int iNumFakes = 0;
|
||||
|
||||
for( int t=0; t<GetNumTracks(); t++ )
|
||||
{
|
||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||
if( GetTapNote(t, r).type == TapNote::fake )
|
||||
iNumFakes++;
|
||||
}
|
||||
|
||||
return iNumFakes;
|
||||
}
|
||||
|
||||
/*
|
||||
int NoteData::GetNumMinefields( int iStartIndex, int iEndIndex ) const
|
||||
{
|
||||
|
||||
@@ -233,6 +233,7 @@ public:
|
||||
|
||||
// and the other notetypes
|
||||
int GetNumLifts( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||
int GetNumFakes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||
|
||||
// Transformations
|
||||
void LoadTransformed( const NoteData& original, int iNewNumTracks, const int iOriginalTrackToTakeFrom[] ); // -1 for iOriginalTracksToTakeFrom means no track
|
||||
|
||||
@@ -749,6 +749,7 @@ void NoteDataUtil::CalculateRadarValues( const NoteData &in, float fSongSeconds,
|
||||
case RadarCategory_Hands: out[rc] = (float) in.GetNumHands(); break;
|
||||
case RadarCategory_Rolls: out[rc] = (float) in.GetNumRolls(); break;
|
||||
case RadarCategory_Lifts: out[rc] = (float) in.GetNumLifts(); break;
|
||||
case RadarCategory_Fakes: out[rc] = (float) in.GetNumFakes(); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,7 +348,8 @@ void NoteDataWithScoring::GetActualRadarValues( const NoteData &in, const Player
|
||||
case RadarCategory_Mines: out[rc] = (float) GetSuccessfulMines( in ); break;
|
||||
case RadarCategory_Hands: out[rc] = (float) GetSuccessfulHands( in ); break;
|
||||
case RadarCategory_Rolls: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_Held ); break;
|
||||
case RadarCategory_Lifts: out[rc] = (float) GetSuccessfulLifts( in, TNS_W4 ); break;
|
||||
case RadarCategory_Lifts: out[rc] = (float) GetSuccessfulLifts( in, TNS_W4 ); break;
|
||||
case RadarCategory_Fakes: out[rc] = (float) in.GetNumLifts(); break;
|
||||
//case RadarCategory_Minefields: out[rc] = (float) GetNumMinefieldsWithScore( in, TapNote::hold_head_mine, HNS_Held ); break;
|
||||
DEFAULT_FAIL( rc );
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ static const char *PaneCategoryNames[] = {
|
||||
"Mines",
|
||||
"Hands",
|
||||
"Lifts",
|
||||
"Fakes",
|
||||
"MachineHighScore",
|
||||
"MachineHighName",
|
||||
"ProfileHighScore",
|
||||
@@ -206,6 +207,7 @@ void PaneDisplay::SetContent( PaneCategory c )
|
||||
case PaneCategory_Mines: val = rv[RadarCategory_Mines]; break;
|
||||
case PaneCategory_Hands: val = rv[RadarCategory_Hands]; break;
|
||||
case PaneCategory_Lifts: val = rv[RadarCategory_Lifts]; break;
|
||||
case PaneCategory_Fakes: val = rv[RadarCategory_Fakes]; break;
|
||||
case PaneCategory_ProfileHighScore:
|
||||
case PaneCategory_MachineHighName: // set val for color
|
||||
case PaneCategory_MachineHighScore:
|
||||
|
||||
@@ -22,6 +22,7 @@ enum PaneCategory
|
||||
PaneCategory_Mines,
|
||||
PaneCategory_Hands,
|
||||
PaneCategory_Lifts,
|
||||
PaneCategory_Fakes,
|
||||
PaneCategory_MachineHighScore,
|
||||
PaneCategory_MachineHighName,
|
||||
PaneCategory_ProfileHighScore,
|
||||
|
||||
@@ -198,6 +198,7 @@ void ScreenEvaluation::Init()
|
||||
case RadarCategory_Hands:
|
||||
case RadarCategory_Rolls:
|
||||
case RadarCategory_Lifts:
|
||||
case RadarCategory_Fakes:
|
||||
ss.m_player[p].m_radarPossible[rc] = 1 + (rand() % 200);
|
||||
ss.m_player[p].m_radarActual[rc] = rand() % (int)(ss.m_player[p].m_radarPossible[rc]);
|
||||
break;
|
||||
@@ -541,8 +542,8 @@ void ScreenEvaluation::Init()
|
||||
|
||||
static const int indeces[NUM_DetailLine] =
|
||||
{
|
||||
RadarCategory_TapsAndHolds, RadarCategory_Jumps, RadarCategory_Holds, RadarCategory_Mines, RadarCategory_Hands, RadarCategory_Rolls
|
||||
//, RadarCategory_Lifts
|
||||
RadarCategory_TapsAndHolds, RadarCategory_Jumps, RadarCategory_Holds, RadarCategory_Mines,
|
||||
RadarCategory_Hands, RadarCategory_Rolls, RadarCategory_Lifts, RadarCategory_Fakes
|
||||
};
|
||||
const int ind = indeces[l];
|
||||
const int iActual = lrintf(m_pStageStats->m_player[p].m_radarActual[ind]);
|
||||
|
||||
@@ -41,6 +41,8 @@ enum DetailLine
|
||||
DetailLine_Mines, /**< The number of mines avoided. */
|
||||
DetailLine_Hands, /**< The number of hands hit (somehow) */
|
||||
DetailLine_Rolls, /**< The number of rolls hit repeatedly. */
|
||||
DetailLine_Lifts, /**< The number of lifts lifted up. */
|
||||
DetailLine_Fakes, /**< The number of fakes to be ignored. */
|
||||
NUM_DetailLine /**< The nuber of detailed lines. */
|
||||
};
|
||||
/** @brief Shows the player their score after gameplay has ended. */
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ float Steps::PredictMeter() const
|
||||
const float RadarCoeffs[NUM_RadarCategory] =
|
||||
{
|
||||
10.1f, 5.27f,-0.905f, -1.10f, 2.86f,
|
||||
0,0,0,0,0,0
|
||||
0,0,0,0,0,0,0,0
|
||||
};
|
||||
const RadarValues &rv = GetRadarValues( PLAYER_1 );
|
||||
for( int r = 0; r < NUM_RadarCategory; ++r )
|
||||
|
||||
Reference in New Issue
Block a user