From fb1d69add3c1cf8345b1c09b0692bdd7797f3ca2 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 9 May 2005 08:44:01 +0000 Subject: [PATCH] rename: IsUsingProfile -> IsPersistentProfile Don't require IsPersistentProfile in some places related to fitness mode where a non-persistent Profile will suffice --- stepmania/src/CourseUtil.cpp | 2 +- stepmania/src/GameCommand.cpp | 15 +++++-------- stepmania/src/GameState.cpp | 12 +++++----- stepmania/src/MusicWheelItem.cpp | 2 +- stepmania/src/PaneDisplay.cpp | 2 +- stepmania/src/ProfileManager.cpp | 34 ++++++++++++++--------------- stepmania/src/ProfileManager.h | 4 ++-- stepmania/src/ScreenEnding.cpp | 4 ++-- stepmania/src/ScreenEvaluation.cpp | 19 ++++++++-------- stepmania/src/ScreenOptions.cpp | 1 + stepmania/src/ScreenSelectMusic.cpp | 4 ++-- stepmania/src/ScreenSystemLayer.cpp | 4 ++-- stepmania/src/SongUtil.cpp | 2 +- stepmania/src/StepMania.cpp | 2 +- stepmania/src/StepsUtil.cpp | 2 +- stepmania/src/UnlockManager.cpp | 2 +- 16 files changed, 53 insertions(+), 58 deletions(-) diff --git a/stepmania/src/CourseUtil.cpp b/stepmania/src/CourseUtil.cpp index 5764b94c45..945fcfe29f 100644 --- a/stepmania/src/CourseUtil.cpp +++ b/stepmania/src/CourseUtil.cpp @@ -167,7 +167,7 @@ void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector &vpCours void CourseUtil::SortCoursePointerArrayByNumPlays( vector &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 ); diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 42f7943649..c6a8d49773 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -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 &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. */ diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 6eaacbd92a..9a8a58ddb0 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -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 &asFeatsOu } // Find Personal Records - if( PROFILEMAN->IsUsingProfile( pn ) ) + if( PROFILEMAN->IsPersistentProfile( pn ) ) { HighScoreList &hsl = pProf->GetCourseHighScoreList( pCourse, pTrail ); for( unsigned i=0; iIsUsingProfile(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 ) diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index 6b9a62da2d..e888954c2f 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -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; diff --git a/stepmania/src/PaneDisplay.cpp b/stepmania/src/PaneDisplay.cpp index 2c08e5507b..926c2b3260 100644 --- a/stepmania/src/PaneDisplay.cpp +++ b/stepmania/src/PaneDisplay.cpp @@ -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 ) diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 689953e2a2..a605c45f6a 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -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 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::Register( L ); diff --git a/stepmania/src/ProfileManager.h b/stepmania/src/ProfileManager.h index 5491025327..1c057f42ab 100644 --- a/stepmania/src/ProfileManager.h +++ b/stepmania/src/ProfileManager.h @@ -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; diff --git a/stepmania/src/ScreenEnding.cpp b/stepmania/src/ScreenEnding.cpp index f96a460e5c..2e76d97007 100644 --- a/stepmania/src/ScreenEnding.cpp +++ b/stepmania/src/ScreenEnding.cpp @@ -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 ) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index b5d60e7e3f..74a5e3e5a8 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -593,8 +593,7 @@ void ScreenEvaluation::Init() // // init judgment area // - int l; - for( l=0; lShowMarvelous() ) 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; lm_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 ); diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index a1f27789c3..98e8b8b6ff 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -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 ); diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index ee5830a33e..b8a24822d2 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -1331,7 +1331,7 @@ void ScreenSelectMusic::AfterStepsChange( const vector &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 &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; } diff --git a/stepmania/src/ScreenSystemLayer.cpp b/stepmania/src/ScreenSystemLayer.cpp index 8827c97554..21b9b8c279 100644 --- a/stepmania/src/ScreenSystemLayer.cpp +++ b/stepmania/src/ScreenSystemLayer.cpp @@ -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() ) diff --git a/stepmania/src/SongUtil.cpp b/stepmania/src/SongUtil.cpp index f9f1ac99b9..fbd3d6d052 100644 --- a/stepmania/src/SongUtil.cpp +++ b/stepmania/src/SongUtil.cpp @@ -195,7 +195,7 @@ void SongUtil::SortSongPointerArrayByGroupAndTitle( vector &vpSongsInOut void SongUtil::SortSongPointerArrayByNumPlays( vector &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 ); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index b23459adea..ebb8ca2d61 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -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" ); } diff --git a/stepmania/src/StepsUtil.cpp b/stepmania/src/StepsUtil.cpp index 11d86e1cba..1d1c0590f1 100644 --- a/stepmania/src/StepsUtil.cpp +++ b/stepmania/src/StepsUtil.cpp @@ -25,7 +25,7 @@ bool CompareStepsPointersBySortValueDescending(const Steps *pSteps1, const Steps void StepsUtil::SortStepsPointerArrayByNumPlays( vector &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 ); diff --git a/stepmania/src/UnlockManager.cpp b/stepmania/src/UnlockManager.cpp index 01ed72a051..e68e171664 100644 --- a/stepmania/src/UnlockManager.cpp +++ b/stepmania/src/UnlockManager.cpp @@ -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 );