arcade machine changes
This commit is contained in:
@@ -402,6 +402,9 @@ bool GameState::HasEarnedExtraStage()
|
||||
if( PREFSMAN->m_bEventMode )
|
||||
return false;
|
||||
|
||||
if( !PREFSMAN->m_bAllowExtraStage )
|
||||
return false;
|
||||
|
||||
if( GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -111,6 +111,9 @@ void NoteSkinManager::GetNoteSkinNames( CStringArray &AddTo )
|
||||
for( map<CString,NoteSkinData>::const_iterator iter = m_mapNameToData.begin();
|
||||
iter != m_mapNameToData.end(); ++iter )
|
||||
{
|
||||
// don't show "default"
|
||||
if( iter->second.sName.CompareNoCase("default")==0 )
|
||||
continue;
|
||||
AddTo.push_back( iter->second.sName );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ public:
|
||||
float m_fCenterImageScaleX;
|
||||
float m_fCenterImageScaleY;
|
||||
bool m_bAttractSound;
|
||||
bool m_bAllowExtraStage;
|
||||
|
||||
// course ranking
|
||||
enum CourseSortOrders { COURSE_SORT_SONGS, COURSE_SORT_METER, COURSE_SORT_METER_SUM, COURSE_SORT_RANK } m_iCourseSortOrder;
|
||||
|
||||
@@ -126,8 +126,8 @@ void Screen::Input( const DeviceInput& DeviceI, const InputEventType type, const
|
||||
/* Don't send release messages with the default handler. */
|
||||
if(type == IET_RELEASE) return; // don't care
|
||||
|
||||
/* Don't make the user hold the back button if they're pressing escape. */
|
||||
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_ESCAPE )
|
||||
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
|
||||
if( MenuI.button == MENU_BUTTON_BACK && DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_ESCAPE )
|
||||
{
|
||||
this->MenuBack( MenuI.player );
|
||||
return;
|
||||
|
||||
@@ -668,7 +668,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
|
||||
if( GAMESTATE->IsPlayerEnabled(p) && iPersonalHighScoreIndex[p] == 0 )
|
||||
bOneHasNewRecord = true;
|
||||
|
||||
if( m_bTryExtraStage )
|
||||
if( PREFSMAN->m_bAllowExtraStage && m_bTryExtraStage )
|
||||
{
|
||||
m_sprTryExtraStage.Load( THEME->GetPathToG(GAMESTATE->IsExtraStage()?"ScreenEvaluation try extra2":"ScreenEvaluation try extra1") );
|
||||
m_sprTryExtraStage.SetName( "TryExtraStage" );
|
||||
|
||||
@@ -530,9 +530,9 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S
|
||||
m_Failed.Load( THEME->GetPathToB("ScreenGameplay failed") );
|
||||
this->AddChild( &m_Failed );
|
||||
|
||||
if( GAMESTATE->IsFinalStage() ) // only load if we're going to use it
|
||||
if( PREFSMAN->m_bAllowExtraStage && GAMESTATE->IsFinalStage() ) // only load if we're going to use it
|
||||
m_Extra.Load( THEME->GetPathToB("ScreenGameplay extra1") );
|
||||
if( GAMESTATE->IsExtraStage() ) // only load if we're going to use it
|
||||
if( PREFSMAN->m_bAllowExtraStage && GAMESTATE->IsExtraStage() ) // only load if we're going to use it
|
||||
m_Extra.Load( THEME->GetPathToB("ScreenGameplay extra2") );
|
||||
this->AddChild( &m_Extra );
|
||||
|
||||
|
||||
@@ -570,11 +570,29 @@ void ScreenOptions::Input( const DeviceInput& DeviceI, const InputEventType type
|
||||
|
||||
// if we are in dedicated menubutton input and arcade navigation
|
||||
// check to see if MENU_BUTTON_LEFT and MENU_BUTTON_RIGHT are being held
|
||||
if( MenuI.IsValid() && MenuI.button == MENU_BUTTON_START &&
|
||||
|
||||
// Super Hack to use the feature in ScreenOptionsMenu (where no style is set)
|
||||
bool bHoldingLeftOrRight = false;
|
||||
bHoldingLeftOrRight |= MenuI.IsValid() && MenuI.button == MENU_BUTTON_START &&
|
||||
PREFSMAN->m_bArcadeOptionsNavigation &&
|
||||
GAMESTATE->m_CurStyle != STYLE_INVALID &&
|
||||
INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_RIGHT) ) &&
|
||||
INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_LEFT) ) )
|
||||
(INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_RIGHT) ) ||
|
||||
INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_LEFT) ) );
|
||||
|
||||
if( GAMESTATE->m_CurStyle == STYLE_INVALID )
|
||||
{
|
||||
GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS;
|
||||
|
||||
bHoldingLeftOrRight |= MenuI.IsValid() && MenuI.button == MENU_BUTTON_START &&
|
||||
PREFSMAN->m_bArcadeOptionsNavigation &&
|
||||
GAMESTATE->m_CurStyle != STYLE_INVALID &&
|
||||
(INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_RIGHT) ) ||
|
||||
INPUTMAPPER->IsButtonDown( MenuInput(MenuI.player, MENU_BUTTON_LEFT) ) );
|
||||
|
||||
GAMESTATE->m_CurStyle = STYLE_INVALID;
|
||||
}
|
||||
|
||||
if( bHoldingLeftOrRight )
|
||||
{
|
||||
Screen::MenuUp( MenuI.player, type );
|
||||
return;
|
||||
@@ -772,13 +790,27 @@ void ScreenOptions::ChangeValue( PlayerNumber pn, int iDelta )
|
||||
int iCurRow = m_iCurrentRow[pn];
|
||||
OptionRow &row = m_OptionRow[iCurRow];
|
||||
|
||||
const int iNumOptions = row.choices.size();
|
||||
if( PREFSMAN->m_bArcadeOptionsNavigation )
|
||||
{
|
||||
if( iCurRow == m_iNumOptionRows || iNumOptions <= 1 ) // 1 or 0
|
||||
{
|
||||
if( iDelta < 0 )
|
||||
{
|
||||
MenuUp( pn );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
MenuDown( pn );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( iCurRow == m_iNumOptionRows ) // EXIT is selected
|
||||
return; // don't allow a move
|
||||
|
||||
const int iNumOptions = row.choices.size();
|
||||
if( iNumOptions <= 1 ) // 1 or 0
|
||||
return; // don't change, don't play sound
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
// if( m_InputMode == INPUTMODE_INDIVIDUAL && p != pn )
|
||||
|
||||
Reference in New Issue
Block a user