Revert "Missed more of these darned spots."
This reverts commit bbb57b1600.
This commit is contained in:
@@ -17,6 +17,10 @@ const int MIN_METER = 1;
|
||||
*/
|
||||
const int MAX_METER = 35;
|
||||
|
||||
/** @brief The maximum number of credits for coin mode. */
|
||||
const int MAX_NUM_CREDITS = 20;
|
||||
|
||||
|
||||
/**
|
||||
* @brief The various radar categories available.
|
||||
*
|
||||
|
||||
@@ -38,6 +38,7 @@ const RString EDIT_COURSES_SUBDIR = "EditCourses/";
|
||||
//const RString UPLOAD_SUBDIR = "Upload/";
|
||||
const RString RIVAL_SUBDIR = "Rivals/";
|
||||
|
||||
ThemeMetric<bool> SHOW_COIN_DATA( "Profile", "ShowCoinData" );
|
||||
static Preference<bool> g_bProfileDataCompress( "ProfileDataCompress", false );
|
||||
static ThemeMetric<RString> UNLOCK_AUTH_STRING( "Profile", "UnlockAuthString" );
|
||||
#define GUID_SIZE_BYTES 8
|
||||
@@ -947,6 +948,8 @@ XNode *Profile::SaveStatsXmlCreateNode() const
|
||||
xml->AppendChild( SaveCategoryScoresCreateNode() );
|
||||
xml->AppendChild( SaveScreenshotDataCreateNode() );
|
||||
xml->AppendChild( SaveCalorieDataCreateNode() );
|
||||
if( SHOW_COIN_DATA.GetValue() && IsMachine() )
|
||||
xml->AppendChild( SaveCoinDataCreateNode() );
|
||||
|
||||
return xml;
|
||||
}
|
||||
@@ -1835,6 +1838,19 @@ bool Profile::IsMachine() const
|
||||
return this == PROFILEMAN->GetMachineProfile();
|
||||
}
|
||||
|
||||
|
||||
XNode* Profile::SaveCoinDataCreateNode() const
|
||||
{
|
||||
CHECKPOINT;
|
||||
|
||||
const Profile* pProfile = this;
|
||||
ASSERT( pProfile != NULL );
|
||||
|
||||
XNode* pNode = new XNode( "CoinData" );
|
||||
|
||||
return pNode;
|
||||
}
|
||||
|
||||
void Profile::MoveBackupToDir( RString sFromDir, RString sToDir )
|
||||
{
|
||||
if( FILEMAN->IsAFile(sFromDir + STATS_XML) &&
|
||||
|
||||
@@ -369,6 +369,8 @@ public:
|
||||
XNode* SaveScreenshotDataCreateNode() const;
|
||||
XNode* SaveCalorieDataCreateNode() const;
|
||||
|
||||
XNode* SaveCoinDataCreateNode() const;
|
||||
|
||||
void SaveStatsWebPageToDir( RString sDir ) const;
|
||||
void SaveMachinePublicKeyToDir( RString sDir ) const;
|
||||
|
||||
|
||||
@@ -383,6 +383,30 @@ static void MusicWheelSwitchSpeed( int &sel, bool ToSel, const ConfOption *pConf
|
||||
MoveMap( sel, pConfOption, ToSel, mapping, ARRAYLEN(mapping) );
|
||||
}
|
||||
|
||||
// Gameplay options
|
||||
static void CoinModeNoHome( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
// The mapping without home is easy: subtract one to compensate for the missing CoinMode_Home
|
||||
if( ToSel )
|
||||
{
|
||||
MovePref<CoinMode>( sel, ToSel, pConfOption );
|
||||
if( sel > static_cast<int>(CoinMode_Home) )
|
||||
--sel;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( sel >= static_cast<int>(CoinMode_Home) )
|
||||
++sel;
|
||||
MovePref<CoinMode>( sel, ToSel, pConfOption );
|
||||
}
|
||||
}
|
||||
|
||||
static void CoinsPerCredit( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
const int mapping[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 };
|
||||
MoveMap( sel, pConfOption, ToSel, mapping, ARRAYLEN(mapping) );
|
||||
}
|
||||
|
||||
static void JointPremium( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
const Premium mapping[] = { Premium_DoubleFor1Credit, Premium_2PlayersFor1Credit };
|
||||
@@ -620,8 +644,8 @@ static void InitializeConfOptions()
|
||||
// a new choice in the interface into a new preference. The easiest is when
|
||||
// the interface choices are an exact mapping to the values the preference
|
||||
// can be. In that case, the easiest thing to do is use MovePref<bool or enum>.
|
||||
// The next easiest case is when there is a hardcoded mapping that is not 1-1.
|
||||
// In that case, you need to remap the result of
|
||||
// The next easiest case is when there is a hardcoded mapping that is not 1-1,
|
||||
// such as CoinModeNoHome. In that case, you need to remap the result of
|
||||
// MovePref<enum> to the correct mapping. Harder yet is when there is a
|
||||
// float or a dynamic set of options, such as Language or Theme.
|
||||
// Those require individual attention.
|
||||
@@ -690,7 +714,8 @@ static void InitializeConfOptions()
|
||||
|
||||
// Machine options
|
||||
ADD( ConfOption( "MenuTimer", MovePref<bool>, "Off","On" ) );
|
||||
ADD( ConfOption( "CoinMode", MovePref<CoinMode>, "Home","Free Play" ) );
|
||||
ADD( ConfOption( "CoinMode", MovePref<CoinMode>, "Home","Pay","Free Play" ) );
|
||||
ADD( ConfOption( "CoinModeNoHome", CoinModeNoHome, "Pay","Free Play" ) );
|
||||
g_ConfOptions.back().m_sPrefName = "CoinMode";
|
||||
|
||||
ADD( ConfOption( "SongsPerPlay", SongsPerPlay, "|1","|2","|3","|4","|5" ) );
|
||||
@@ -705,6 +730,7 @@ static void InitializeConfOptions()
|
||||
ADD( ConfOption( "ProgressiveStageLifebar", MovePref<int>, "Off","|1","|2","|3","|4","|5","|6","|7","|8","Insanity") );
|
||||
ADD( ConfOption( "ProgressiveNonstopLifebar", MovePref<int>, "Off","|1","|2","|3","|4","|5","|6","|7","|8","Insanity") );
|
||||
ADD( ConfOption( "DefaultFailType", DefaultFailType, "Immediate","ImmediateContinue","EndOfSong","Off" ) );
|
||||
ADD( ConfOption( "CoinsPerCredit", CoinsPerCredit, "|1","|2","|3","|4","|5","|6","|7","|8","|9","|10","|11","|12","|13","|14","|15","|16" ) );
|
||||
ADD( ConfOption( "Premium", MovePref<Premium>, "Off","Double for 1 Credit","2 Players for 1 Credit" ) );
|
||||
ADD( ConfOption( "JointPremium", JointPremium, "Off","2 Players for 1 Credit" ) );
|
||||
g_ConfOptions.back().m_sPrefName = "Premium";
|
||||
|
||||
Reference in New Issue
Block a user