diff --git a/stepmania/src/OptionRow.cpp b/stepmania/src/OptionRow.cpp index 0b33a9f64c..45aa549b8f 100644 --- a/stepmania/src/OptionRow.cpp +++ b/stepmania/src/OptionRow.cpp @@ -944,7 +944,7 @@ void OptionRow::ImportOptions( const vector &vpns ) ERASE_ONE_BOOL_AT_FRONT_IF_NEEDED( m_vbSelected[p] ); } - m_pHand->ImportOption( m_pHand->m_Def, vpns, m_vbSelected ); + m_pHand->ImportOption( vpns, m_vbSelected ); FOREACH_CONST( PlayerNumber, vpns, iter ) { @@ -977,7 +977,7 @@ int OptionRow::ExportOptions( const vector &vpns, bool bRowHasFocu m_vbSelected[p][iChoice] = true; } - iChangeMask |= m_pHand->ExportOption( m_pHand->m_Def, vpns, m_vbSelected ); + iChangeMask |= m_pHand->ExportOption( vpns, m_vbSelected ); FOREACH_CONST( PlayerNumber, vpns, iter ) { diff --git a/stepmania/src/OptionRowHandler.cpp b/stepmania/src/OptionRowHandler.cpp index e990dd09ba..e263510f66 100644 --- a/stepmania/src/OptionRowHandler.cpp +++ b/stepmania/src/OptionRowHandler.cpp @@ -25,7 +25,7 @@ #define ENTRY_MODE(s,i) THEME->GetMetric ("ScreenOptionsMaster",ssprintf("%s,%i",(s).c_str(),(i+1))) #define ENTRY_DEFAULT(s) THEME->GetMetric ("ScreenOptionsMaster",(s) + "Default") -void OptionRowHandler::GetIconTextAndGameCommand( const OptionRowDefinition &def, int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const +void OptionRowHandler::GetIconTextAndGameCommand( int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const { sIconTextOut = ""; gcOut.Init(); @@ -156,7 +156,7 @@ public: } } } - void ImportOption( const OptionRowDefinition &def, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { int iFallbackOption = -1; bool bUseFallbackOption = true; @@ -223,7 +223,7 @@ public: } } - int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { FOREACH_CONST( PlayerNumber, vpns, pn ) { @@ -242,7 +242,7 @@ public: return 0; } - virtual void GetIconTextAndGameCommand( const OptionRowDefinition &def, int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const + virtual void GetIconTextAndGameCommand( int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const { sIconTextOut = m_bUseModNameForIcon ? m_aListEntries[iFirstSelection].m_sModifiers : @@ -463,7 +463,7 @@ public: m_pDifficultyToFill->Set( m_vDifficulties[0] ); m_ppStepsToFill->Set( m_vSteps[0] ); } - virtual void ImportOption( const OptionRowDefinition &def, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { FOREACH_CONST( PlayerNumber, vpns, pn ) { @@ -491,7 +491,7 @@ public: vbSelOut[i] = true; vector v; v.push_back( p ); - ExportOption( def, v, vbSelectedOut ); // current steps changed + ExportOption( v, vbSelectedOut ); // current steps changed continue; } } @@ -500,7 +500,7 @@ public: vbSelOut[0] = true; } } - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { FOREACH_CONST( PlayerNumber, vpns, pn ) { @@ -862,7 +862,7 @@ public: LUA->Release(L); } - virtual void ImportOption( const OptionRowDefinition &def, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { Lua *L = LUA->Get(); @@ -918,7 +918,7 @@ public: LUA->Release(L); } - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { Lua *L = LUA->Get(); @@ -945,7 +945,7 @@ public: lua_pushstring( L, "SaveSelections" ); lua_gettable( L, -2 ); if( !lua_isfunction( L, -1 ) ) - RageException::Throw( "\"%s\" \"SaveSelections\" entry is not a function", def.m_sName.c_str() ); + RageException::Throw( "\"%s\" \"SaveSelections\" entry is not a function", m_Def.m_sName.c_str() ); /* Argument 1 (self): */ m_pLuaTable->PushSelf( L ); @@ -1011,7 +1011,7 @@ public: m_Def.m_sName = opt->name; } - virtual void ImportOption( const OptionRowDefinition &def, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { FOREACH_CONST( PlayerNumber, vpns, pn ) { @@ -1022,7 +1022,7 @@ public: OptionRowHandlerUtil::SelectExactlyOne( iSelection, vbSelOut ); } } - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { bool bChanged = false; @@ -1110,7 +1110,7 @@ public: m_pstToFill->Set( m_vStepsTypesToShow[0] ); } - virtual void ImportOption( const OptionRowDefinition &def, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { FOREACH_CONST( PlayerNumber, vpns, pn ) { @@ -1131,7 +1131,7 @@ public: vbSelOut[0] = true; } } - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { FOREACH_CONST( PlayerNumber, vpns, pn ) { @@ -1173,16 +1173,16 @@ public: m_Def.m_selectType = SELECT_NONE; m_Def.m_vsChoices.push_back( "" ); } - virtual void ImportOption( const OptionRowDefinition &row, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { } - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { if( vbSelected[PLAYER_1][0] ) m_gc.ApplyToAllPlayers(); return 0; } - virtual void GetIconTextAndGameCommand( const OptionRowDefinition &def, int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const + virtual void GetIconTextAndGameCommand( int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const { sIconTextOut = ""; gcOut = m_gc; @@ -1200,10 +1200,10 @@ public: virtual void LoadInternal( const Commands &cmds ) { } - virtual void ImportOption( const OptionRowDefinition &row, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { } - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { return 0; } diff --git a/stepmania/src/OptionRowHandler.h b/stepmania/src/OptionRowHandler.h index 248416f4ec..a875f817f7 100644 --- a/stepmania/src/OptionRowHandler.h +++ b/stepmania/src/OptionRowHandler.h @@ -45,10 +45,10 @@ public: * nothing has changed, return false. */ virtual bool Reload() { return false; } - virtual void ImportOption( const OptionRowDefinition &row, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const = 0; + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const = 0; /* Returns an OPT mask. */ - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const = 0; - virtual void GetIconTextAndGameCommand( const OptionRowDefinition &def, int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const; + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const = 0; + virtual void GetIconTextAndGameCommand( int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const; virtual RString GetScreen( int iChoice ) const { return RString(); } }; diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index a31b831842..bf5d778bd9 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -405,7 +405,7 @@ void ScreenOptions::RefreshIcons( int iRow, PlayerNumber pn ) if( pHand ) { int iSelection = iFirstSelection+(m_OptionsNavigation==NAV_TOGGLE_THREE_KEY?-1:0); - pHand->GetIconTextAndGameCommand( def, iSelection, sIcon, gc ); + pHand->GetIconTextAndGameCommand( iSelection, sIcon, gc ); } } diff --git a/stepmania/src/ScreenOptionsEditCourseEntry.cpp b/stepmania/src/ScreenOptionsEditCourseEntry.cpp index 9804ac1428..89ed82a107 100644 --- a/stepmania/src/ScreenOptionsEditCourseEntry.cpp +++ b/stepmania/src/ScreenOptionsEditCourseEntry.cpp @@ -70,7 +70,7 @@ public: return true; } - virtual void ImportOption( const OptionRowDefinition &row, const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const + virtual void ImportOption( const vector &vpns, vector vbSelectedOut[NUM_PLAYERS] ) const { vector::const_iterator iter = find( m_vpDisplayedSongs.begin(), m_vpDisplayedSongs.end(), GAMESTATE->m_pCurSong.Get() ); int iChoice = 0; @@ -79,7 +79,7 @@ public: FOREACH_PlayerNumber(pn) OptionRowHandlerUtil::SelectExactlyOne( iChoice, vbSelectedOut[pn] ); } - virtual int ExportOption( const OptionRowDefinition &def, const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const + virtual int ExportOption( const vector &vpns, const vector vbSelected[NUM_PLAYERS] ) const { int iChoice = OptionRowHandlerUtil::GetOneSelection( vbSelected[PLAYER_1] ); GAMESTATE->m_pCurSong.Set( m_vpDisplayedSongs[iChoice] );