diff --git a/stepmania/src/Game.cpp b/stepmania/src/Game.cpp index e92131f64c..473971e966 100644 --- a/stepmania/src/Game.cpp +++ b/stepmania/src/Game.cpp @@ -102,6 +102,19 @@ CString Game::ColToButtonName( int col ) const return m_szButtonNames[GI.button]; } +TapNoteScore Game::MapTapNoteScore( TapNoteScore tns ) const +{ + switch( tns ) + { + case TNS_MARVELOUS: return m_mapMarvelousTo; + case TNS_PERFECT: return m_mapPerfectTo; + case TNS_GREAT: return m_mapGreatTo; + case TNS_GOOD: return m_mapGoodTo; + case TNS_BOO: return m_mapBooTo; + default: return tns; + } +} + /* * (c) 2001-2002 Chris Danford * All rights reserved. diff --git a/stepmania/src/Game.h b/stepmania/src/Game.h index 0fbc303586..ab4ea98b9c 100644 --- a/stepmania/src/Game.h +++ b/stepmania/src/Game.h @@ -54,6 +54,7 @@ public: void MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const; CString ColToButtonName( int col ) const; + TapNoteScore MapTapNoteScore( TapNoteScore tns ) const; TapNoteScore m_mapMarvelousTo; TapNoteScore m_mapPerfectTo; TapNoteScore m_mapGreatTo; diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index da7f3af7b2..c8c0d69c60 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -847,16 +847,8 @@ void Player::Step( int col, const RageTimer &tm ) m_pNoteField->DidTapNote( col, score, false ); } - // Do game-specific score mapping. - const Game* pGame = GAMESTATE->GetCurrentGame(); - if( score == TNS_MARVELOUS ) score = pGame->m_mapMarvelousTo; - else if( score == TNS_PERFECT ) score = pGame->m_mapPerfectTo; - else if( score == TNS_GREAT ) score = pGame->m_mapGreatTo; - else if( score == TNS_GOOD ) score = pGame->m_mapGoodTo; - else if( score == TNS_BOO ) score = pGame->m_mapBooTo; - - + score = GAMESTATE->GetCurrentGame()->MapTapNoteScore( score ); if( score != TNS_NONE && score != TNS_MISS ) {