remove old "MOVE" macro
This commit is contained in:
@@ -101,34 +101,23 @@ static void MoveMap( int &sel, const ConfOption *pConfOption, bool ToSel, const
|
|||||||
MoveMap( sel, *pPref, ToSel, mapping, cnt );
|
MoveMap( sel, *pPref, ToSel, mapping, cnt );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "sel" is the selection in the menu. */
|
/* "iSel" is the selection in the menu. */
|
||||||
static void MoveData( int &sel, IPreference &opt, bool ToSel )
|
|
||||||
{
|
|
||||||
if( ToSel )
|
|
||||||
{
|
|
||||||
CString sOpt = opt.ToString();
|
|
||||||
FromString( sOpt, sel );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CString sOpt = ToString( sel );
|
|
||||||
opt.FromString( sOpt );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void MovePref( int &iSel, bool bToSel, const ConfOption *pConfOption )
|
static void MovePref( int &iSel, bool bToSel, const ConfOption *pConfOption )
|
||||||
{
|
{
|
||||||
IPreference *pPref = PREFSMAN->GetPreferenceByName( pConfOption->name );
|
IPreference *pPref = PREFSMAN->GetPreferenceByName( pConfOption->name );
|
||||||
ASSERT_M( pPref != NULL, pConfOption->name );
|
ASSERT_M( pPref != NULL, pConfOption->name );
|
||||||
|
|
||||||
MoveData( iSel, *pPref, bToSel );
|
if( bToSel )
|
||||||
}
|
{
|
||||||
|
CString sOpt = pPref->ToString();
|
||||||
#define MOVE( name, opt ) \
|
FromString( sOpt, iSel );
|
||||||
static void name( int &sel, bool ToSel, const ConfOption *pConfOption ) \
|
|
||||||
{ \
|
|
||||||
MoveData( sel, opt, ToSel ); \
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CString sOpt = ToString( iSel );
|
||||||
|
pPref->FromString( sOpt );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void GameChoices( CStringArray &out )
|
static void GameChoices( CStringArray &out )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user