Ez2 only has perfect/good/miss -- adjust normal ddr judgments to accomodate ez2's.

This commit is contained in:
Andrew Livy
2003-09-08 15:30:26 +00:00
parent a90822bb19
commit 48ece6919c
+31 -2
View File
@@ -506,6 +506,20 @@ void PlayerMinus::Step( int col, RageTimer tm )
switch( GAMESTATE->m_PlayerController[m_PlayerNumber] ) switch( GAMESTATE->m_PlayerController[m_PlayerNumber] )
{ {
case PC_HUMAN: { case PC_HUMAN: {
if(GAMESTATE->m_CurGame == GAME_EZ2)
{
/* 1 is normal. 2 means scoring is half as hard; .5 means it's twice as hard. */
/* Ez2 is only perfect / good / miss */
float fScaledSecondsFromPerfect = fSecondsFromPerfect / PREFSMAN->m_fJudgeWindowScale;
if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowMarvelousSeconds ) score = TNS_PERFECT;
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowPerfectSeconds ) score = TNS_PERFECT;
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGreatSeconds ) score = TNS_PERFECT;
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGoodSeconds ) score = TNS_GOOD;
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_MISS;
else score = TNS_NONE;
}
else
{
/* 1 is normal. 2 means scoring is half as hard; .5 means it's twice as hard. */ /* 1 is normal. 2 means scoring is half as hard; .5 means it's twice as hard. */
float fScaledSecondsFromPerfect = fSecondsFromPerfect / PREFSMAN->m_fJudgeWindowScale; float fScaledSecondsFromPerfect = fSecondsFromPerfect / PREFSMAN->m_fJudgeWindowScale;
if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowMarvelousSeconds ) score = TNS_MARVELOUS; if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowMarvelousSeconds ) score = TNS_MARVELOUS;
@@ -514,7 +528,7 @@ void PlayerMinus::Step( int col, RageTimer tm )
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGoodSeconds ) score = TNS_GOOD; else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowGoodSeconds ) score = TNS_GOOD;
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_BOO; else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_BOO;
else score = TNS_NONE; else score = TNS_NONE;
}
// Penalize for stepping on mines // Penalize for stepping on mines
if( tn == TAP_MINE && score > TNS_NONE ) if( tn == TAP_MINE && score > TNS_NONE )
{ {
@@ -528,6 +542,15 @@ void PlayerMinus::Step( int col, RageTimer tm )
case PC_CPU: case PC_CPU:
score = PlayerAI::GetTapNoteScore( GAMESTATE->m_iCpuSkill[m_PlayerNumber], GAMESTATE->GetSumOfActiveAttackLevels(m_PlayerNumber) ); score = PlayerAI::GetTapNoteScore( GAMESTATE->m_iCpuSkill[m_PlayerNumber], GAMESTATE->GetSumOfActiveAttackLevels(m_PlayerNumber) );
if( GAMESTATE->m_CurGame == GAME_EZ2 ) // scores are only perfect/good/miss on ez2 adjust accordingly
{
if(score == TNS_GREAT || score == TNS_MARVELOUS)
score = TNS_PERFECT;
if(score == TNS_BOO)
score = TNS_MISS;
}
/* AI will generate misses here. Don't handle a miss like a regular note because /* AI will generate misses here. Don't handle a miss like a regular note because
* we want the judgment animation to appear delayed. Instead, return early if * we want the judgment animation to appear delayed. Instead, return early if
* AI generated a miss, and let UpdateMissedTapNotesOlderThan() detect and handle the * AI generated a miss, and let UpdateMissedTapNotesOlderThan() detect and handle the
@@ -544,8 +567,14 @@ void PlayerMinus::Step( int col, RageTimer tm )
} }
break; break;
case PC_AUTOPLAY: case PC_AUTOPLAY:
if(GAMESTATE->m_CurGame == GAME_EZ2)
{
score = TNS_PERFECT;
}
else
{
score = TNS_MARVELOUS; score = TNS_MARVELOUS;
}
// Don't step on mines // Don't step on mines
if( tn == TAP_MINE ) if( tn == TAP_MINE )
return; return;