move some stuff out of PManager
This commit is contained in:
@@ -209,7 +209,6 @@ PrefsManager::PrefsManager() :
|
|||||||
m_iRegenComboAfterMiss ( "RegenComboAfterMiss", 5 ),
|
m_iRegenComboAfterMiss ( "RegenComboAfterMiss", 5 ),
|
||||||
m_iMaxRegenComboAfterFail ( "MaxRegenComboAfterFail", 10 ),
|
m_iMaxRegenComboAfterFail ( "MaxRegenComboAfterFail", 10 ),
|
||||||
m_iMaxRegenComboAfterMiss ( "MaxRegenComboAfterMiss", 10 ),
|
m_iMaxRegenComboAfterMiss ( "MaxRegenComboAfterMiss", 10 ),
|
||||||
m_bTwoPlayerRecovery ( "TwoPlayerRecovery", true ),
|
|
||||||
m_bMercifulDrain ( "MercifulDrain", true ), // negative life deltas are scaled by the players life percentage
|
m_bMercifulDrain ( "MercifulDrain", true ), // negative life deltas are scaled by the players life percentage
|
||||||
m_bMinimum1FullSongInCourses ( "Minimum1FullSongInCourses", false ), // FEoS for 1st song, FailImmediate thereafter
|
m_bMinimum1FullSongInCourses ( "Minimum1FullSongInCourses", false ), // FEoS for 1st song, FailImmediate thereafter
|
||||||
m_bFailOffInBeginner ( "FailOffInBeginner", false ),
|
m_bFailOffInBeginner ( "FailOffInBeginner", false ),
|
||||||
@@ -234,7 +233,6 @@ PrefsManager::PrefsManager() :
|
|||||||
m_bArcadeOptionsNavigation ( "ArcadeOptionsNavigation", false ),
|
m_bArcadeOptionsNavigation ( "ArcadeOptionsNavigation", false ),
|
||||||
m_MusicWheelUsesSections ( "MusicWheelUsesSections", ALWAYS ),
|
m_MusicWheelUsesSections ( "MusicWheelUsesSections", ALWAYS ),
|
||||||
m_iMusicWheelSwitchSpeed ( "MusicWheelSwitchSpeed", 10 ),
|
m_iMusicWheelSwitchSpeed ( "MusicWheelSwitchSpeed", 10 ),
|
||||||
m_bEasterEggs ( "EasterEggs", true ),
|
|
||||||
m_AllowW1 ( "AllowW1", ALLOW_W1_EVERYWHERE ),
|
m_AllowW1 ( "AllowW1", ALLOW_W1_EVERYWHERE ),
|
||||||
m_bEventMode ( "EventMode", false ),
|
m_bEventMode ( "EventMode", false ),
|
||||||
m_iCoinsPerCredit ( "CoinsPerCredit", 1 ),
|
m_iCoinsPerCredit ( "CoinsPerCredit", 1 ),
|
||||||
@@ -249,13 +247,11 @@ PrefsManager::PrefsManager() :
|
|||||||
m_fLongVerSongSeconds ( "LongVerSongSeconds", 60*2.5f ), // Dynamite Rave is 2:55
|
m_fLongVerSongSeconds ( "LongVerSongSeconds", 60*2.5f ), // Dynamite Rave is 2:55
|
||||||
m_fMarathonVerSongSeconds ( "MarathonVerSongSeconds", 60*5.f ),
|
m_fMarathonVerSongSeconds ( "MarathonVerSongSeconds", 60*5.f ),
|
||||||
m_ShowSongOptions ( "ShowSongOptions", YES ),
|
m_ShowSongOptions ( "ShowSongOptions", YES ),
|
||||||
m_bCenter1Player ( "Center1Player", false ),
|
|
||||||
m_bDancePointsForOni ( "DancePointsForOni", false ),
|
m_bDancePointsForOni ( "DancePointsForOni", false ),
|
||||||
m_bPercentageScoring ( "PercentageScoring", false ),
|
m_bPercentageScoring ( "PercentageScoring", false ),
|
||||||
m_fMinPercentageForMachineSongHighScore ( "MinPercentageForMachineSongHighScore", 0.5f ),
|
m_fMinPercentageForMachineSongHighScore ( "MinPercentageForMachineSongHighScore", 0.5f ),
|
||||||
m_fMinPercentageForMachineCourseHighScore ( "MinPercentageForMachineCourseHighScore", 0.0001f ), // don't save course scores with 0 percentage
|
m_fMinPercentageForMachineCourseHighScore ( "MinPercentageForMachineCourseHighScore", 0.0001f ), // don't save course scores with 0 percentage
|
||||||
m_bDisqualification ( "Disqualification", false ),
|
m_bDisqualification ( "Disqualification", false ),
|
||||||
m_bShowLyrics ( "ShowLyrics", true ),
|
|
||||||
m_bAutogenSteps ( "AutogenSteps", true ),
|
m_bAutogenSteps ( "AutogenSteps", true ),
|
||||||
m_bAutogenGroupCourses ( "AutogenGroupCourses", true ),
|
m_bAutogenGroupCourses ( "AutogenGroupCourses", true ),
|
||||||
m_bBreakComboToGetItem ( "BreakComboToGetItem", false ),
|
m_bBreakComboToGetItem ( "BreakComboToGetItem", false ),
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ public:
|
|||||||
Preference<int> m_iRegenComboAfterMiss;
|
Preference<int> m_iRegenComboAfterMiss;
|
||||||
Preference<int> m_iMaxRegenComboAfterFail;
|
Preference<int> m_iMaxRegenComboAfterFail;
|
||||||
Preference<int> m_iMaxRegenComboAfterMiss;
|
Preference<int> m_iMaxRegenComboAfterMiss;
|
||||||
Preference<bool> m_bTwoPlayerRecovery;
|
|
||||||
Preference<bool> m_bMercifulDrain; // negative life deltas are scaled by the players life percentage
|
Preference<bool> m_bMercifulDrain; // negative life deltas are scaled by the players life percentage
|
||||||
Preference<bool> m_bMinimum1FullSongInCourses; // FEoS for 1st song, FailImmediate thereafter
|
Preference<bool> m_bMinimum1FullSongInCourses; // FEoS for 1st song, FailImmediate thereafter
|
||||||
Preference<bool> m_bFailOffInBeginner;
|
Preference<bool> m_bFailOffInBeginner;
|
||||||
@@ -119,7 +118,6 @@ public:
|
|||||||
enum MusicWheelUsesSections { NEVER, ALWAYS, ABC_ONLY };
|
enum MusicWheelUsesSections { NEVER, ALWAYS, ABC_ONLY };
|
||||||
Preference<MusicWheelUsesSections,int> m_MusicWheelUsesSections;
|
Preference<MusicWheelUsesSections,int> m_MusicWheelUsesSections;
|
||||||
Preference<int> m_iMusicWheelSwitchSpeed;
|
Preference<int> m_iMusicWheelSwitchSpeed;
|
||||||
Preference<bool> m_bEasterEggs;
|
|
||||||
enum AllowW1 { ALLOW_W1_NEVER, ALLOW_W1_COURSES_ONLY, ALLOW_W1_EVERYWHERE };
|
enum AllowW1 { ALLOW_W1_NEVER, ALLOW_W1_COURSES_ONLY, ALLOW_W1_EVERYWHERE };
|
||||||
Preference<AllowW1,int> m_AllowW1;
|
Preference<AllowW1,int> m_AllowW1;
|
||||||
Preference<bool> m_bEventMode;
|
Preference<bool> m_bEventMode;
|
||||||
@@ -138,13 +136,11 @@ public:
|
|||||||
Preference<float> m_fMarathonVerSongSeconds;
|
Preference<float> m_fMarathonVerSongSeconds;
|
||||||
enum Maybe { ASK = -1, NO = 0, YES = 1 };
|
enum Maybe { ASK = -1, NO = 0, YES = 1 };
|
||||||
Preference<Maybe,int> m_ShowSongOptions;
|
Preference<Maybe,int> m_ShowSongOptions;
|
||||||
Preference<bool> m_bCenter1Player;
|
|
||||||
Preference<bool> m_bDancePointsForOni;
|
Preference<bool> m_bDancePointsForOni;
|
||||||
Preference<bool> m_bPercentageScoring;
|
Preference<bool> m_bPercentageScoring;
|
||||||
Preference<float> m_fMinPercentageForMachineSongHighScore;
|
Preference<float> m_fMinPercentageForMachineSongHighScore;
|
||||||
Preference<float> m_fMinPercentageForMachineCourseHighScore;
|
Preference<float> m_fMinPercentageForMachineCourseHighScore;
|
||||||
Preference<bool> m_bDisqualification;
|
Preference<bool> m_bDisqualification;
|
||||||
Preference<bool> m_bShowLyrics;
|
|
||||||
Preference<bool> m_bAutogenSteps;
|
Preference<bool> m_bAutogenSteps;
|
||||||
Preference<bool> m_bAutogenGroupCourses;
|
Preference<bool> m_bAutogenGroupCourses;
|
||||||
Preference<bool> m_bBreakComboToGetItem;
|
Preference<bool> m_bBreakComboToGetItem;
|
||||||
|
|||||||
@@ -86,7 +86,11 @@ AutoScreenMessage( SM_BattleTrickLevel1 );
|
|||||||
AutoScreenMessage( SM_BattleTrickLevel2 );
|
AutoScreenMessage( SM_BattleTrickLevel2 );
|
||||||
AutoScreenMessage( SM_BattleTrickLevel3 );
|
AutoScreenMessage( SM_BattleTrickLevel3 );
|
||||||
|
|
||||||
|
static Preference<bool> g_bCenter1Player( "Center1Player", false );
|
||||||
|
static Preference<bool> g_bShowLyrics( "ShowLyrics", true );
|
||||||
static Preference<float> g_fNetStartOffset( "NetworkStartOffset", -3.0 );
|
static Preference<float> g_fNetStartOffset( "NetworkStartOffset", -3.0 );
|
||||||
|
static Preference<bool> g_bTwoPlayerRecovery( "TwoPlayerRecovery", true );
|
||||||
|
static Preference<bool> g_bEasterEggs( "EasterEggs", true );
|
||||||
|
|
||||||
|
|
||||||
PlayerInfo::PlayerInfo()
|
PlayerInfo::PlayerInfo()
|
||||||
@@ -487,7 +491,7 @@ void ScreenGameplay::Init( bool bUseSongBackgroundAndForeground )
|
|||||||
* StyleType for ONE_PLAYER_ONE_CREDIT_AND_ONE_COMPUTER,
|
* StyleType for ONE_PLAYER_ONE_CREDIT_AND_ONE_COMPUTER,
|
||||||
* but for now just ignore Center1Player when it's Battle or Rave
|
* but for now just ignore Center1Player when it's Battle or Rave
|
||||||
* Mode. This doesn't begin to address two-player solo (6 arrows) */
|
* Mode. This doesn't begin to address two-player solo (6 arrows) */
|
||||||
if( PREFSMAN->m_bCenter1Player &&
|
if( g_bCenter1Player &&
|
||||||
GAMESTATE->m_PlayMode != PLAY_MODE_BATTLE &&
|
GAMESTATE->m_PlayMode != PLAY_MODE_BATTLE &&
|
||||||
GAMESTATE->m_PlayMode != PLAY_MODE_RAVE &&
|
GAMESTATE->m_PlayMode != PLAY_MODE_RAVE &&
|
||||||
GAMESTATE->GetCurrentStyle()->m_StyleType == ONE_PLAYER_ONE_SIDE )
|
GAMESTATE->GetCurrentStyle()->m_StyleType == ONE_PLAYER_ONE_SIDE )
|
||||||
@@ -744,7 +748,7 @@ void ScreenGameplay::Init( bool bUseSongBackgroundAndForeground )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( PREFSMAN->m_bShowLyrics )
|
if( g_bShowLyrics )
|
||||||
this->AddChild( &m_LyricDisplay );
|
this->AddChild( &m_LyricDisplay );
|
||||||
|
|
||||||
|
|
||||||
@@ -1655,7 +1659,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
/* If recovery is enabled, only set fail if both are failing.
|
/* If recovery is enabled, only set fail if both are failing.
|
||||||
* There's no way to recover mid-song in battery mode. */
|
* There's no way to recover mid-song in battery mode. */
|
||||||
if( lt != SongOptions::LIFE_BATTERY &&
|
if( lt != SongOptions::LIFE_BATTERY &&
|
||||||
PREFSMAN->m_bTwoPlayerRecovery && !GAMESTATE->AllAreDead() )
|
g_bTwoPlayerRecovery && !GAMESTATE->AllAreDead() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
LOG->Trace("Player %d failed", (int)pn);
|
LOG->Trace("Player %d failed", (int)pn);
|
||||||
@@ -2327,7 +2331,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
pi->GetPlayerStageStats()->bFailed = true;
|
pi->GetPlayerStageStats()->bFailed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark failure. This hasn't been done yet if m_bTwoPlayerRecovery is set. */
|
/* Mark failure. This hasn't been done yet if g_bTwoPlayerRecovery is set. */
|
||||||
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF &&
|
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF &&
|
||||||
(pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing()) ||
|
(pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing()) ||
|
||||||
(m_pCombinedLifeMeter && m_pCombinedLifeMeter->IsFailing(pi->GetStepsAndTrailIndex())) )
|
(m_pCombinedLifeMeter && m_pCombinedLifeMeter->IsFailing(pi->GetStepsAndTrailIndex())) )
|
||||||
@@ -2468,7 +2472,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
}
|
}
|
||||||
else if( SM == SM_PlayToasty )
|
else if( SM == SM_PlayToasty )
|
||||||
{
|
{
|
||||||
if( PREFSMAN->m_bEasterEggs )
|
if( g_bEasterEggs )
|
||||||
if( !m_Toasty.IsTransitioning() && !m_Toasty.IsFinished() ) // don't play if we've already played it once
|
if( !m_Toasty.IsTransitioning() && !m_Toasty.IsFinished() ) // don't play if we've already played it once
|
||||||
m_Toasty.StartTransitioning();
|
m_Toasty.StartTransitioning();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user