cleaned up unlock data so it appears in MemCard.ini and is no longer in preferences

(note to whoever builds uninstaller - don't delete memcard.ini on uninstall, please :)
This commit is contained in:
Andrew Wong
2003-07-11 12:01:25 +00:00
parent 89e57aa708
commit 604663f466
4 changed files with 10 additions and 42 deletions
-31
View File
@@ -99,17 +99,6 @@ PrefsManager::PrefsManager()
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. */
@@ -217,16 +206,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
ini.GetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
ini.GetValueB( "Options", "ShowDancingCharacters", m_bShowDancingCharacters );
/* 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 );
@@ -320,7 +300,6 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueB( "Options", "Timestamping", m_bTimestamping );
ini.SetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
ini.SetValueB( "Options", "ShowDancingCharacters", m_bShowDancingCharacters );
ini.SetValueF( "Options", "DancePointsAccumulated", m_fDancePointsAccumulated );
ini.SetValueB( "Options", "UseUnlockSystem", m_bUseUnlockSystem );
ini.SetValueB( "Options", "FirstRun", m_bFirstRun );
ini.SetValueB( "Options", "AutoMapJoysticks", m_bAutoMapJoysticks );
@@ -332,16 +311,6 @@ 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). */
-8
View File
@@ -77,18 +77,10 @@ public:
bool m_bAutogenGroupCourses;
bool m_bBreakComboToGetItem;
bool m_bShowDancingCharacters;
float m_fDancePointsAccumulated;
bool m_bUseUnlockSystem;
bool m_bFirstRun;
bool m_bAutoMapJoysticks;
float m_fGlobalOffsetSeconds;
float m_fArcadePointsAccumulated;
float m_fSongPointsAccumulated;
float m_fExtraStagesCleared;
float m_fExtraStagesFailed;
float m_fTotalStagesCleared;
float m_fTotalToastysSeen;
CString m_RouletteSeeds;
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
int m_iBoostAppPriority;
+4 -1
View File
@@ -18,6 +18,7 @@
#include "ScreenGameplay.h"
#include "GameState.h"
#include "Course.h"
#include "unlocksystem.h"
ScoreKeeperMAX2::ScoreKeeperMAX2( const vector<Notes*>& apNotes_, PlayerNumber pn_ ):
@@ -305,8 +306,10 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
m_iCurToastyCombo += iNumTapsInRow;
if( m_iCurToastyCombo==250 && !GAMESTATE->m_bDemonstrationOrJukebox )
{
SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 );
PREFSMAN->m_fTotalToastysSeen += 1;
GAMESTATE->m_pUnlockingSys->UnlockToasty();
}
break;
default:
m_iCurToastyCombo = 0;
+6 -2
View File
@@ -669,13 +669,17 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
const float ArcadePoints[NUM_GRADES] = { -1 /* unused */, 0, 0, 1, 1, 1, 1, 10, 10 };
const float SongPoints[NUM_GRADES] = { -1, 0, 1, 2, 3, 4, 5, 10, 20 };
/* XXX: This should use stageStats.GetGrade, not m_Grades. */
// this is already done on lines 272-274
/* XXX: This should use stageStats.GetGrade, not m_Grades.
const Grade g = m_Grades[p].GetGrade();
PREFSMAN->m_fArcadePointsAccumulated += ArcadePoints[g];
PREFSMAN->m_fSongPointsAccumulated += SongPoints[g];
PREFSMAN->SaveGlobalPrefsToDisk();
PREFSMAN->SaveGlobalPrefsToDisk(); */
}
bool bOneHasNewRecord = false;