add TNS_AVOIDED_MINE. Fixes unattempted mines counted as successful when ending early.
This commit is contained in:
@@ -126,6 +126,7 @@ StringToX( SortOrder );
|
|||||||
static const CString TapNoteScoreNames[NUM_TAP_NOTE_SCORES] = {
|
static const CString TapNoteScoreNames[NUM_TAP_NOTE_SCORES] = {
|
||||||
"None",
|
"None",
|
||||||
"HitMine",
|
"HitMine",
|
||||||
|
"AvoidMine",
|
||||||
"Miss",
|
"Miss",
|
||||||
"Boo",
|
"Boo",
|
||||||
"Good",
|
"Good",
|
||||||
|
|||||||
@@ -128,13 +128,14 @@ inline bool IsSongSort( SortOrder so ) { return so >= SORT_PREFERRED && so <= SO
|
|||||||
enum TapNoteScore {
|
enum TapNoteScore {
|
||||||
TNS_NONE,
|
TNS_NONE,
|
||||||
TNS_HIT_MINE,
|
TNS_HIT_MINE,
|
||||||
|
TNS_AVOIDED_MINE,
|
||||||
TNS_MISS,
|
TNS_MISS,
|
||||||
TNS_BOO,
|
TNS_BOO,
|
||||||
TNS_GOOD,
|
TNS_GOOD,
|
||||||
TNS_GREAT,
|
TNS_GREAT,
|
||||||
TNS_PERFECT,
|
TNS_PERFECT,
|
||||||
TNS_MARVELOUS,
|
TNS_MARVELOUS,
|
||||||
NUM_TAP_NOTE_SCORES
|
NUM_TAP_NOTE_SCORES,
|
||||||
};
|
};
|
||||||
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns )
|
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TAP_NOTE_SCORES, tns )
|
||||||
const CString& TapNoteScoreToString( TapNoteScore tns );
|
const CString& TapNoteScoreToString( TapNoteScore tns );
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ int GetSuccessfulMines( const NoteData &in, int iStartIndex = 0, int iEndIndex =
|
|||||||
for( int t=0; t<in.GetNumTracks(); t++ )
|
for( int t=0; t<in.GetNumTracks(); t++ )
|
||||||
{
|
{
|
||||||
const TapNote &tn = in.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_AVOIDED_MINE )
|
||||||
iNumSuccessfulMinesNotes++;
|
iNumSuccessfulMinesNotes++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1063,6 +1063,7 @@ void Player::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
|
|||||||
TapNoteScore score = NoteDataWithScoring::LastTapNoteScore( m_NoteData, 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);
|
||||||
|
ASSERT(score != TNS_AVOIDED_MINE);
|
||||||
|
|
||||||
/* If the whole row was hit with perfects or greats, remove the row
|
/* If the whole row was hit with perfects or greats, remove the row
|
||||||
* from the NoteField, so it disappears. */
|
* from the NoteField, so it disappears. */
|
||||||
@@ -1143,21 +1144,25 @@ void Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds )
|
|||||||
{
|
{
|
||||||
case TapNote::empty:
|
case TapNote::empty:
|
||||||
case TapNote::attack:
|
case TapNote::attack:
|
||||||
case TapNote::mine:
|
|
||||||
continue; /* no note here */
|
continue; /* no note here */
|
||||||
}
|
}
|
||||||
if( tn.result.tns != TNS_NONE ) /* note here is already hit */
|
if( tn.result.tns != TNS_NONE ) /* note here is already hit */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
tn.result.tns = TNS_MISS;
|
if( tn.type == TapNote::mine )
|
||||||
|
{
|
||||||
// A normal note. Penalize for not stepping on it.
|
tn.result.tns = TNS_AVOIDED_MINE;
|
||||||
MissedNoteOnThisRow = true;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// A normal note. Penalize for not stepping on it.
|
||||||
|
MissedNoteOnThisRow = true;
|
||||||
|
tn.result.tns = TNS_MISS;
|
||||||
|
if( m_pPlayerStageStats )
|
||||||
|
m_pPlayerStageStats->iTotalError += MAX_PRO_TIMING_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
m_NoteData.SetTapNote( t, r, tn );
|
m_NoteData.SetTapNote( t, r, tn );
|
||||||
|
|
||||||
if( m_pPlayerStageStats )
|
|
||||||
m_pPlayerStageStats->iTotalError += MAX_PRO_TIMING_ERROR;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( MissedNoteOnThisRow )
|
if( MissedNoteOnThisRow )
|
||||||
|
|||||||
@@ -129,15 +129,16 @@ Grade PlayerStageStats::GetGrade() const
|
|||||||
int iTapScoreValue;
|
int iTapScoreValue;
|
||||||
switch( tns )
|
switch( tns )
|
||||||
{
|
{
|
||||||
case TNS_NONE: iTapScoreValue = 0; break;
|
case TNS_NONE: iTapScoreValue = 0; break;
|
||||||
case TNS_HIT_MINE: iTapScoreValue = PREFSMAN->m_iGradeWeightHitMine; break;
|
case TNS_AVOIDED_MINE: iTapScoreValue = 0; break;
|
||||||
case TNS_MISS: iTapScoreValue = PREFSMAN->m_iGradeWeightMiss; break;
|
case TNS_HIT_MINE: iTapScoreValue = PREFSMAN->m_iGradeWeightHitMine; break;
|
||||||
case TNS_BOO: iTapScoreValue = PREFSMAN->m_iGradeWeightBoo; break;
|
case TNS_MISS: iTapScoreValue = PREFSMAN->m_iGradeWeightMiss; break;
|
||||||
case TNS_GOOD: iTapScoreValue = PREFSMAN->m_iGradeWeightGood; break;
|
case TNS_BOO: iTapScoreValue = PREFSMAN->m_iGradeWeightBoo; break;
|
||||||
case TNS_GREAT: iTapScoreValue = PREFSMAN->m_iGradeWeightGreat; break;
|
case TNS_GOOD: iTapScoreValue = PREFSMAN->m_iGradeWeightGood; break;
|
||||||
case TNS_PERFECT: iTapScoreValue = PREFSMAN->m_iGradeWeightPerfect; break;
|
case TNS_GREAT: iTapScoreValue = PREFSMAN->m_iGradeWeightGreat; break;
|
||||||
case TNS_MARVELOUS: iTapScoreValue = PREFSMAN->m_iGradeWeightMarvelous; break;
|
case TNS_PERFECT: iTapScoreValue = PREFSMAN->m_iGradeWeightPerfect; break;
|
||||||
default: FAIL_M( ssprintf("%i", tns) ); break;
|
case TNS_MARVELOUS: iTapScoreValue = PREFSMAN->m_iGradeWeightMarvelous; break;
|
||||||
|
default: FAIL_M( ssprintf("%i", tns) ); break;
|
||||||
}
|
}
|
||||||
Actual += iTapNoteScores[tns] * iTapScoreValue;
|
Actual += iTapNoteScores[tns] * iTapScoreValue;
|
||||||
if( tns != TNS_HIT_MINE )
|
if( tns != TNS_HIT_MINE )
|
||||||
|
|||||||
@@ -1435,19 +1435,27 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
TapNoteScore tns = m_Player[p].GetLastTapNoteScore();
|
TapNoteScore tns = m_Player[p].GetLastTapNoteScore();
|
||||||
|
|
||||||
ANIM_STATES_2D StateMap[NUM_TAP_NOTE_SCORES] =
|
ANIM_STATES_2D state = AS2D_MISS;
|
||||||
|
|
||||||
|
switch( tns )
|
||||||
{
|
{
|
||||||
AS2D_MISS, /* TNS_NONE (shouldn't happen) */
|
case TNS_NONE:
|
||||||
AS2D_MISS, /* TNS_HIT_MINE (shouldn't happen) */
|
case TNS_MISS:
|
||||||
AS2D_MISS, /* TNS_MISS */
|
case TNS_BOO:
|
||||||
AS2D_MISS, /* TNS_BOO */
|
state = AS2D_MISS;
|
||||||
AS2D_GOOD, /* TNS_GOOD */
|
break;
|
||||||
AS2D_GOOD, /* TNS_GREAT */
|
case TNS_GOOD:
|
||||||
AS2D_GREAT, /* TNS_PERFECT */
|
case TNS_GREAT:
|
||||||
AS2D_GREAT /* TNS_MARVELOUS */
|
state = AS2D_GOOD;
|
||||||
};
|
break;
|
||||||
|
case TNS_PERFECT:
|
||||||
|
case TNS_MARVELOUS:
|
||||||
|
state = AS2D_GREAT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
|
||||||
ANIM_STATES_2D state = StateMap[tns];
|
|
||||||
if( state == AS2D_GREAT && m_pLifeMeter[p] && m_pLifeMeter[p]->GetLife() == 1.0f ) // full life
|
if( state == AS2D_GREAT && m_pLifeMeter[p] && m_pLifeMeter[p]->GetLife() == 1.0f ) // full life
|
||||||
state = AS2D_FEVER;
|
state = AS2D_FEVER;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user