move join pause time to metric

This commit is contained in:
Chris Danford
2004-03-23 21:02:58 +00:00
parent 28598fa289
commit 0e9670fe4b
3 changed files with 9 additions and 27 deletions
+1
View File
@@ -17,6 +17,7 @@ ColorP2=1.0,0.5,0.2,1 // orange
InitialScreen=ScreenCompany
WindowTitle=StepMania
DefaultModifiers=
JoinDelaySeconds=0.8
[ModeSwitcher]
PrevModeX=-200
+4 -3
View File
@@ -26,8 +26,9 @@
#include "SDL_utils.h"
#include "RageSounds.h"
#define NEXT_SCREEN THEME->GetMetric(m_sName,"NextScreen")
#define INITIAL_SCREEN THEME->GetMetric("Common","InitialScreen")
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
#define INITIAL_SCREEN THEME->GetMetric ("Common","InitialScreen")
#define JOIN_PAUSE_SECONDS THEME->GetMetricF("Common","JoinPauseSeconds")
ScreenAttract::ScreenAttract( CString sName, bool bResetGameState ) : Screen( sName )
@@ -114,7 +115,7 @@ void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventTy
/* We already played the coin sound. Don't play it again. */
if( MenuI.button != MENU_BUTTON_COIN )
SOUND->PlayOnce( THEME->GetPathToS("Common coin") );
SDL_Delay( 800 ); // do a little pause, like the arcade does
SDL_Delay( (int)(JOIN_PAUSE_SECONDS*1000) ); // do a little pause, like the arcade does
LOG->Trace("ScreenAttract::AttractInput: go to ScreenTitleMenu" );
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
+4 -24
View File
@@ -20,6 +20,7 @@
#include "ScreenManager.h"
#include "RageSounds.h"
#include "Steps.h"
#include "ScreenAttract.h"
const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be same as in ScreenGameplay
@@ -182,32 +183,11 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type
case MENU_BUTTON_LEFT:
case MENU_BUTTON_RIGHT:
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
break;
/* XXX: this is a copy-and-paste from ScreenAttract */
case MENU_BUTTON_START:
case MENU_BUTTON_BACK:
case MENU_BUTTON_COIN:
switch( PREFSMAN->m_iCoinMode )
{
case COIN_PAY:
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
break; // don't fall through
// fall through
case COIN_HOME:
case COIN_FREE:
SOUND->StopMusic();
/* We already played the it was a coin was inserted. Don't play it again. */
if( MenuI.button != MENU_BUTTON_COIN )
SOUND->PlayOnce( THEME->GetPathToS("Common coin") );
SDL_Delay( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
default:
ASSERT(0);
}
break;
return;
}
}
ScreenAttract::AttractInput( DeviceI, type, GameI, MenuI, StyleI, m_Out.IsTransitioning() );
}
void ScreenJukebox::HandleScreenMessage( const ScreenMessage SM )