remove def param; use m_Def

This commit is contained in:
Glenn Maynard
2006-01-19 03:43:29 +00:00
parent bc138aa563
commit b52e776f36
5 changed files with 27 additions and 27 deletions
+2 -2
View File
@@ -944,7 +944,7 @@ void OptionRow::ImportOptions( const vector<PlayerNumber> &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<PlayerNumber> &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 )
{
+19 -19
View File
@@ -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<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
{
int iFallbackOption = -1;
bool bUseFallbackOption = true;
@@ -223,7 +223,7 @@ public:
}
}
int ExportOption( const OptionRowDefinition &def, const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> 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<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
{
FOREACH_CONST( PlayerNumber, vpns, pn )
{
@@ -491,7 +491,7 @@ public:
vbSelOut[i] = true;
vector<PlayerNumber> 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<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> 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<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
{
Lua *L = LUA->Get();
@@ -918,7 +918,7 @@ public:
LUA->Release(L);
}
virtual int ExportOption( const OptionRowDefinition &def, const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> 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<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> 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<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> 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<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> 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<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> 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<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
{
}
virtual int ExportOption( const OptionRowDefinition &def, const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> 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<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
{
}
virtual int ExportOption( const OptionRowDefinition &def, const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
{
return 0;
}
+3 -3
View File
@@ -45,10 +45,10 @@ public:
* nothing has changed, return false.
*/
virtual bool Reload() { return false; }
virtual void ImportOption( const OptionRowDefinition &row, const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const = 0;
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const = 0;
/* Returns an OPT mask. */
virtual int ExportOption( const OptionRowDefinition &def, const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const = 0;
virtual void GetIconTextAndGameCommand( const OptionRowDefinition &def, int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const;
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const = 0;
virtual void GetIconTextAndGameCommand( int iFirstSelection, CString &sIconTextOut, GameCommand &gcOut ) const;
virtual RString GetScreen( int iChoice ) const { return RString(); }
};
+1 -1
View File
@@ -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 );
}
}
@@ -70,7 +70,7 @@ public:
return true;
}
virtual void ImportOption( const OptionRowDefinition &row, const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
virtual void ImportOption( const vector<PlayerNumber> &vpns, vector<bool> vbSelectedOut[NUM_PLAYERS] ) const
{
vector<Song*>::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<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
virtual int ExportOption( const vector<PlayerNumber> &vpns, const vector<bool> vbSelected[NUM_PLAYERS] ) const
{
int iChoice = OptionRowHandlerUtil::GetOneSelection( vbSelected[PLAYER_1] );
GAMESTATE->m_pCurSong.Set( m_vpDisplayedSongs[iChoice] );