Merge branch 'ComboContinuesBetweenSongs_readd' of https://github.com/kyzentun/stepmania into kyzentun-ComboContinuesBetweenSongs_readd

This commit is contained in:
Colby Klein
2014-02-17 14:41:33 -08:00
5 changed files with 31 additions and 1 deletions
+24
View File
@@ -795,6 +795,13 @@ void GameState::FinishStage()
}
}
// Save the current combo to the profiles so it can be used for ComboContinuesBetweenSongs.
FOREACH_HumanPlayer( p )
{
Profile* pProfile = PROFILEMAN->GetProfile(p);
pProfile->m_iCurrentCombo = STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo;
}
if( m_bDemonstrationOrJukebox )
return;
@@ -926,7 +933,24 @@ void GameState::ResetMusicStatistics()
void GameState::ResetStageStatistics()
{
StageStats OldStats = STATSMAN->m_CurStageStats;
STATSMAN->m_CurStageStats = StageStats();
if( PREFSMAN->m_bComboContinuesBetweenSongs )
{
FOREACH_PlayerNumber( p )
{
bool FirstSong = m_iCurrentStageIndex == 0;
if( FirstSong )
{
Profile* pProfile = PROFILEMAN->GetProfile(p);
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = pProfile->m_iCurrentCombo;
}
else
{
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = OldStats.m_player[p].m_iCurCombo;
}
}
}
RemoveAllActiveAttacks();
FOREACH_PlayerNumber( p )
+1
View File
@@ -217,6 +217,7 @@ PrefsManager::PrefsManager() :
m_iCoinsPerCredit ( "CoinsPerCredit", 1 ),
m_iSongsPerPlay ( "SongsPerPlay", 3, ValidateSongsPerPlay ),
m_bDelayedCreditsReconcile ( "DelayedCreditsReconcile", false ),
m_bComboContinuesBetweenSongs ( "ComboContinuesBetweenSongs", false ),
m_ShowSongOptions ( "ShowSongOptions", Maybe_YES ),
m_bDancePointsForOni ( "DancePointsForOni", true ),
m_bPercentageScoring ( "PercentageScoring", false ),
+1
View File
@@ -208,6 +208,7 @@ public:
Preference<int> m_iCoinsPerCredit;
Preference<int> m_iSongsPerPlay;
Preference<bool> m_bDelayedCreditsReconcile; // zuh?
Preference<bool> m_bComboContinuesBetweenSongs;
Preference<Maybe> m_ShowSongOptions;
Preference<bool> m_bDancePointsForOni;
Preference<bool> m_bPercentageScoring;
+3
View File
@@ -116,6 +116,7 @@ void Profile::InitGeneralData()
m_LastStepsType = StepsType_Invalid;
m_lastSong.Unset();
m_lastCourse.Unset();
m_iCurrentCombo = 0;
m_iTotalSessions = 0;
m_iTotalSessionSeconds = 0;
m_iTotalGameplaySeconds = 0;
@@ -1088,6 +1089,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const
pGeneralDataNode->AppendChild( "LastStepsType", GAMEMAN->GetStepsTypeInfo(m_LastStepsType).szName );
pGeneralDataNode->AppendChild( m_lastSong.CreateNode() );
pGeneralDataNode->AppendChild( m_lastCourse.CreateNode() );
pGeneralDataNode->AppendChild( "CurrentCombo", m_iCurrentCombo );
pGeneralDataNode->AppendChild( "TotalSessions", m_iTotalSessions );
pGeneralDataNode->AppendChild( "TotalSessionSeconds", m_iTotalSessionSeconds );
pGeneralDataNode->AppendChild( "TotalGameplaySeconds", m_iTotalGameplaySeconds );
@@ -1271,6 +1273,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
pNode->GetChildValue( "LastStepsType", s ); m_LastStepsType = GAMEMAN->StringToStepsType( s );
pTemp = pNode->GetChild( "Song" ); if( pTemp ) m_lastSong.LoadFromNode( pTemp );
pTemp = pNode->GetChild( "Course" ); if( pTemp ) m_lastCourse.LoadFromNode( pTemp );
pNode->GetChildValue( "CurrentCombo", m_iCurrentCombo );
pNode->GetChildValue( "TotalSessions", m_iTotalSessions );
pNode->GetChildValue( "TotalSessionSeconds", m_iTotalSessionSeconds );
pNode->GetChildValue( "TotalGameplaySeconds", m_iTotalGameplaySeconds );
+2 -1
View File
@@ -78,7 +78,7 @@ public:
m_LastDifficulty(Difficulty_Invalid),
m_LastCourseDifficulty(Difficulty_Invalid),
m_LastStepsType(StepsType_Invalid), m_lastSong(),
m_lastCourse(), m_iTotalSessions(0),
m_lastCourse(), m_iCurrentCombo(0), m_iTotalSessions(0),
m_iTotalSessionSeconds(0), m_iTotalGameplaySeconds(0),
m_fTotalCaloriesBurned(0), m_GoalType(GoalType_Calories),
m_iGoalCalories(0), m_iGoalSeconds(0), m_iTotalDancePoints(0),
@@ -165,6 +165,7 @@ public:
StepsType m_LastStepsType;
SongID m_lastSong;
CourseID m_lastCourse;
int m_iCurrentCombo;
int m_iTotalSessions;
int m_iTotalSessionSeconds;
int m_iTotalGameplaySeconds;