move AutoPlay
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
// This options has weird interactions depending on m_bEventMode;
|
||||
// use GameState::GetCoinMode().
|
||||
Preference<CoinMode> GamePreferences::m_CoinMode( "CoinMode", COIN_MODE_HOME );
|
||||
Preference<PlayerController> GamePreferences::m_AutoPlay( "AutoPlay", PC_HUMAN );
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
namespace GamePreferences
|
||||
{
|
||||
extern Preference<CoinMode> m_CoinMode;
|
||||
extern Preference<PlayerController> m_AutoPlay;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -180,8 +180,6 @@ PrefsManager::PrefsManager() :
|
||||
m_bFailOffForFirstStageEasy ( "FailOffForFirstStageEasy", false ),
|
||||
m_bMercifulBeginner ( "MercifulBeginner", false ),
|
||||
m_bMercifulSuperMeter ( "MercifulSuperMeter", true ),
|
||||
|
||||
m_AutoPlay ( "AutoPlay", PC_HUMAN ),
|
||||
m_bDelayedBack ( "DelayedBack", true ),
|
||||
m_bShowInstructions ( "ShowInstructions", true ),
|
||||
m_bShowSelectGroup ( "ShowSelectGroup", false ),
|
||||
|
||||
@@ -140,8 +140,6 @@ public:
|
||||
Preference<bool> m_bFailOffForFirstStageEasy;
|
||||
Preference<bool> m_bMercifulBeginner; // don't subtract from percent score or grade DP, larger W5 window
|
||||
Preference<bool> m_bMercifulSuperMeter; // negative super deltas are scaled by the players life percentage
|
||||
|
||||
Preference<PlayerController> m_AutoPlay;
|
||||
Preference<bool> m_bDelayedBack;
|
||||
Preference<bool> m_bShowInstructions;
|
||||
Preference<bool> m_bShowSelectGroup;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ScoreKeeperNormal.h"
|
||||
#include "GameState.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GamePreferences.h"
|
||||
#include "Steps.h"
|
||||
#include "ScreenManager.h"
|
||||
#include "GameState.h"
|
||||
@@ -460,7 +461,7 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
|
||||
// handle combo logic
|
||||
//
|
||||
#ifndef DEBUG
|
||||
if( PREFSMAN->m_AutoPlay != PC_HUMAN && !GAMESTATE->m_bDemonstrationOrJukebox ) // cheaters never prosper
|
||||
if( GamePreferences::m_AutoPlay != PC_HUMAN && !GAMESTATE->m_bDemonstrationOrJukebox ) // cheaters never prosper
|
||||
{
|
||||
m_iCurToastyCombo = 0;
|
||||
return;
|
||||
|
||||
@@ -450,7 +450,7 @@ class DebugLineAutoplay : public IDebugLine
|
||||
virtual RString GetDescription() { return AUTO_PLAY.GetValue(); }
|
||||
virtual RString GetValue()
|
||||
{
|
||||
switch( PREFSMAN->m_AutoPlay )
|
||||
switch( GamePreferences::m_AutoPlay )
|
||||
{
|
||||
case PC_HUMAN: return OFF.GetValue(); break;
|
||||
case PC_AUTOPLAY: return ON.GetValue(); break;
|
||||
@@ -459,7 +459,7 @@ class DebugLineAutoplay : public IDebugLine
|
||||
}
|
||||
}
|
||||
virtual Type GetType() const { return IDebugLine::gameplay_only; }
|
||||
virtual bool IsEnabled() { return PREFSMAN->m_AutoPlay.Get() != PC_HUMAN; }
|
||||
virtual bool IsEnabled() { return GamePreferences::m_AutoPlay.Get() != PC_HUMAN; }
|
||||
virtual void Do( RString &sMessageOut )
|
||||
{
|
||||
ASSERT( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID );
|
||||
@@ -469,11 +469,11 @@ class DebugLineAutoplay : public IDebugLine
|
||||
pc = (pc==PC_CPU) ? PC_HUMAN : PC_CPU;
|
||||
else
|
||||
pc = (pc==PC_AUTOPLAY) ? PC_HUMAN : PC_AUTOPLAY;
|
||||
PREFSMAN->m_AutoPlay.Set( pc );
|
||||
GamePreferences::m_AutoPlay.Set( pc );
|
||||
FOREACH_HumanPlayer(p)
|
||||
GAMESTATE->m_pPlayerState[p]->m_PlayerController = PREFSMAN->m_AutoPlay;
|
||||
GAMESTATE->m_pPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
FOREACH_MultiPlayer(p)
|
||||
GAMESTATE->m_pMultiPlayerState[p]->m_PlayerController = PREFSMAN->m_AutoPlay;
|
||||
GAMESTATE->m_pMultiPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
IDebugLine::Do( sMessageOut );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "ScreenEdit.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GamePreferences.h"
|
||||
#include "SongManager.h"
|
||||
#include "ScreenManager.h"
|
||||
#include "ScreenSaveSync.h"
|
||||
@@ -2035,9 +2036,9 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
||||
break;
|
||||
case EDIT_BUTTON_TOGGLE_AUTOPLAY:
|
||||
{
|
||||
PREFSMAN->m_AutoPlay.Set( PREFSMAN->m_AutoPlay!=PC_HUMAN ? PC_HUMAN:PC_AUTOPLAY );
|
||||
GamePreferences::m_AutoPlay.Set( GamePreferences::m_AutoPlay!=PC_HUMAN ? PC_HUMAN:PC_AUTOPLAY );
|
||||
FOREACH_HumanPlayer( p )
|
||||
GAMESTATE->m_pPlayerState[p]->m_PlayerController = PREFSMAN->m_AutoPlay;
|
||||
GAMESTATE->m_pPlayerState[p]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
}
|
||||
break;
|
||||
case EDIT_BUTTON_OFFSET_UP:
|
||||
@@ -2075,7 +2076,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
||||
|
||||
const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI );
|
||||
|
||||
if( PREFSMAN->m_AutoPlay != PC_HUMAN || iCol == -1 )
|
||||
if( GamePreferences::m_AutoPlay != PC_HUMAN || iCol == -1 )
|
||||
return;
|
||||
|
||||
switch( input.pn )
|
||||
@@ -2224,7 +2225,7 @@ void ScreenEdit::TransitionEditState( EditState em )
|
||||
SetupCourseAttacks();
|
||||
|
||||
m_Player.Load( m_NoteDataEdit );
|
||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = PREFSMAN->m_AutoPlay;
|
||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
|
||||
if( g_bEditorShowBGChangesPlay )
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "ScreenManager.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GamePreferences.h"
|
||||
#include "GameManager.h"
|
||||
#include "RageFileManager.h"
|
||||
#include "Steps.h"
|
||||
@@ -1122,7 +1123,7 @@ void ScreenGameplay::LoadNextSong()
|
||||
}
|
||||
else
|
||||
{
|
||||
pi->GetPlayerState()->m_PlayerController = PREFSMAN->m_AutoPlay;
|
||||
pi->GetPlayerState()->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2182,7 +2183,7 @@ void ScreenGameplay::Input( const InputEventPlus &input )
|
||||
{
|
||||
AbortGiveUp( true );
|
||||
|
||||
if( PREFSMAN->m_AutoPlay == PC_HUMAN )
|
||||
if( GamePreferences::m_AutoPlay == PC_HUMAN )
|
||||
{
|
||||
PlayerInfo& pi = GetPlayerInfoForInput( input );
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "ScreenGameplayLesson.h"
|
||||
#include "RageLog.h"
|
||||
#include "GameState.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GamePreferences.h"
|
||||
#include "StatsManager.h"
|
||||
#include "song.h"
|
||||
|
||||
@@ -165,7 +165,7 @@ void ScreenGameplayLesson::ChangeLessonPage( int iDir )
|
||||
|
||||
// Change back to the current autoplay setting (in most cases, human controlled).
|
||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||
pi->GetPlayerState()->m_PlayerController = PREFSMAN->m_AutoPlay;
|
||||
pi->GetPlayerState()->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "GameState.h"
|
||||
#include "GameManager.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GamePreferences.h"
|
||||
#include "AdjustSync.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "InputEventPlus.h"
|
||||
@@ -28,7 +29,7 @@ void ScreenGameplaySyncMachine::Init()
|
||||
ASSERT( pSteps );
|
||||
GAMESTATE->m_pCurSteps[0].Set( pSteps );
|
||||
|
||||
PREFSMAN->m_AutoPlay.Set( PC_HUMAN );
|
||||
GamePreferences::m_AutoPlay.Set( PC_HUMAN );
|
||||
|
||||
ScreenGameplayNormal::Init();
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "GameState.h"
|
||||
#include "song.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GamePreferences.h"
|
||||
#include "InputEventPlus.h"
|
||||
#include "LocalizedString.h"
|
||||
#include "AdjustSync.h"
|
||||
@@ -90,7 +91,7 @@ void ScreenSyncOverlay::UpdateText()
|
||||
|
||||
if( g_bShowAutoPlayStatus )
|
||||
{
|
||||
switch( PREFSMAN->m_AutoPlay )
|
||||
switch( GamePreferences::m_AutoPlay )
|
||||
{
|
||||
case PC_HUMAN: break;
|
||||
case PC_AUTOPLAY: vs.push_back(AUTO_PLAY); break;
|
||||
|
||||
Reference in New Issue
Block a user