simplify mine scoring

add separate dance point weights for mines
This commit is contained in:
Chris Danford
2004-01-02 08:43:14 +00:00
parent 8c6249aa8c
commit 40b2ecfee5
21 changed files with 125 additions and 133 deletions
+2 -10
View File
@@ -33,6 +33,7 @@ HoldTailIsAboveWavyParts=1
[GhostArrowDim]
NoneCommand=
HitMineCommand=blend,add;diffuse,1,1,1,1;zoom,1;rotationz,0;linear,0.3;rotationz,90;linear,0.3;rotationz,180;diffusealpha,0
MissCommand=
BooCommand=diffuse,0.8,0.0,0.6,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
GoodCommand=diffuse,0.3,0.8,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
@@ -42,19 +43,10 @@ MarvelousCommand=diffuse,1.0,1.0,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;d
[GhostArrowBright]
NoneCommand=
HitMineCommand=blend,add;diffuse,1,1,1,1;zoom,1;rotationz,0;linear,0.3;rotationz,90;linear,0.3;rotationz,180;diffusealpha,0
MissCommand=
BooCommand=diffuse,0.8,0.0,0.6,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
GoodCommand=diffuse,0.3,0.8,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
GreatCommand=diffuse,0.0,1.0,0.4,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
PerfectCommand=diffuse,1.0,1.0,0.3,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
MarvelousCommand=diffuse,1.0,1.0,1.0,1;zoom,1;linear,0.06;zoom,1.1;linear,0.06;diffusealpha,0
[GhostArrowMine]
NoneCommand=
MissCommand=blend,add;diffuse,1,1,1,1;zoom,1;rotationz,0;linear,0.3;rotationz,90;linear,0.3;rotationz,180;diffusealpha,0
BooCommand=
GoodCommand=
GreatCommand=
PerfectCommand=
MarvelousCommand=
+1 -1
View File
@@ -114,7 +114,7 @@ void CombinedLifeMeterTug::ChangeLife( PlayerNumber pn, HoldNoteScore score, Tap
void CombinedLifeMeterTug::ChangeLifeMine( PlayerNumber pn )
{
float fPercentToMove = PREFSMAN->m_fLifeDeltaMinePercentChange;
float fPercentToMove = PREFSMAN->m_fLifeDeltaHitMinePercentChange;
switch( pn )
{
case PLAYER_1: GAMESTATE->m_fTugLifePercentP1 += fPercentToMove; break;
+9 -8
View File
@@ -154,14 +154,15 @@ CString TapNoteScoreToString( TapNoteScore tns )
{
switch( tns )
{
case TNS_NONE: return "none";
case TNS_MISS: return "miss";
case TNS_BOO: return "boo";
case TNS_GOOD: return "good";
case TNS_GREAT: return "great";
case TNS_PERFECT: return "perfect";
case TNS_MARVELOUS: return "marvelous";
default: ASSERT(0); return ""; // invalid Difficulty
case TNS_NONE: return "None";
case TNS_HIT_MINE: return "HitMine";
case TNS_MISS: return "Miss";
case TNS_BOO: return "Boo";
case TNS_GOOD: return "Good";
case TNS_GREAT: return "Great";
case TNS_PERFECT: return "Perfect";
case TNS_MARVELOUS: return "Marvelous";
default: ASSERT(0); return ""; // invalid
}
}
+1
View File
@@ -157,6 +157,7 @@ SongSortOrder StringToSongSortOrder( CString str );
enum TapNoteScore {
TNS_NONE,
TNS_HIT_MINE,
TNS_MISS,
TNS_BOO,
TNS_GOOD,
-15
View File
@@ -44,17 +44,14 @@ void GhostArrowRow::Load( PlayerNumber pn, CString NoteSkin, float fYReverseOffs
m_GhostDim[c].SetName( "GhostArrowDim" );
m_GhostBright[c].SetName( "GhostArrowBright" );
m_GhostMine[c].SetName( "GhostArrowMine" );
m_HoldGhost[c].SetName( "HoldGhostArrow" );
m_GhostDim[c].Init( pn );
m_GhostBright[c].Init( pn );
m_GhostMine[c].Init( pn );
//m_HoldGhost[c].Init( pn );
m_GhostDim[c].Load( NoteSkin, Button, "tap explosion dim", false);
m_GhostBright[c].Load( NoteSkin, Button, "tap explosion bright", false );
m_GhostMine[c].Load( NoteSkin, Button, "tap explosion mine", true );
m_HoldGhost[c].Load( NoteSkin, Button, "hold explosion" );
}
}
@@ -66,7 +63,6 @@ void GhostArrowRow::Update( float fDeltaTime )
{
m_GhostDim[c].Update( fDeltaTime );
m_GhostBright[c].Update( fDeltaTime );
m_GhostMine[c].Update( fDeltaTime );
m_HoldGhost[c].Update( fDeltaTime );
const float fX = ArrowGetXPos( m_PlayerNumber, c, 0 );
@@ -75,17 +71,14 @@ void GhostArrowRow::Update( float fDeltaTime )
m_GhostDim[c].SetX( fX );
m_GhostBright[c].SetX( fX );
m_GhostMine[c].SetX( fX );
m_HoldGhost[c].SetX( fX );
m_GhostDim[c].SetY( fY );
m_GhostBright[c].SetY( fY );
m_GhostMine[c].SetY( fY );
m_HoldGhost[c].SetY( fY );
m_GhostDim[c].SetZ( fZ );
m_GhostBright[c].SetZ( fZ );
m_GhostMine[c].SetZ( fZ );
m_HoldGhost[c].SetZ( fZ );
}
}
@@ -98,7 +91,6 @@ void GhostArrowRow::DrawPrimitives()
m_GhostDim[c].Draw();
m_GhostBright[c].Draw();
m_GhostMine[c].Draw();
m_HoldGhost[c].Draw();
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
@@ -121,19 +113,12 @@ void GhostArrowRow::SetHoldIsActive( int iCol )
m_HoldGhost[iCol].SetHoldIsActive( true );
}
void GhostArrowRow::DidTapMine( int iCol, TapNoteScore score )
{
m_GhostMine[iCol].Step( score );
}
void GhostArrowRow::CopyTweening( const GhostArrowRow &from )
{
for( int c=0; c<m_iNumCols; c++ )
{
m_GhostDim[c].CopyTweening( from.m_GhostDim[c] );
m_GhostBright[c].CopyTweening( from.m_GhostBright[c] );
m_GhostMine[c].CopyTweening( from.m_GhostMine[c] );
m_HoldGhost[c].CopyTweening( from.m_HoldGhost[c] );
}
ActorFrame::CopyTweening( from );
-2
View File
@@ -30,7 +30,6 @@ public:
void Load( PlayerNumber pn, CString NoteSkin, float fYReverseOffset );
void DidTapNote( int iCol, TapNoteScore score, bool bBright );
void DidTapMine( int iCol, TapNoteScore score );
void SetHoldIsActive( int iCol );
protected:
@@ -40,7 +39,6 @@ protected:
GhostArrow m_GhostDim[MAX_NOTE_TRACKS];
GhostArrow m_GhostBright[MAX_NOTE_TRACKS];
GhostArrow m_GhostMine[MAX_NOTE_TRACKS];
HoldGhostArrow m_HoldGhost[MAX_NOTE_TRACKS];
};
+2 -2
View File
@@ -448,12 +448,12 @@ void LifeMeterBar::ChangeLifeMine()
switch( GAMESTATE->m_SongOptions.m_DrainType )
{
case SongOptions::DRAIN_NORMAL:
fDeltaLife = PREFSMAN->m_fLifeDeltaMinePercentChange;
fDeltaLife = PREFSMAN->m_fLifeDeltaHitMinePercentChange;
if( IsHot() )
fDeltaLife = -0.10f; // make it take a while to get back to "doing great"
break;
case SongOptions::DRAIN_NO_RECOVER:
fDeltaLife = PREFSMAN->m_fLifeDeltaMinePercentChange;
fDeltaLife = PREFSMAN->m_fLifeDeltaHitMinePercentChange;
break;
case SongOptions::DRAIN_SUDDEN_DEATH:
fDeltaLife = -1.0;
+1 -1
View File
@@ -125,7 +125,7 @@ int NoteDataWithScoring::GetSuccessfulMines( float fStartBeat, float fEndBeat )
{
for( int t=0; t<GetNumTracks(); t++ )
{
if( this->GetTapNote(t, i) == TAP_MINE && GetTapNoteScore(t, i) != TNS_MISS )
if( this->GetTapNote(t, i) == TAP_MINE && GetTapNoteScore(t, i) != TNS_HIT_MINE )
iNumSuccessfulMinesNotes++;
}
}
-1
View File
@@ -656,4 +656,3 @@ void NoteField::Step( int iCol ) { SearchForSongBeat()->m_ReceptorArrowRow.Step(
void NoteField::SetPressed( int iCol ) { SearchForSongBeat()->m_ReceptorArrowRow.SetPressed( iCol ); }
void NoteField::DidTapNote( int iCol, TapNoteScore score, bool bBright ) { SearchForSongBeat()->m_GhostArrowRow.DidTapNote( iCol, score, bBright ); }
void NoteField::DidHoldNote( int iCol ) { /*SearchForSongBeat()->m_GhostArrowRow.DidHoldNote( iCol );*/ }
void NoteField::DidTapMine( int iCol, TapNoteScore score ) { SearchForSongBeat()->m_GhostArrowRow.DidTapMine( iCol, score ); }
-1
View File
@@ -52,7 +52,6 @@ public:
void SetPressed( int iCol );
void DidTapNote( int iCol, TapNoteScore score, bool bBright );
void DidHoldNote( int iCol );
void DidTapMine( int iCol, TapNoteScore score );
protected:
+22 -25
View File
@@ -605,7 +605,7 @@ void PlayerMinus::Step( int col, RageTimer tm )
TapNote tn = GetTapNote(col,iIndexOverlappingNote);
// calculate TapNoteScore
TapNoteScore score;
TapNoteScore score = TNS_NONE;
switch( GAMESTATE->m_PlayerController[m_PlayerNumber] )
{
@@ -644,18 +644,14 @@ void PlayerMinus::Step( int col, RageTimer tm )
if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowMineSeconds )
{
m_soundMine.Play();
score = TNS_MISS;
m_pNoteField->DidTapMine( col, score );
score = TNS_HIT_MINE;
if( m_pLifeMeter )
m_pLifeMeter->ChangeLifeMine();
if( m_pCombinedLifeMeter )
m_pCombinedLifeMeter->ChangeLifeMine(m_PlayerNumber);
m_pNoteField->SetTapNote(col, iIndexOverlappingNote, TAP_EMPTY); // remove from NoteField
}
else
{
score = TNS_NONE;
m_pNoteField->DidTapNote( col, score, false );
}
break;
@@ -744,14 +740,14 @@ void PlayerMinus::Step( int col, RageTimer tm )
// Unless the computer made a very good step, they were fooled by the mine
if( tn == TAP_MINE && score <= TNS_GOOD )
{
score = TNS_HIT_MINE;
m_soundMine.Play();
score = TNS_MISS;
m_pNoteField->DidTapMine( col, score );
if( m_pLifeMeter )
m_pLifeMeter->ChangeLifeMine();
if( m_pCombinedLifeMeter )
m_pCombinedLifeMeter->ChangeLifeMine(m_PlayerNumber);
m_pNoteField->SetTapNote(col, iIndexOverlappingNote, TAP_EMPTY); // remove from NoteField
m_pNoteField->DidTapNote( col, score, false );
}
if( IsTapAttack(tn) && score > TNS_GOOD )
{
@@ -842,6 +838,10 @@ void PlayerMinus::Step( int col, RageTimer tm )
score >= TNS_GREAT )
HandleAutosync(fNoteOffset);
if( m_pPrimaryScoreKeeper )
m_pPrimaryScoreKeeper->HandleTapScore( score );
if( m_pSecondaryScoreKeeper )
m_pSecondaryScoreKeeper->HandleTapScore( score );
if( IsThereATapOrHoldHeadAtRow(iIndexOverlappingNote) ) // don't judge rows that are only mines
{
@@ -906,9 +906,16 @@ void PlayerMinus::OnRowCompletelyJudged( int iIndexThatWasSteppedOn )
* slightly more harsh scoring than DDR */
/* I'm not sure this is right, either. Can you really jump a boo and a perfect
* and get scored for a perfect? (That's so loose, you can gallop jumps.) -glenn */
/* Instead of grading individual columns, DDR sets a "was pressed recently"
* countdown every time you step on a column. When you step on the first note of
* the jump, it sets the first "was pressed recently" timer. Then, when you do
* 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
* all the columns of the jump. -Chris */
// TapNoteScore score = MinTapNoteScore(iIndexThatWasSteppedOn);
TapNoteScore score = LastTapNoteScore(iIndexThatWasSteppedOn);
ASSERT(score != TNS_NONE);
ASSERT(score != TNS_HIT_MINE);
/* If the whole row was hit with perfects or greats, remove the row
* from the NoteField, so it disappears. */
@@ -1027,7 +1034,7 @@ void PlayerMinus::CrossedRow( int iNoteRow )
// Hold the panel while crossing a mine will cause the mine to explode
for( int t=0; t<GetNumTracks(); t++ )
{
if( GetTapNote(t, iNoteRow) == TAP_MINE )
if( GetTapNote(t,iNoteRow) == TAP_MINE )
{
const StyleInput StyleI( m_PlayerNumber, t );
const GameInput GameI = GAMESTATE->GetCurrentStyleDef()->StyleInputToGameInput( StyleI );
@@ -1065,18 +1072,7 @@ void PlayerMinus::RandomiseNotes( int iNoteRow )
void PlayerMinus::HandleTapRowScore( unsigned row )
{
TapNoteScore scoreOfLastTap = LastTapNoteScore(row);
int iNumTapsInRow = 0;
int iNumAdditions = 0;
for( int t=0; t<GetNumTracks(); t++ ) // for each column
{
TapNote tn = GetTapNote(t, row);
if( tn != TAP_EMPTY )
iNumTapsInRow++;
if( tn == TAP_ADDITION )
iNumAdditions++;
}
int iNumTapsInRow = this->GetNumTracksWithTapOrHoldHead(row);
ASSERT(iNumTapsInRow > 0);
bool NoCheating = true;
@@ -1111,16 +1107,17 @@ void PlayerMinus::HandleTapRowScore( unsigned row )
iCurCombo = 0;
break;
default:
ASSERT( 0 );
}
/* The score keeper updates the hit combo. Remember the old combo for handling announcers. */
const int iOldCombo = g_CurStageStats.iCurCombo[m_PlayerNumber];
if(m_pPrimaryScoreKeeper)
m_pPrimaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, iNumAdditions );
m_pPrimaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
if(m_pSecondaryScoreKeeper)
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, iNumAdditions );
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
m_Combo.SetCombo( g_CurStageStats.iCurCombo[m_PlayerNumber] );
+9 -3
View File
@@ -78,7 +78,7 @@ PrefsManager::PrefsManager()
m_fLifeDeltaMissPercentChange = -0.080f;
m_fLifeDeltaOKPercentChange = +0.008f;
m_fLifeDeltaNGPercentChange = -0.080f;
m_fLifeDeltaMinePercentChange = -0.160f;
m_fLifeDeltaHitMinePercentChange = -0.160f;
m_iRegenComboAfterFail = 10; // cumulative
m_iRegenComboAfterMiss = 5; // cumulative
m_iMaxRegenComboAfterFail = 10;
@@ -93,6 +93,7 @@ PrefsManager::PrefsManager()
m_iPercentScoreMissWeight = 0;
m_iPercentScoreOKWeight = 3;
m_iPercentScoreNGWeight = 0;
m_iPercentScoreHitMineWeight = -2;
m_iGradeMarvelousWeight = 2;
m_iGradePerfectWeight = 2;
m_iGradeGreatWeight = 1;
@@ -101,6 +102,7 @@ PrefsManager::PrefsManager()
m_iGradeMissWeight = -8;
m_iGradeOKWeight = 6;
m_iGradeNGWeight = 0;
m_iPercentScoreHitMineWeight = -8;
m_fGradePercentAA = 0.93f;
m_fGradePercentA = 0.80f;
m_fGradePercentB = 0.65f;
@@ -303,7 +305,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Options", "LifeDeltaMissPercentChange", m_fLifeDeltaMissPercentChange );
ini.GetValue( "Options", "LifeDeltaOKPercentChange", m_fLifeDeltaOKPercentChange );
ini.GetValue( "Options", "LifeDeltaNGPercentChange", m_fLifeDeltaNGPercentChange );
ini.GetValue( "Options", "LifeDeltaMinePercentChange", m_fLifeDeltaMinePercentChange );
ini.GetValue( "Options", "LifeDeltaHitMinePercentChange", m_fLifeDeltaHitMinePercentChange );
ini.GetValue( "Options", "RegenComboAfterFail", m_iRegenComboAfterFail );
ini.GetValue( "Options", "RegenComboAfterMiss", m_iRegenComboAfterMiss );
ini.GetValue( "Options", "MaxRegenComboAfterFail", m_iMaxRegenComboAfterFail );
@@ -318,6 +320,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Options", "PercentScoreMissWeight", m_iPercentScoreMissWeight );
ini.GetValue( "Options", "PercentScoreOKWeight", m_iPercentScoreOKWeight );
ini.GetValue( "Options", "PercentScoreNGWeight", m_iPercentScoreNGWeight );
ini.GetValue( "Options", "PercentScoreHitMineWeight", m_iPercentScoreHitMineWeight );
ini.GetValue( "Options", "GradeMarvelousWeight", m_iGradeMarvelousWeight );
ini.GetValue( "Options", "GradePerfectWeight", m_iGradePerfectWeight );
ini.GetValue( "Options", "GradeGreatWeight", m_iGradeGreatWeight );
@@ -326,6 +329,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Options", "GradeMissWeight", m_iGradeMissWeight );
ini.GetValue( "Options", "GradeOKWeight", m_iGradeOKWeight );
ini.GetValue( "Options", "GradeNGWeight", m_iGradeNGWeight );
ini.GetValue( "Options", "GradeHitMineWeight", m_iPercentScoreHitMineWeight );
ini.GetValue( "Options", "GradePercentAA", m_fGradePercentAA );
ini.GetValue( "Options", "GradePercentA", m_fGradePercentA );
ini.GetValue( "Options", "GradePercentB", m_fGradePercentB );
@@ -484,7 +488,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "LifeDeltaMissPercentChange", m_fLifeDeltaMissPercentChange );
ini.SetValue( "Options", "LifeDeltaOKPercentChange", m_fLifeDeltaOKPercentChange );
ini.SetValue( "Options", "LifeDeltaNGPercentChange", m_fLifeDeltaNGPercentChange );
ini.SetValue( "Options", "LifeDeltaMinePercentChange", m_fLifeDeltaMinePercentChange );
ini.SetValue( "Options", "LifeDeltaHitMinePercentChange", m_fLifeDeltaHitMinePercentChange );
ini.SetValue( "Options", "RegenComboAfterFail", m_iRegenComboAfterFail );
ini.SetValue( "Options", "RegenComboAfterMiss", m_iRegenComboAfterMiss );
ini.SetValue( "Options", "MaxRegenComboAfterFail", m_iMaxRegenComboAfterFail );
@@ -499,6 +503,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "PercentScoreMissWeight", m_iPercentScoreMissWeight );
ini.SetValue( "Options", "PercentScoreOKWeight", m_iPercentScoreOKWeight );
ini.SetValue( "Options", "PercentScoreNGWeight", m_iPercentScoreNGWeight );
ini.SetValue( "Options", "PercentScoreHitMineWeight", m_iPercentScoreHitMineWeight );
ini.SetValue( "Options", "GradeMarvelousWeight", m_iGradeMarvelousWeight );
ini.SetValue( "Options", "GradePerfectWeight", m_iGradePerfectWeight );
ini.SetValue( "Options", "GradeGreatWeight", m_iGradeGreatWeight );
@@ -507,6 +512,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "GradeMissWeight", m_iGradeMissWeight );
ini.SetValue( "Options", "GradeOKWeight", m_iGradeOKWeight );
ini.SetValue( "Options", "GradeNGWeight", m_iGradeNGWeight );
ini.SetValue( "Options", "GradeHitMineWeight", m_iPercentScoreHitMineWeight );
ini.SetValue( "Options", "GradePercentAA", m_fGradePercentAA );
ini.SetValue( "Options", "GradePercentA", m_fGradePercentA );
ini.SetValue( "Options", "GradePercentB", m_fGradePercentB );
+3 -1
View File
@@ -71,9 +71,9 @@ public:
float m_fLifeDeltaGoodPercentChange;
float m_fLifeDeltaBooPercentChange;
float m_fLifeDeltaMissPercentChange;
float m_fLifeDeltaHitMinePercentChange;
float m_fLifeDeltaOKPercentChange;
float m_fLifeDeltaNGPercentChange;
float m_fLifeDeltaMinePercentChange;
int m_iRegenComboAfterFail;
int m_iRegenComboAfterMiss;
int m_iMaxRegenComboAfterFail;
@@ -85,6 +85,7 @@ public:
int m_iPercentScoreGoodWeight;
int m_iPercentScoreBooWeight;
int m_iPercentScoreMissWeight;
int m_iPercentScoreHitMineWeight;
int m_iPercentScoreOKWeight;
int m_iPercentScoreNGWeight;
int m_iGradeMarvelousWeight;
@@ -93,6 +94,7 @@ public:
int m_iGradeGoodWeight;
int m_iGradeBooWeight;
int m_iGradeMissWeight;
int m_iGradeHitMineWeight;
int m_iGradeOKWeight;
int m_iGradeNGWeight;
float m_fGradePercentAA;
+9 -1
View File
@@ -8,6 +8,7 @@ static CachedThemeMetric GREAT_COMMAND ("ProTimingDisplay","GreatCommand");
static CachedThemeMetric GOOD_COMMAND ("ProTimingDisplay","GoodCommand");
static CachedThemeMetric BOO_COMMAND ("ProTimingDisplay","BooCommand");
static CachedThemeMetric MISS_COMMAND ("ProTimingDisplay","MissCommand");
static CachedThemeMetric HIT_MINE_COMMAND ("ProTimingDisplay","HitMineCommand");
ProTimingDisplay::ProTimingDisplay()
@@ -22,6 +23,7 @@ ProTimingDisplay::ProTimingDisplay()
GOOD_COMMAND.Refresh();
BOO_COMMAND.Refresh();
MISS_COMMAND.Refresh();
HIT_MINE_COMMAND.Refresh();
}
void ProTimingDisplay::Reset()
@@ -43,7 +45,13 @@ void ProTimingDisplay::SetJudgment( int ms, TapNoteScore score )
const CachedThemeMetric *Commands[NUM_TAP_NOTE_SCORES] =
{
NULL, /* no TNS_NONE */
&MISS_COMMAND, &BOO_COMMAND, &GOOD_COMMAND, &GREAT_COMMAND, &PERFECT_COMMAND, &MARVELOUS_COMMAND
&HIT_MINE_COMMAND,
&MISS_COMMAND,
&BOO_COMMAND,
&GOOD_COMMAND,
&GREAT_COMMAND,
&PERFECT_COMMAND,
&MARVELOUS_COMMAND
};
ASSERT( score != TNS_NONE );
ASSERT( score < NUM_TAP_NOTE_SCORES );
+3 -4
View File
@@ -964,10 +964,9 @@ CString Capitalize( const CString &s )
{
if( s.GetLength()==0 )
return "";
CString s1 = s.Left(1);
s1.MakeUpper();
CString s2 = s.Right( s.GetLength()-1 );
return s1+s2;
CString s2 = s;
s2[0] = toupper( s2[0] );
return s2;
}
char char_traits_char_nocase::uptab[256] =
+2 -1
View File
@@ -45,7 +45,8 @@ public:
/* Note that pNoteData will include any transformations due to modifiers. */
virtual void OnNextSong( int iSongInCourseIndex, const Steps* pNotes, const NoteData* pNoteData ) = 0; // before a song plays (called multiple times if course)
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions ) = 0;
virtual void HandleTapScore( TapNoteScore score ) = 0;
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow ) = 0;
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) = 0;
};
+44 -48
View File
@@ -221,6 +221,36 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
Let p = score multiplier (Marvelous = 10, Perfect = 9, Great = 5, other = 0)
N = total number of steps and freeze steps
S = The sum of all integers from 1 to N (the total number of steps/freeze steps)
n = number of the current step or freeze step (varies from 1 to N)
B = Base value of the song (1,000,000 X the number of feet difficulty) - All edit data is rated as 5 feet
So, the score for one step is:
one_step_score = p * (B/S) * n
*IMPORTANT* : Double steps (U+L, D+R, etc.) count as two steps instead of one *for your combo count only*,
so if you get a double L+R on the 112th step of a song, you score is calculated for only one step, not two,
as the combo counter might otherwise imply.
Now, through simple algebraic manipulation:
S = 1+...+N = (1+N)*N/2 (1 through N added together)
Okay, time for an example. Suppose we wanted to calculate the step score of a "Great" on the 57th step of
a 441 step, 8-foot difficulty song (I'm just making this one up):
S = (1 + 441)*441 / 2
= 194,222 / 2
= 97,461
StepScore = p * (B/S) * n
= 5 * (8,000,000 / 97,461) * 57
= 5 * (82) * 57 (The 82 is rounded down from 82.08411...)
= 23,370
Remember this is just the score for the step, not the cumulative score up to the 57th step. Also, please note that
I am currently checking into rounding errors with the system and if there are any, how they are resolved in the system.
Note: if you got all Perfect on this song, you would get (p=10)*B, which is 80,000,000. In fact, the maximum possible
score for any song is the number of feet difficulty X 10,000,000.
*/
int p = 0; // score multiplier
@@ -286,19 +316,22 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
printf( "score: %i\n", iScore );
}
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions )
void ScoreKeeperMAX2::HandleTapScore( TapNoteScore score )
{
if( score == TNS_HIT_MINE )
{
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( TNS_HIT_MINE );
g_CurStageStats.iTapNoteScores[m_PlayerNumber][TNS_HIT_MINE] += 1;
}
}
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
{
ASSERT( iNumTapsInRow >= 1 );
int iNumTapsToScore = iNumTapsInRow; //-iNumAdditions;
// Update dance points. Additions don't count.
// (yes they do)
if( iNumTapsToScore > 0 )
{
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( scoreOfLastTap );
}
// Do count additions in judge totals.
// Update dance points.
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( scoreOfLastTap );
// update judged row totals
g_CurStageStats.iTapNoteScores[m_PlayerNumber][scoreOfLastTap] += 1;
//
@@ -332,46 +365,8 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
if( scoreOfLastTap >= MinScoreToContinueCombo )
g_CurStageStats.iCurCombo[m_PlayerNumber] += ComboCountIfHit;
/*
http://www.aaroninjapan.com/ddr2.html
A single step's points are calculated as follows:
p = score multiplier (Perfect = 10, Great = 5, other = 0)
N = total number of steps and freeze steps
S = The sum of all integers from 1 to N (the total number of steps/freeze steps)
n = number of the current step or freeze step (varies from 1 to N)
B = Base value of the song (1,000,000 X the number of feet difficulty) - All edit data is rated as 5 feet
So, the score for one step is:
one_step_score = p * (B/S) * n
*IMPORTANT* : Double steps (U+L, D+R, etc.) count as two steps instead of one *for your combo count only*,
so if you get a double L+R on the 112th step of a song, you score is calculated for only one step, not two,
as the combo counter might otherwise imply.
Now, through simple algebraic manipulation:
S = 1+...+N = (1+N)*N/2 (1 through N added together)
Okay, time for an example. Suppose we wanted to calculate the step score of a "Great" on the 57th step of
a 441 step, 8-foot difficulty song (I'm just making this one up):
S = (1 + 441)*441 / 2
= 194,222 / 2
= 97,461
StepScore = p * (B/S) * n
= 5 * (8,000,000 / 97,461) * 57
= 5 * (82) * 57 (The 82 is rounded down from 82.08411...)
= 23,370
Remember this is just the score for the step, not the cumulative score up to the 57th step. Also, please note that
I am currently checking into rounding errors with the system and if there are any, how they are resolved in the system.
Note: if you got all Perfect on this song, you would get (p=10)*B, which is 80,000,000. In fact, the maximum possible
score for any song is the number of feet difficulty X 10,000,000.
*/
AddScore( scoreOfLastTap ); // only score once per row
//
// handle combo logic
//
@@ -452,6 +447,7 @@ int ScoreKeeperMAX2::TapNoteScoreToDancePoints( TapNoteScore tns )
int TapScoreValues[NUM_TAP_NOTE_SCORES] =
{
0,
PREFSMAN->m_iPercentScoreHitMineWeight,
PREFSMAN->m_iPercentScoreMissWeight,
PREFSMAN->m_iPercentScoreBooWeight,
PREFSMAN->m_iPercentScoreGoodWeight,
+2 -1
View File
@@ -43,7 +43,8 @@ public:
// before a song plays (called multiple times if course)
void OnNextSong( int iSongInCourseIndex, const Steps* pNotes, const NoteData* pNoteData );
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions );
void HandleTapScore( TapNoteScore score );
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
private:
+8 -2
View File
@@ -33,12 +33,18 @@ void ScoreKeeperRave::OnNextSong( int iSongInCourseIndex, const Steps* pNotes, c
}
void ScoreKeeperRave::HandleTapScore( TapNoteScore score )
{
// FIXME
}
#define CROSSED( val ) (fOld < val && fNew >= val)
#define CROSSED_ATTACK_LEVEL( level ) CROSSED(1.f/NUM_ATTACK_LEVELS*(level+1))
void ScoreKeeperRave::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions )
void ScoreKeeperRave::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
{
AttackLevel oldAL = (AttackLevel)(int)GAMESTATE->m_fSuperMeter[m_PlayerNumber];
// TODO: Move these to prefs
float fPercentToMove;
switch( scoreOfLastTap )
{
@@ -66,7 +72,7 @@ void ScoreKeeperRave::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
void ScoreKeeperRave::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore )
{
// FIXME
}
void ScoreKeeperRave::Update( float fDelta )
+5 -4
View File
@@ -21,10 +21,11 @@ class ScoreKeeperRave : public ScoreKeeper
public:
// Overrides
ScoreKeeperRave(PlayerNumber pn);
virtual void Update( float fDelta );
virtual void OnNextSong( int iSongInCourseIndex, const Steps* pNotes, const NoteData* pNoteData ); // before a song plays (called multiple times if course)
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, int iNumAdditions );
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
void Update( float fDelta );
void OnNextSong( int iSongInCourseIndex, const Steps* pNotes, const NoteData* pNoteData ); // before a song plays (called multiple times if course)
void HandleTapScore( TapNoteScore score );
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
protected:
void LaunchAttack( AttackLevel al );
+2 -2
View File
@@ -146,7 +146,7 @@ Grade StageStats::GetGrade( PlayerNumber pn ) const
* is tricky since at that point the ScoreKeepers no longer exist.
*
* See http://www.aaroninjapan.com/ddr2.html ("Regular play scoring") */
const float TapScoreValues[NUM_TAP_NOTE_SCORES] =
float TapScoreValues[NUM_TAP_NOTE_SCORES] =
{
0,
PREFSMAN->m_iGradeMissWeight,
@@ -156,7 +156,7 @@ Grade StageStats::GetGrade( PlayerNumber pn ) const
PREFSMAN->m_iGradePerfectWeight,
PREFSMAN->m_iGradeMarvelousWeight,
};
const float HoldScoreValues[NUM_HOLD_NOTE_SCORES] =
float HoldScoreValues[NUM_HOLD_NOTE_SCORES] =
{
0,
PREFSMAN->m_iGradeNGWeight,