Revamped the unlock system. Currently it supports the following methods:

DP - dance points, what Miryokuteki had in place
AP - arcade points, like MAX2 arcade
SP - song points, like MAX2 home (though I don't know the exact system)
CS - clear stages, like 5th home

Somewhat strewn but not supported yet:
!! - Toastys seen
EC - cleared extra stages
EF - fail extra stage (don't quote me on these two yet, I haven't tried them yet)
RO - roulette (theres fifteen roulette slots, but its not implemented yet)

Also updated the INI to store values for these means of unlocking.  The system
still isn't "optimized" yet, though.
This commit is contained in:
Andrew Wong
2003-07-07 10:22:53 +00:00
parent 7622dc7282
commit d27a25e472
7 changed files with 336 additions and 54 deletions
+37 -2
View File
@@ -93,12 +93,22 @@ PrefsManager::PrefsManager()
m_bAutogenGroupCourses = true;
m_bBreakComboToGetItem = false;
m_bShowDancingCharacters = false;
m_fDancePointsAccumulated = 0;
m_bUseUnlockSystem = false;
m_bFirstRun = true;
m_bAutoMapJoysticks = true;
m_fGlobalOffsetSeconds = 0;
// unlock system initializations
m_fDancePointsAccumulated = 0;
m_fArcadePointsAccumulated = 0;
m_fSongPointsAccumulated = 0;
m_fExtraStagesCleared = 0;
m_fExtraStagesFailed = 0;
m_fTotalStagesCleared = 0;
m_fTotalToastysSeen = 0;
m_RouletteSeeds = "10000000000000000";
/* DDR Extreme-style extra stage support.
* Default off so people used to the current behavior (or those with extra
* stage CRS files) don't get it changed around on them. */
@@ -208,6 +218,14 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
/* XXX: This belongs in the memcard code, not prefs. */
ini.GetValueF( "Options", "DancePointsAccumulated", m_fDancePointsAccumulated );
ini.GetValueB( "Options", "UseUnlockSystem", m_bUseUnlockSystem );
ini.GetValueF( "Options", "ArcadePointsAccumulated", m_fArcadePointsAccumulated );
ini.GetValueF( "Options", "SongPointsAccumulated", m_fSongPointsAccumulated );
ini.GetValueF( "Options", "ExtraStagesCleared", m_fExtraStagesCleared );
ini.GetValueF( "Options", "ExtraStagesFailed", m_fExtraStagesFailed );
ini.GetValueF( "Options", "TotalStagesCleared", m_fTotalStagesCleared );
ini.GetValueF( "Options", "TotalToastysSeen", m_fTotalToastysSeen );
ini.GetValue ( "Options", "RouletteSeeds", m_RouletteSeeds );
ini.GetValueB( "Options", "FirstRun", m_bFirstRun );
ini.GetValueB( "Options", "AutoMapJoysticks", m_bAutoMapJoysticks );
ini.GetValue ( "Options", "VideoRenderers", m_sVideoRenderers );
@@ -217,6 +235,13 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
#endif
ini.GetValueB( "Options", "AntiAliasing", m_bAntiAliasing );
ini.GetValueF( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
ini.GetValueF( "Options", "ArcadePointsAccumulated", m_fArcadePointsAccumulated );
ini.GetValueF( "Options", "SongPointsAccumulated", m_fSongPointsAccumulated );
ini.GetValueF( "Options", "ExtraStagesCleared", m_fExtraStagesCleared );
ini.GetValueF( "Options", "ExtraStagesFailed", m_fExtraStagesFailed );
ini.GetValueF( "Options", "TotalStagesCleared", m_fTotalStagesCleared );
ini.GetValueF( "Options", "TotalToastysSeen", m_fTotalToastysSeen );
ini.GetValue ( "Options", "RouletteSeeds", m_RouletteSeeds );
m_asAdditionalSongFolders.clear();
CString sAdditionalSongFolders;
@@ -311,6 +336,16 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueB( "Options", "AntiAliasing", m_bAntiAliasing );
ini.SetValueF( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
// unlock system values
ini.SetValueF( "Options", "ArcadePointsAccumulated", m_fArcadePointsAccumulated );
ini.SetValueF( "Options", "SongPointsAccumulated", m_fSongPointsAccumulated );
ini.SetValueF( "Options", "ExtraStagesCleared", m_fExtraStagesCleared );
ini.SetValueF( "Options", "ExtraStagesFailed", m_fExtraStagesFailed );
ini.SetValueF( "Options", "TotalStagesCleared", m_fTotalStagesCleared );
ini.SetValueF( "Options", "TotalToastysSeen", m_fTotalToastysSeen );
ini.SetValue ( "Options", "RouletteSeeds", m_RouletteSeeds );
/* Only write these if they aren't the default. This ensures that we can change
* the default and have it take effect for everyone (except people who
* tweaked this value). */