rename: IsUsingProfile -> IsPersistentProfile
Don't require IsPersistentProfile in some places related to fitness mode where a non-persistent Profile will suffice
This commit is contained in:
@@ -167,7 +167,7 @@ void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector<Course*> &vpCours
|
||||
|
||||
void CourseUtil::SortCoursePointerArrayByNumPlays( vector<Course*> &vpCoursesInOut, ProfileSlot slot, bool bDescending )
|
||||
{
|
||||
if( !PROFILEMAN->IsUsingProfile(slot) )
|
||||
if( !PROFILEMAN->IsPersistentProfile(slot) )
|
||||
return; // nothing to do since we don't have data
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(slot);
|
||||
SortCoursePointerArrayByNumPlays( vpCoursesInOut, pProfile, bDescending );
|
||||
|
||||
@@ -130,11 +130,11 @@ bool GameCommand::DescribesCurrentMode( PlayerNumber pn ) const
|
||||
return false;
|
||||
if( m_SortOrder != SORT_INVALID && GAMESTATE->m_PreferredSortOrder != m_SortOrder )
|
||||
return false;
|
||||
if( m_iWeightPounds != -1 && PROFILEMAN->IsUsingProfile(pn) && PROFILEMAN->GetProfile(pn)->m_iWeightPounds != m_iWeightPounds )
|
||||
if( m_iWeightPounds != -1 && PROFILEMAN->GetProfile(pn)->m_iWeightPounds != m_iWeightPounds )
|
||||
return false;
|
||||
if( m_iGoalCalories != -1 && PROFILEMAN->IsUsingProfile(pn) && PROFILEMAN->GetProfile(pn)->m_iGoalCalories != m_iGoalCalories )
|
||||
if( m_iGoalCalories != -1 && PROFILEMAN->GetProfile(pn)->m_iGoalCalories != m_iGoalCalories )
|
||||
return false;
|
||||
if( m_GoalType != GOAL_INVALID && PROFILEMAN->IsUsingProfile(pn) && PROFILEMAN->GetProfile(pn)->m_GoalType != m_GoalType )
|
||||
if( m_GoalType != GOAL_INVALID && PROFILEMAN->GetProfile(pn)->m_GoalType != m_GoalType )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -768,16 +768,13 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
|
||||
SOUND->PlayOnce( THEME->GetPathToS( m_sSoundPath ) );
|
||||
if( m_iWeightPounds != -1 )
|
||||
FOREACH_CONST( PlayerNumber, vpns, pn )
|
||||
if( PROFILEMAN->IsUsingProfile(*pn) )
|
||||
PROFILEMAN->GetProfile(*pn)->m_iWeightPounds = m_iWeightPounds;
|
||||
PROFILEMAN->GetProfile(*pn)->m_iWeightPounds = m_iWeightPounds;
|
||||
if( m_iGoalCalories != -1 )
|
||||
FOREACH_CONST( PlayerNumber, vpns, pn )
|
||||
if( PROFILEMAN->IsUsingProfile(*pn) )
|
||||
PROFILEMAN->GetProfile(*pn)->m_iGoalCalories = m_iGoalCalories;
|
||||
PROFILEMAN->GetProfile(*pn)->m_iGoalCalories = m_iGoalCalories;
|
||||
if( m_GoalType != GOAL_INVALID )
|
||||
FOREACH_CONST( PlayerNumber, vpns, pn )
|
||||
if( PROFILEMAN->IsUsingProfile(*pn) )
|
||||
PROFILEMAN->GetProfile(*pn)->m_GoalType = m_GoalType;
|
||||
PROFILEMAN->GetProfile(*pn)->m_GoalType = m_GoalType;
|
||||
|
||||
/* If we're going to stop music, do so before preparing new screens, so we don't
|
||||
* stop music between preparing screens and loading screens. */
|
||||
|
||||
@@ -311,7 +311,7 @@ void GameState::PlayersFinalized()
|
||||
|
||||
MEMCARDMAN->UnmountCard( pn );
|
||||
|
||||
if( !PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( !PROFILEMAN->IsPersistentProfile(pn) )
|
||||
continue; // skip
|
||||
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(pn);
|
||||
@@ -380,7 +380,7 @@ void GameState::EndGame()
|
||||
|
||||
FOREACH_HumanPlayer( pn )
|
||||
{
|
||||
if( !PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( !PROFILEMAN->IsPersistentProfile(pn) )
|
||||
continue;
|
||||
|
||||
bool bWasMemoryCard = PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn);
|
||||
@@ -502,7 +502,7 @@ void GameState::FinishStage()
|
||||
|
||||
void GameState::SaveCurrentSettingsToProfile( PlayerNumber pn )
|
||||
{
|
||||
if( !PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( !PROFILEMAN->IsPersistentProfile(pn) )
|
||||
return;
|
||||
if( m_bDemonstrationOrJukebox )
|
||||
return;
|
||||
@@ -1563,7 +1563,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
||||
}
|
||||
|
||||
// Find Personal Records
|
||||
if( PROFILEMAN->IsUsingProfile( pn ) )
|
||||
if( PROFILEMAN->IsPersistentProfile( pn ) )
|
||||
{
|
||||
HighScoreList &hsl = pProf->GetCourseHighScoreList( pCourse, pTrail );
|
||||
for( unsigned i=0; i<hsl.vHighScores.size(); i++ )
|
||||
@@ -1865,8 +1865,6 @@ bool GameState::IsPlayerDead( PlayerNumber pn ) const
|
||||
|
||||
float GameState::GetGoalPercentComplete( PlayerNumber pn )
|
||||
{
|
||||
if( !PROFILEMAN->IsUsingProfile(pn) )
|
||||
return 0;
|
||||
const Profile *pProfile = PROFILEMAN->GetProfile(pn);
|
||||
const StageStats &ssAccum = STATSMAN->GetAccumStageStats();
|
||||
const StageStats &ssCurrent = STATSMAN->m_CurStageStats;
|
||||
@@ -2083,7 +2081,7 @@ LUA_REGISTER_CLASS( GameState )
|
||||
#include "LuaFunctions.h"
|
||||
LuaFunction_PlayerNumber( IsPlayerEnabled, GAMESTATE->IsPlayerEnabled(pn) )
|
||||
LuaFunction_PlayerNumber( IsHumanPlayer, GAMESTATE->IsHumanPlayer(pn) )
|
||||
LuaFunction_PlayerNumber( IsPlayerUsingProfile, PROFILEMAN->IsUsingProfile(pn) )
|
||||
LuaFunction_PlayerNumber( IsPlayerUsingProfile, PROFILEMAN->IsPersistentProfile(pn) )
|
||||
LuaFunction_PlayerNumber( IsWinner, GAMESTATE->GetStageResult(pn)==RESULT_WIN )
|
||||
LuaFunction_NoArgs( IsCourseMode, GAMESTATE->IsCourseMode() )
|
||||
LuaFunction_NoArgs( IsDemonstration, GAMESTATE->m_bDemonstrationOrJukebox )
|
||||
|
||||
@@ -254,7 +254,7 @@ void MusicWheelItem::RefreshGrades()
|
||||
else
|
||||
dc = GAMESTATE->m_PreferredDifficulty[p];
|
||||
Grade grade;
|
||||
if( PROFILEMAN->IsUsingProfile(p) )
|
||||
if( PROFILEMAN->IsPersistentProfile(p) )
|
||||
grade = PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), (ProfileSlot)p, dc ).grade;
|
||||
else
|
||||
grade = PROFILEMAN->GetHighScoreForDifficulty( data->m_pSong, GAMESTATE->GetCurrentStyle(), PROFILE_SLOT_MACHINE, dc ).grade;
|
||||
|
||||
@@ -172,7 +172,7 @@ void PaneDisplay::SetContent( PaneContents c )
|
||||
const Steps *pSteps = GAMESTATE->m_pCurSteps[m_PlayerNumber];
|
||||
const Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||
const Trail *pTrail = GAMESTATE->m_pCurTrail[m_PlayerNumber];
|
||||
const Profile *pProfile = PROFILEMAN->IsUsingProfile(m_PlayerNumber) ? PROFILEMAN->GetProfile(m_PlayerNumber) : NULL;
|
||||
const Profile *pProfile = PROFILEMAN->IsPersistentProfile(m_PlayerNumber) ? PROFILEMAN->GetProfile(m_PlayerNumber) : NULL;
|
||||
bool bIsEdit = pSteps && pSteps->GetDifficulty() == DIFFICULTY_EDIT;
|
||||
|
||||
if( (g_Contents[c].req&NEED_NOTES) && !pSteps )
|
||||
|
||||
@@ -249,7 +249,7 @@ void ProfileManager::SaveAllProfiles() const
|
||||
|
||||
FOREACH_HumanPlayer( pn )
|
||||
{
|
||||
if( !IsUsingProfile(pn) )
|
||||
if( !IsPersistentProfile(pn) )
|
||||
continue;
|
||||
|
||||
this->SaveProfile( pn );
|
||||
@@ -451,14 +451,14 @@ const Profile* ProfileManager::GetProfile( ProfileSlot slot ) const
|
||||
//
|
||||
void ProfileManager::IncrementToastiesCount( PlayerNumber pn )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
++PROFILEMAN->GetProfile(pn)->m_iNumToasties;
|
||||
++PROFILEMAN->GetMachineProfile()->m_iNumToasties;
|
||||
}
|
||||
|
||||
void ProfileManager::AddStepTotals( PlayerNumber pn, int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, float fCaloriesBurned )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->AddStepTotals( iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, fCaloriesBurned );
|
||||
PROFILEMAN->GetMachineProfile()->AddStepTotals( iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, fCaloriesBurned );
|
||||
}
|
||||
@@ -498,7 +498,7 @@ void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, Play
|
||||
//
|
||||
if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForMachineSongHighScore )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->AddStepsHighScore( pSong, pSteps, hs, iPersonalIndexOut );
|
||||
|
||||
// don't leave machine high scores for edits
|
||||
@@ -509,14 +509,14 @@ void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, Play
|
||||
//
|
||||
// save recent score
|
||||
//
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->AddStepsRecentScore( pSong, pSteps, hs );
|
||||
PROFILEMAN->GetMachineProfile()->AddStepsRecentScore( pSong, pSteps, hs );
|
||||
}
|
||||
|
||||
void ProfileManager::IncrementStepsPlayCount( const Song* pSong, const Steps* pSteps, PlayerNumber pn )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->IncrementStepsPlayCount( pSong, pSteps );
|
||||
PROFILEMAN->GetMachineProfile()->IncrementStepsPlayCount( pSong, pSteps );
|
||||
}
|
||||
@@ -530,7 +530,7 @@ HighScore ProfileManager::GetHighScoreForDifficulty( const Song *s, const Style
|
||||
|
||||
const Steps* pSteps = s->GetStepsByDifficulty( st->m_StepsType, dc );
|
||||
|
||||
if( pSteps && PROFILEMAN->IsUsingProfile(slot) )
|
||||
if( pSteps && PROFILEMAN->IsPersistentProfile(slot) )
|
||||
return PROFILEMAN->GetProfile(slot)->GetStepsHighScoreList(s,pSteps).GetTopScore();
|
||||
else
|
||||
return HighScore();
|
||||
@@ -568,7 +568,7 @@ void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail,
|
||||
//
|
||||
if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForMachineCourseHighScore )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->AddCourseHighScore( pCourse, pTrail, hs, iPersonalIndexOut );
|
||||
PROFILEMAN->GetMachineProfile()->AddCourseHighScore( pCourse, pTrail, hs, iMachineIndexOut );
|
||||
}
|
||||
@@ -576,14 +576,14 @@ void ProfileManager::AddCourseScore( const Course* pCourse, const Trail* pTrail,
|
||||
//
|
||||
// save recent score
|
||||
//
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->AddCourseRecentScore( pCourse, pTrail, hs );
|
||||
PROFILEMAN->GetMachineProfile()->AddCourseRecentScore( pCourse, pTrail, hs );
|
||||
}
|
||||
|
||||
void ProfileManager::IncrementCoursePlayCount( const Course* pCourse, const Trail* pTrail, PlayerNumber pn )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->IncrementCoursePlayCount( pCourse, pTrail );
|
||||
PROFILEMAN->GetMachineProfile()->IncrementCoursePlayCount( pCourse, pTrail );
|
||||
}
|
||||
@@ -597,7 +597,7 @@ void ProfileManager::AddCategoryScore( StepsType st, RankingCategory rc, PlayerN
|
||||
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForMachineSongHighScore )
|
||||
{
|
||||
hs.sName = RANKING_TO_FILL_IN_MARKER[pn];
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->AddCategoryHighScore( st, rc, hs, iPersonalIndexOut );
|
||||
else
|
||||
iPersonalIndexOut = -1;
|
||||
@@ -607,12 +607,12 @@ void ProfileManager::AddCategoryScore( StepsType st, RankingCategory rc, PlayerN
|
||||
|
||||
void ProfileManager::IncrementCategoryPlayCount( StepsType st, RankingCategory rc, PlayerNumber pn )
|
||||
{
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->IncrementCategoryPlayCount( st, rc );
|
||||
PROFILEMAN->GetMachineProfile()->IncrementCategoryPlayCount( st, rc );
|
||||
}
|
||||
|
||||
bool ProfileManager::IsUsingProfile( ProfileSlot slot ) const
|
||||
bool ProfileManager::IsPersistentProfile( ProfileSlot slot ) const
|
||||
{
|
||||
switch( slot )
|
||||
{
|
||||
@@ -636,13 +636,13 @@ class LunaProfileManager : public Luna<T>
|
||||
public:
|
||||
LunaProfileManager() { LUA->Register( Register ); }
|
||||
|
||||
static int IsUsingProfile( T* p, lua_State *L ) { lua_pushboolean(L, p->IsUsingProfile((PlayerNumber)IArg(1)) ); return 1; }
|
||||
static int GetProfile( T* p, lua_State *L ) { PlayerNumber pn = (PlayerNumber)IArg(1); Profile* pP = p->GetProfile(pn); ASSERT(pP); pP->PushSelf(L); return 1; }
|
||||
static int GetMachineProfile( T* p, lua_State *L ) { p->GetMachineProfile()->PushSelf(L); return 1; }
|
||||
static int IsPersistentProfile( T* p, lua_State *L ) { lua_pushboolean(L, p->IsPersistentProfile((PlayerNumber)IArg(1)) ); return 1; }
|
||||
static int GetProfile( T* p, lua_State *L ) { PlayerNumber pn = (PlayerNumber)IArg(1); Profile* pP = p->GetProfile(pn); ASSERT(pP); pP->PushSelf(L); return 1; }
|
||||
static int GetMachineProfile( T* p, lua_State *L ) { p->GetMachineProfile()->PushSelf(L); return 1; }
|
||||
|
||||
static void Register(lua_State *L)
|
||||
{
|
||||
ADD_METHOD( IsUsingProfile )
|
||||
ADD_METHOD( IsPersistentProfile )
|
||||
ADD_METHOD( GetProfile )
|
||||
ADD_METHOD( GetMachineProfile )
|
||||
Luna<T>::Register( L );
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
void LoadMachineProfile();
|
||||
void SaveMachineProfile() const;
|
||||
|
||||
bool IsUsingProfile( PlayerNumber pn ) const { return !m_sProfileDir[pn].empty(); }
|
||||
bool IsUsingProfile( ProfileSlot slot ) const;
|
||||
bool IsPersistentProfile( PlayerNumber pn ) const { return !m_sProfileDir[pn].empty(); }
|
||||
bool IsPersistentProfile( ProfileSlot slot ) const;
|
||||
|
||||
// return a profile even if !IsUsingProfile
|
||||
const Profile* GetProfile( PlayerNumber pn ) const;
|
||||
|
||||
@@ -202,8 +202,8 @@ void ScreenEnding::Init()
|
||||
|
||||
FOREACH_HumanPlayer( p )
|
||||
{
|
||||
// don't show stats if not using a profile
|
||||
if( !PROFILEMAN->IsUsingProfile(p) )
|
||||
// don't show stats if not using a persistent profile
|
||||
if( !PROFILEMAN->IsPersistentProfile(p) )
|
||||
continue;
|
||||
|
||||
FOREACH_EndingStatsLine( i )
|
||||
|
||||
@@ -593,8 +593,7 @@ void ScreenEvaluation::Init()
|
||||
//
|
||||
// init judgment area
|
||||
//
|
||||
int l;
|
||||
for( l=0; l<NUM_JUDGE_LINES; l++ )
|
||||
for( int l=0; l<NUM_JUDGE_LINES; l++ )
|
||||
{
|
||||
if( l == 0 && !GAMESTATE->ShowMarvelous() )
|
||||
continue; // skip
|
||||
@@ -621,14 +620,14 @@ void ScreenEvaluation::Init()
|
||||
switch( l )
|
||||
{
|
||||
case marvelous: iValue = stageStats.m_player[p].iTapNoteScores[TNS_MARVELOUS]; break;
|
||||
case perfect: iValue = stageStats.m_player[p].iTapNoteScores[TNS_PERFECT]; break;
|
||||
case perfect: iValue = stageStats.m_player[p].iTapNoteScores[TNS_PERFECT]; break;
|
||||
case great: iValue = stageStats.m_player[p].iTapNoteScores[TNS_GREAT]; break;
|
||||
case good: iValue = stageStats.m_player[p].iTapNoteScores[TNS_GOOD]; break;
|
||||
case boo: iValue = stageStats.m_player[p].iTapNoteScores[TNS_BOO]; break;
|
||||
case boo: iValue = stageStats.m_player[p].iTapNoteScores[TNS_BOO]; break;
|
||||
case miss: iValue = stageStats.m_player[p].iTapNoteScores[TNS_MISS]; break;
|
||||
case ok: iValue = stageStats.m_player[p].iHoldNoteScores[HNS_OK]; break;
|
||||
case max_combo: iValue = stageStats.m_player[p].GetMaxCombo().cnt; break;
|
||||
case error: iValue = stageStats.m_player[p].iTotalError; break;
|
||||
case ok: iValue = stageStats.m_player[p].iHoldNoteScores[HNS_OK]; break;
|
||||
case max_combo: iValue = stageStats.m_player[p].GetMaxCombo().cnt; break;
|
||||
case error: iValue = stageStats.m_player[p].iTotalError; break;
|
||||
default: iValue = 0; ASSERT(0);
|
||||
}
|
||||
|
||||
@@ -639,7 +638,7 @@ void ScreenEvaluation::Init()
|
||||
}
|
||||
}
|
||||
|
||||
for( l=0; l<NUM_STATS_LINES; l++ )
|
||||
for( int l=0; l<NUM_STATS_LINES; l++ )
|
||||
{
|
||||
if( !SHOW_STAT(l) )
|
||||
continue;
|
||||
@@ -916,7 +915,7 @@ void ScreenEvaluation::CommitScores(
|
||||
hs.fSurviveSeconds = stageStats.m_player[p].fAliveSeconds;
|
||||
hs.sModifiers = GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.GetString();
|
||||
hs.dateTime = DateTime::GetNowDateTime();
|
||||
hs.sPlayerGuid = PROFILEMAN->IsUsingProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : CString("");
|
||||
hs.sPlayerGuid = PROFILEMAN->IsPersistentProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : CString("");
|
||||
hs.sMachineGuid = PROFILEMAN->GetMachineProfile()->m_sGuid;
|
||||
hs.iProductID = PREFSMAN->m_iProductID;
|
||||
memcpy( hs.iTapNoteScores, stageStats.m_player[p].iTapNoteScores, sizeof(hs.iTapNoteScores) );
|
||||
@@ -1302,7 +1301,7 @@ void ScreenEvaluation::Input( const DeviceInput& DeviceI, const InputEventType t
|
||||
CodeDetector::EnteredCode(GameI.controller, CODE_SAVE_SCREENSHOT2) )
|
||||
{
|
||||
if( !m_bSavedScreenshot[pn] && // only allow one screenshot
|
||||
PROFILEMAN->IsUsingProfile(pn) )
|
||||
PROFILEMAN->IsPersistentProfile(pn) )
|
||||
{
|
||||
if( PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn) )
|
||||
MEMCARDMAN->MountCard( pn );
|
||||
|
||||
@@ -1135,6 +1135,7 @@ void ScreenOptions::MenuUpDown( PlayerNumber pn, const InputEventType type, int
|
||||
return;
|
||||
|
||||
OptionRow &row = *m_Rows[iDest];
|
||||
|
||||
if( row.GetRowDef().IsEnabledForPlayer(pn) )
|
||||
{
|
||||
MoveRow( pn, iDelta, bRepeat );
|
||||
|
||||
@@ -1331,7 +1331,7 @@ void ScreenSelectMusic::AfterStepsChange( const vector<PlayerNumber> &vpns )
|
||||
int iScore = 0;
|
||||
if( pSteps )
|
||||
{
|
||||
Profile* pProfile = PROFILEMAN->IsUsingProfile(pn) ? PROFILEMAN->GetProfile(pn) : PROFILEMAN->GetMachineProfile();
|
||||
Profile* pProfile = PROFILEMAN->IsPersistentProfile(pn) ? PROFILEMAN->GetProfile(pn) : PROFILEMAN->GetMachineProfile();
|
||||
iScore = pProfile->GetStepsHighScoreList(pSong,pSteps).GetTopScore().iScore;
|
||||
}
|
||||
|
||||
@@ -1376,7 +1376,7 @@ void ScreenSelectMusic::AfterTrailChange( const vector<PlayerNumber> &vpns )
|
||||
int iScore = 0;
|
||||
if( pTrail )
|
||||
{
|
||||
Profile* pProfile = PROFILEMAN->IsUsingProfile(pn) ? PROFILEMAN->GetProfile(pn) : PROFILEMAN->GetMachineProfile();
|
||||
Profile* pProfile = PROFILEMAN->IsPersistentProfile(pn) ? PROFILEMAN->GetProfile(pn) : PROFILEMAN->GetMachineProfile();
|
||||
iScore = pProfile->GetCourseHighScoreList(pCourse,pTrail).GetTopScore().iScore;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const
|
||||
else if( PROFILEMAN->LastLoadWasTamperedOrCorrupt(pn) )
|
||||
return CREDITS_LOAD_FAILED.GetValue();
|
||||
// Prefer the name of the profile over the name of the card.
|
||||
else if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
else if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
return pProfile->GetDisplayName();
|
||||
else if( GAMESTATE->PlayersCanJoin() )
|
||||
return CREDITS_INSERT_CARD.GetValue();
|
||||
@@ -155,7 +155,7 @@ CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const
|
||||
return CREDITS_LOAD_FAILED.GetValue();
|
||||
|
||||
// If there is a local profile loaded, prefer it over the name of the memory card.
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
{
|
||||
CString s = pProfile->GetDisplayName();
|
||||
if( s.empty() )
|
||||
|
||||
@@ -195,7 +195,7 @@ void SongUtil::SortSongPointerArrayByGroupAndTitle( vector<Song*> &vpSongsInOut
|
||||
|
||||
void SongUtil::SortSongPointerArrayByNumPlays( vector<Song*> &vpSongsInOut, ProfileSlot slot, bool bDescending )
|
||||
{
|
||||
if( !PROFILEMAN->IsUsingProfile(slot) )
|
||||
if( !PROFILEMAN->IsPersistentProfile(slot) )
|
||||
return; // nothing to do since we don't have data
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(slot);
|
||||
SortSongPointerArrayByNumPlays( vpSongsInOut, pProfile, bDescending );
|
||||
|
||||
@@ -1323,7 +1323,7 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam
|
||||
BOOKKEEPER->WriteToDisk();
|
||||
PROFILEMAN->SaveMachineProfile();
|
||||
FOREACH_PlayerNumber( p )
|
||||
if( PROFILEMAN->IsUsingProfile(p) )
|
||||
if( PROFILEMAN->IsPersistentProfile(p) )
|
||||
PROFILEMAN->SaveProfile( p );
|
||||
SCREENMAN->SystemMessage( "Stats saved" );
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ bool CompareStepsPointersBySortValueDescending(const Steps *pSteps1, const Steps
|
||||
|
||||
void StepsUtil::SortStepsPointerArrayByNumPlays( vector<Steps*> &vStepsPointers, ProfileSlot slot, bool bDescending )
|
||||
{
|
||||
if( !PROFILEMAN->IsUsingProfile(slot) )
|
||||
if( !PROFILEMAN->IsPersistentProfile(slot) )
|
||||
return; // nothing to do since we don't have data
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(slot);
|
||||
SortStepsPointerArrayByNumPlays( vStepsPointers, pProfile, bDescending );
|
||||
|
||||
@@ -443,7 +443,7 @@ void UnlockManager::UpdateCachedPointers()
|
||||
void UnlockManager::UnlockCode( int num )
|
||||
{
|
||||
FOREACH_PlayerNumber( pn )
|
||||
if( PROFILEMAN->IsUsingProfile(pn) )
|
||||
if( PROFILEMAN->IsPersistentProfile(pn) )
|
||||
PROFILEMAN->GetProfile(pn)->m_UnlockedSongs.insert( num );
|
||||
|
||||
PROFILEMAN->GetMachineProfile()->m_UnlockedSongs.insert( num );
|
||||
|
||||
Reference in New Issue
Block a user