move mapping into Game
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user